Loading src/disk.sh +18 −11 Original line number Diff line number Diff line Loading @@ -573,6 +573,12 @@ addDevice () { [ ! -b "$DISK_DEV" ] && error "Device $DISK_DEV cannot be found! Please add it to the 'devices' section of your compose file." && exit 55 local sectors="" local dev_type="" dev_type=$(lsblk -no TYPE "$DISK_DEV" 2>/dev/null | head -n1) # Only detect and apply sector sizes for partitions, not whole disks # Whole disk passthrough with explicit sector sizes causes DSM not to recognize the disk if [[ "$dev_type" == "part" ]]; then local result logical physical result=$(fdisk -l "$DISK_DEV" | grep -m 1 -o "(logical/physical): .*" | cut -c 21-) logical="${result%% *}" Loading @@ -586,6 +592,7 @@ addDevice () { else warn "Failed to determine the sector size for $DISK_DEV" fi fi DISK_OPTS+=$(createDevice "$DISK_DEV" "$DISK_TYPE" "$DISK_INDEX" "$DISK_ADDRESS" "raw" "$DISK_IO" "$DISK_CACHE" "" "$sectors") Loading Loading
src/disk.sh +18 −11 Original line number Diff line number Diff line Loading @@ -573,6 +573,12 @@ addDevice () { [ ! -b "$DISK_DEV" ] && error "Device $DISK_DEV cannot be found! Please add it to the 'devices' section of your compose file." && exit 55 local sectors="" local dev_type="" dev_type=$(lsblk -no TYPE "$DISK_DEV" 2>/dev/null | head -n1) # Only detect and apply sector sizes for partitions, not whole disks # Whole disk passthrough with explicit sector sizes causes DSM not to recognize the disk if [[ "$dev_type" == "part" ]]; then local result logical physical result=$(fdisk -l "$DISK_DEV" | grep -m 1 -o "(logical/physical): .*" | cut -c 21-) logical="${result%% *}" Loading @@ -586,6 +592,7 @@ addDevice () { else warn "Failed to determine the sector size for $DISK_DEV" fi fi DISK_OPTS+=$(createDevice "$DISK_DEV" "$DISK_TYPE" "$DISK_INDEX" "$DISK_ADDRESS" "raw" "$DISK_IO" "$DISK_CACHE" "" "$sectors") Loading