diff --git a/emhttp/plugins/dynamix/ShareList.page b/emhttp/plugins/dynamix/ShareList.page
index 8b33a5b4a..6a580a876 100644
--- a/emhttp/plugins/dynamix/ShareList.page
+++ b/emhttp/plugins/dynamix/ShareList.page
@@ -16,8 +16,23 @@ Cond="_var($var,'fsState')!='Stopped' && _var($var,'shareUser')=='e'"
*/
?>
+// Function to filter out unwanted disks and check if any valid disks exist.
+function checkDisks($disks) {
+ foreach ($disks as $disk) {
+ // Check the disk type and fsStatus.
+ if (!in_array($disk['name'], ['flash', 'parity', 'parity2']) && $disk['fsStatus'] !== "Unmountable: unsupported or no file system") {
+ // A valid disk is found, return true.
+ return true;
+ }
+ }
+
+ // No valid disks found, return false.
+ return false;
+}
+
/* Are there any array disks? */
-$nodisks = empty(parse_ini_file('state/disks.ini',true)) ? "disabled" : "";
+$disks = parse_ini_file('state/disks.ini',true) ?? [];
+$nodisks = checkDisks($disks) ? "" : "disabled";
?>
diff --git a/emhttp/plugins/dynamix/include/DiskList.php b/emhttp/plugins/dynamix/include/DiskList.php
index eb2b9b683..db0c0b131 100644
--- a/emhttp/plugins/dynamix/include/DiskList.php
+++ b/emhttp/plugins/dynamix/include/DiskList.php
@@ -30,7 +30,7 @@ $sec_nfs = parse_ini_file('state/sec_nfs.ini',true);
// exit when no mountable array disks
$nodisks = "| "._('There are no mountable array or pool disks - cannot add shares').". |
";
-if (!$disks) die($nodisks);
+if (!checkDisks($disks)) die($nodisks);
// No shared disks
$nodisks = "| "._('There are no exportable disk shares')." |
";
@@ -38,6 +38,20 @@ $nodisks = " | "._('There are no mountable array or pool disks - cannot add shares').". |
";
-if (!$disks) die($nodisks);
+if (!checkDisks($disks)) die($nodisks);
// exit when no shares
$noshares = "| "._('There are no exportable user shares')." |
";
@@ -63,6 +63,20 @@ $pools = implode(',', $pools_check);
// Natural sorting of share names
uksort($shares,'strnatcasecmp');
+// Function to filter out unwanted disks and check if any valid disks exist.
+function checkDisks($disks) {
+ foreach ($disks as $disk) {
+ // Check the disk type and fsStatus.
+ if (!in_array($disk['name'], ['flash', 'parity', 'parity2']) && $disk['fsStatus'] !== "Unmountable: unsupported or no file system") {
+ // A valid disk is found, return true.
+ return true;
+ }
+ }
+
+ // No valid disks found, return false.
+ return false;
+}
+
// Display export settings
function user_share_settings($protocol,$share) {
if (empty($share)) return;