Unassigned Devices - Managing Disk Drives and Remote Shares Outside of The Unraid Array


Recommended Posts

I'm building a new NAS and I have a reeeeeeally funky issue.

Unraid 6.9.2
The Array consists out of 3x 4TB Seagate Ironwolf's and a 120GB Plextor SSD Cache. But that has nothing to do with the funky stuff.

 

I have 2x 2TB Seagate Compute drives, these are used for off-site backups.

The usecase is this:

  1. Monday morning 2TB Seagate Compute "A" is plugged in, auto mounted and SMB shared by UD
  2. later that day a backup is executed on a different system which stores the backup on that disk/share
  3. Monday night 2TB Seagate Compute "A" is disconnected and stored off site
  4. Next week on Monday morning 2TB Seagate Compute "B" is plugged in, auto mounted and SMB shared shared by UD
  5. later that day a backup is executed on a different system which stores the backup on that disk/share
  6. Monday night 2TB Seagate Compute "B" is disconnected and stored off site
  7. etc.....

Now here is the funky part:

  1. I connected 2TB Seagate Compute "A", configured auto mount and auto share in UD
  2. disconnected 2TB Seagate Compute "A"
  3. I connected 2TB Seagate Compute "B", configured auto mount and auto share in UD
  4. disconnected 2TB Seagate Compute "B"

Whenever I now connect either 2TB Seagate Compute "A" or "B" I get this greyed out "ARRAY" button in UD and the disk is not shared 😬🙃🤪

 

 

Array.jpg

 

I connected the drives to a different machine and deleted the partition. Yet they still show up with that greyed out "ARRAY" button in UD.

Below is the log taken when I connected one of the drives while it had no partition anymore. It complains about a mismatch in line 4 as if it does not like that different disks get connected to that sata port.

 

Mar 31 13:56:32 NAS kernel: ata6: SATA link down (SStatus 0 SControl 300)
Mar 31 13:56:42 NAS kernel: ata6: link is slow to respond, please be patient (ready=0)
Mar 31 13:56:44 NAS kernel: ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Mar 31 13:56:44 NAS kernel: ata6.00: serial number mismatch ' WFL3RRLV' != ' WFL2P4XZ'
Mar 31 13:56:44 NAS kernel: ata6.00: revalidation failed (errno=-19)
Mar 31 13:56:44 NAS kernel: ata6: limiting SATA link speed to 1.5 Gbps
Mar 31 13:56:49 NAS kernel: ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Mar 31 13:56:49 NAS kernel: ata6.00: serial number mismatch ' WFL3RRLV' != ' WFL2P4XZ'
Mar 31 13:56:49 NAS kernel: ata6.00: revalidation failed (errno=-19)
Mar 31 13:56:49 NAS kernel: ata6.00: disabled
Mar 31 13:56:55 NAS kernel: ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Mar 31 13:56:55 NAS kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.SAT0.SPT5._GTF.DSSP], AE_NOT_FOUND (20200925/psargs-330)
Mar 31 13:56:55 NAS kernel: ACPI Error: Aborting method \_SB.PCI0.SAT0.SPT5._GTF due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
Mar 31 13:56:55 NAS kernel: ata6.00: ATA-10: ST2000DM008-2FR102, WFL2P4XZ, 0001, max UDMA/133
Mar 31 13:56:55 NAS kernel: ata6.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 32), AA
Mar 31 13:56:55 NAS kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.SAT0.SPT5._GTF.DSSP], AE_NOT_FOUND (20200925/psargs-330)
Mar 31 13:56:55 NAS kernel: ACPI Error: Aborting method \_SB.PCI0.SAT0.SPT5._GTF due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
Mar 31 13:56:55 NAS kernel: ata6.00: configured for UDMA/133
Mar 31 13:56:55 NAS kernel: ata6.00: detaching (SCSI 7:0:0:0)
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] Synchronizing SCSI cache
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] Stopping disk
Mar 31 13:56:55 NAS unassigned.devices: Reload: A udev 'remove disk' initiated a reload of udev info.
Mar 31 13:56:55 NAS unassigned.devices: Updating udev information...
Mar 31 13:56:55 NAS unassigned.devices: Udev: Update udev info for /dev/disk/by-id/ata-ST2000DM008-2FR102_WFL3RRLV.
Mar 31 13:56:55 NAS unassigned.devices: Udev: Update udev info for /dev/disk/by-id/wwn-0x5000c500cf867c17.
Mar 31 13:56:55 NAS kernel: scsi 7:0:0:0: Direct-Access ATA ST2000DM008-2FR1 0001 PQ: 0 ANSI: 5
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: Attached scsi generic sg6 type 0
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] 4096-byte physical blocks
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] Write Protect is off
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] Mode Sense: 00 3a 00 00
Mar 31 13:56:55 NAS kernel: sd 7:0:0:0: [sdl] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 31 13:56:56 NAS kernel: sdl:
Mar 31 13:56:56 NAS kernel: sd 7:0:0:0: [sdl] Attached SCSI disk
Mar 31 13:56:56 NAS unassigned.devices: Hotplug: A udev 'add disk' initiated a Hotplug event.
Mar 31 13:56:56 NAS unassigned.devices: Updating udev information...
Mar 31 13:56:56 NAS unassigned.devices: Udev: Update udev info for /dev/disk/by-id/ata-ST2000DM008-2FR102_WFL2P4XZ.
Mar 31 13:56:56 NAS unassigned.devices: Udev: Update udev info for /dev/disk/by-id/wwn-0x5000c500cf6a8b34.
Mar 31 13:56:59 NAS unassigned.devices: Processing Hotplug event...

 


but even when I connect one of the drives to a different SATA port now it still shows up with that greyed out "array" button and shows that "mismatch" error in the log.
 

Mar 31 14:01:33 NAS kernel: ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Mar 31 14:01:33 NAS kernel: ata3.00: serial number mismatch ' WFL2P4XZ' != ' WFL3RRLV'
Mar 31 14:01:33 NAS kernel: ata3.00: revalidation failed (errno=-19)

 

EDIT!

Now it gets even funky'er!!! 🤣

If I do the exact same thing with these 2 disks:

  • HGST_HDS724040ALE640
  • dev3HGST_HDS724040ALE640

Then it works just fine!

Only with the 2 ST2000DM008-2FR102 it does not work and I run into this greyed out "ARRAY" button. :)

Edited by cholzer
Link to comment
2 hours ago, Adem said:

Sorry for that, here is the screenshot you wanted

image.thumb.png.d65e6f98b27dc269b77a538bc505a21e.png

 

i tried to format them with xfs and btrfs

i will use these disks only for my vms.

 

The format created a partition but did not create a file system on the partition.  Please post your diagnistics zip file.

Link to comment
32 minutes ago, cholzer said:

I connected the drives to a different machine and deleted the partition. Yet they still show up with that greyed out "ARRAY" button in UD.

This happens when the disk is removed without being unmounted first.  When it is re-installed, Linux assigns a new sdX designation.  Unraid does not see the new disk as an Unassigned DIsk and UD thinks it's a disk that fell out of the array.

 

You'll need to reboot to clear it up.

Link to comment
2 minutes ago, dlandon said:

This happens when the disk is removed without being unmounted first.  When it is re-installed, Linux assigns a new sdX designation.  Unraid does not see the new disk as an Unassigned DIsk and UD thinks it's a disk that fell out of the array.

 

You'll need to reboot to clear it up.


Thank you! I will reboot and see what happens.

Is there a way to have a cron job unmount the disk?

I'd like to have this offsite-backup as "end-user" proof as possible. Which means I do not want to unmount it manually every Monday evening before it gets unplugged. 😅

Link to comment
1 minute ago, cholzer said:

Is there a way to have a cron job unmount the disk?

Your script can do an unmount when it is done, or you can unmount the disk with a User Script on a cron.  Go to the UD page and click on the help icon and read about using the UD script to mount and unmount the disk.  The problem with the cron is that you'd also need to confirm it got unmounted or you'll be back in the same pickle.

 

My suggestion is to set up a User Script to do the copying and unmount the disk at the end of the script.  As I read your post, it is a manual process.

  • Thanks 1
Link to comment
21 minutes ago, dlandon said:

Your script can do an unmount when it is done, or you can unmount the disk with a User Script on a cron. 

thx!

Ideally I would have Veeam Backup & Replication SSH into unraid, ensure that the disk is mounted before the backup and unmount it when its done.
But I need to see if I can execute that pre/post backup job. (ESXi is on a different machine - Unraid is 'only' used to store onsite backups and as 'provider' for the offsite backup media)

 

As a quick solution I have now created a userscript to unmount the disk - scheduled to run ~2hours after the backup task is always finished. This worked nicely in my test! :)

I assume there is no way how I could have a cron job run sometime at night to let Unraid/Linux forget that a disk was safely removed - in case that this would happen at some point - so that a reboot isnt required.
 

Link to comment
3 minutes ago, cholzer said:

I assume there is no way how I could have a cron job run sometime at night to let Unraid/Linux forget that a disk was safely removed - in case that this would happen at some point - so that a reboot isnt required.

You can't get Linux to unforget the disk.  If it's properly unmounted, there is no problem.  Don't remove it until it is unmounted.  If it's not unmounted before removal, you risk data loss/corruption.

Link to comment
2 minutes ago, CaptainSpalding said:

I do not get a pop-up. I tried with Firefox and Chrome.

 

This page is where I land if I press that partion link on the main page:

image.thumb.png.fcc8d8dc4a9bc63f21ecc3b340ae453e.png

 

23 minutes ago, dlandon said:

The disk is mounted.  You are browsing it.  Unmount the disk then change the mount point.

 

  • Thanks 1
Link to comment
44 minutes ago, dlandon said:

You can't get Linux to unforget the disk.  If it's properly unmounted, there is no problem.  Don't remove it until it is unmounted.  If it's not unmounted before removal, you risk data loss/corruption.

Thx!

I found a way to have Veeam Backup & Replication remotely mount the disk via ssh before the backup starts
then then unmount it once the backup is done. :)

Link to comment
3 hours ago, dlandon said:

Your script can do an unmount when it is done, or you can unmount the disk with a User Script on a cron.  Go to the UD page and click on the help icon and read about using the UD script to mount and unmount the disk.  The problem with the cron is that you'd also need to confirm it got unmounted or you'll be back in the same pickle.

 

I noticed that it can sometimes take 60 seconds or more for the SMB share to get accessible after the disk has been mounted.

Is that.... normal? 😅

Link to comment
1 minute ago, cholzer said:

 

I noticed that it can sometimes take 60 seconds or more for the SMB share to get accessible after the disk has been mounted.

Is that.... normal? 😅

Yes.  UD sets up the shares and Unraid enables them on a polling schedule that I believe is one minute.

Link to comment

Hello,

 

I am having difficulty with with a drive that was previously working with UD. Here's the log I'm getting. 

 

Mar 24 18:25:21 UNRAID emhttpd: read SMART /dev/sdb
Mar 24 21:11:08 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 24 21:11:08 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 12:31:23 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 12:31:23 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 12:32:38 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 12:32:38 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 12:33:31 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 12:33:31 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 12:35:00 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 12:35:00 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 14:10:50 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 14:10:50 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 14:11:45 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 14:11:45 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 14:12:06 UNRAID unassigned.devices: Warning: Cannot change the disk label on device 'sdb1'.
Mar 26 14:12:08 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 14:12:08 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.
Mar 26 14:14:48 UNRAID sudo: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/sbin/fsck -N /dev/sdb
Mar 26 14:15:33 UNRAID emhttpd: spinning down /dev/sdb
Mar 26 14:16:06 UNRAID unassigned.devices: Partition 'sdb1' does not have a file system and cannot be mounted.
Mar 26 14:16:06 UNRAID unassigned.devices: Error: Device '/dev/sdb2' mount point 'Media' - name is reserved, used in the array or by an unassigned device.

 

Any help is greatly appreciated!

 

Link to comment

Is it possible to ssh into unraid and then remotely call UD to unmount or mount a disk?
 

I did take a look at the scripts in the first post but these dont seem to hold the answer. 😅

 

Reason for my question is that as it truns out I run into several issues with the SMB share creation/destruction when I remotely SSH into unraid and then just mount/unmount the disk.

These problems do not exists when I use the "mount" button in the UD gui, so I guess the solution would be to call UD remotelly via SSH and let it do the mount/umount. But how?

Thanks in advance!

Edited by cholzer
Link to comment

Im having issues mounting HHDs.

first, I formatted 3 drives with windows with NTFS. using an external usb dock, the first drive mounted ok. i transferred files with krusader and removed the drive. I put in the second drive and the mount button was grayed out. Same with the third. I then tried formatting the third one in UD as NTFS. same issue

here are the logs:

 

win10 formated
Apr 3 21:13:52 Server kernel: sd 15:0:0:0: [sdd] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
Apr 3 21:13:52 Server kernel: sd 15:0:0:0: [sdd] 4096-byte physical blocks
Apr 3 21:13:52 Server kernel: sd 15:0:0:0: [sdd] Write Protect is off
Apr 3 21:13:52 Server kernel: sd 15:0:0:0: [sdd] Mode Sense: 7f 00 10 08
Apr 3 21:13:52 Server kernel: sd 15:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
Apr 3 21:13:52 Server kernel: sdd: sdd1
Apr 3 21:13:52 Server kernel: sd 15:0:0:0: [sdd] Attached SCSI disk
Apr 3 21:14:49 Server emhttpd: WDC_WD30EFRX-68EUZN0_WD-WCC4N4SSDP0E (sdd) 512 5860533168
Apr 3 21:14:49 Server emhttpd: read SMART /dev/sdd
Apr 3 21:14:51 Server root: /usr/sbin/wsdd
Apr 3 21:14:56 Server unassigned.devices: Disk with ID 'WDC_WD30EFRX-68EUZN0_WD-WCC4N4SSDP0E (sdd)' is not set to auto mount.
Apr 3 21:14:58 Server root: /usr/sbin/wsdd
Apr 3 21:17:00 Server unassigned.devices: Adding partition 'sdd1'...
Apr 3 21:17:00 Server unassigned.devices: Mounting partition 'sdd1' at mountpoint '/mnt/disks/WD-WCC4N4SSDP0E'...
Apr 3 21:17:00 Server unassigned.devices: Mount drive command: /sbin/mount -t 'zfs_member' -o rw,noatime,nodiratime '/dev/sdd1' '/mnt/disks/WD-WCC4N4SSDP0E'
Apr 3 21:17:00 Server unassigned.devices: Mount of 'sdd1' failed: 'mount: /mnt/disks/WD-WCC4N4SSDP0E: unknown filesystem type 'zfs_member'. '

unraid formated
Apr 3 21:13:52 Server kernel: sd 15:0:1:0: [sde] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
Apr 3 21:13:52 Server kernel: sd 15:0:1:0: [sde] 4096-byte physical blocks
Apr 3 21:13:52 Server kernel: sd 15:0:1:0: [sde] Write Protect is off
Apr 3 21:13:52 Server kernel: sd 15:0:1:0: [sde] Mode Sense: 7f 00 10 08
Apr 3 21:13:52 Server kernel: sd 15:0:1:0: [sde] Write cache: enabled, read cache: enabled, supports DPO and FUA
Apr 3 21:13:52 Server kernel: sde: sde1
Apr 3 21:13:52 Server kernel: sd 15:0:1:0: [sde] Attached SCSI disk
Apr 3 21:14:49 Server emhttpd: WDC_WD30EFRX-68EUZN0_WD-WCC4N3PCAXUZ (sde) 512 5860533168
Apr 3 21:14:49 Server emhttpd: read SMART /dev/sde

I then installed two different HHDs into the server (sata connected to raid card in JBOD, i.t. mode). formatted them in UD with xfs. same issue.

here are the logs

Apr 4 00:04:49 Server kernel: sd 15:0:2:0: [sdi] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
Apr 4 00:04:49 Server kernel: sd 15:0:2:0: [sdi] 4096-byte physical blocks
Apr 4 00:04:49 Server kernel: sd 15:0:2:0: [sdi] Write Protect is off
Apr 4 00:04:49 Server kernel: sd 15:0:2:0: [sdi] Mode Sense: 7f 00 10 08
Apr 4 00:04:49 Server kernel: sd 15:0:2:0: [sdi] Write cache: enabled, read cache: enabled, supports DPO and FUA
Apr 4 00:04:49 Server kernel: sdi: sdi1
Apr 4 00:04:49 Server kernel: sd 15:0:2:0: [sdi] Attached SCSI disk
Apr 4 00:05:13 Server emhttpd: WDC_WD30EFRX-68EUZN0_WD-WCC4N3PCAXUZ (sdi) 512 5860533168
Apr 4 00:05:13 Server emhttpd: read SMART /dev/sdi
Apr 4 00:07:04 Server unassigned.devices: Warning: Cannot change the disk label on device 'sdi1'.
Apr 4 00:08:44 Server unassigned.devices: Removing all partitions from disk '/dev/sdi'.
Apr 4 00:11:11 Server unassigned.devices: Device '/dev/sdi' block size: 5860533168.
Apr 4 00:11:11 Server unassigned.devices: Clearing partition table of disk '/dev/sdi'.
Apr 4 00:11:11 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:11:11 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:11:11 Server unassigned.devices: Creating Unraid compatible gpt partition on disk '/dev/sdi'.
Apr 4 00:15:36 Server unassigned.devices: Device '/dev/sdi' block size: 5860533168.
Apr 4 00:15:36 Server unassigned.devices: Clearing partition table of disk '/dev/sdi'.
Apr 4 00:15:36 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:15:36 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:15:36 Server unassigned.devices: Creating Unraid compatible gpt partition on disk '/dev/sdi'.
Apr 4 00:18:16 Server unassigned.devices: Device '/dev/sdi' block size: 5860533168.
Apr 4 00:18:16 Server unassigned.devices: Clearing partition table of disk '/dev/sdi'.
Apr 4 00:18:16 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:18:16 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:18:16 Server unassigned.devices: Creating Unraid compatible gpt partition on disk '/dev/sdi'.
Apr 4 00:18:24 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:18:24 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:18:24 Server unassigned.devices: Formatting disk '/dev/sdi' with 'xfs' filesystem.
Apr 4 00:18:27 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:18:27 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:18:30 Server unassigned.devices: Disk with ID 'WDC_WD30EFRX-68EUZN0_WD-WCC4N3PCAXUZ (sdi)' is not set to auto mount.
Apr 4 00:19:34 Server kernel: sdi: sdi1
Apr 4 00:19:34 Server unassigned.devices: Disk with ID 'WDC_WD30EFRX-68EUZN0_WD-WCC4N3PCAXUZ (sdi)' is not set to auto mount.
Apr 4 00:21:06 Server kernel: sdi: sdi1
Apr 4 00:21:06 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:21:06 Server kernel: sdi: sdi1
Apr 4 00:21:06 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:21:06 Server unassigned.devices: Formatting disk '/dev/sdi' with 'xfs' filesystem.
Apr 4 00:21:06 Server unassigned.devices: Disk with ID 'WDC_WD30EFRX-68EUZN0_WD-WCC4N3PCAXUZ (sdi)' is not set to auto mount.
Apr 4 00:21:21 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:21:21 Server kernel: sdi: sdi1
Apr 4 00:21:21 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:21:24 Server unassigned.devices: PHP Warning: unlink(/var/state/unassigned.devices/formatting_sdi.state): No such file or directory in /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php on line 932
Apr 4 00:21:28 Server kernel: sdi: sdi1
Apr 4 00:21:28 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:21:28 Server kernel: sdi: sdi1
Apr 4 00:21:28 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:21:28 Server unassigned.devices: Formatting disk '/dev/sdi' with 'xfs' filesystem.
Apr 4 00:21:43 Server unassigned.devices: Reloading disk '/dev/sdi' partition table.
Apr 4 00:21:43 Server kernel: sdi: sdi1
Apr 4 00:21:43 Server unassigned.devices: Reload partition table result: /dev/sdi: re-reading partition table
Apr 4 00:21:46 Server unassigned.devices: PHP Warning: unlink(/var/state/unassigned.devices/formatting_sdi.state): No such file or directory in /usr/local/emhttp/plugins/unassigned.devices/UnassignedDevices.php on line 932
Apr 4 00:51:49 Server emhttpd: spinning down /dev/sdi

 

Apr 4 00:22:04 Server kernel: sd 15:0:3:0: [sdj] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
Apr 4 00:22:04 Server kernel: sd 15:0:3:0: [sdj] 4096-byte physical blocks
Apr 4 00:22:04 Server kernel: sd 15:0:3:0: [sdj] Write Protect is off
Apr 4 00:22:04 Server kernel: sd 15:0:3:0: [sdj] Mode Sense: 7f 00 10 08
Apr 4 00:22:04 Server kernel: sd 15:0:3:0: [sdj] Write cache: enabled, read cache: enabled, supports DPO and FUA
Apr 4 00:22:04 Server kernel: sdj: sdj1
Apr 4 00:22:04 Server kernel: sd 15:0:3:0: [sdj] Attached SCSI disk
Apr 4 00:22:05 Server unassigned.devices: Disk with ID 'WDC_WD30EFRX-68EUZN0_WD-WCC4N4SSDP0E (sdj)' is not set to auto mount.
Apr 4 00:22:06 Server emhttpd: WDC_WD30EFRX-68EUZN0_WD-WCC4N4SSDP0E (sdj) 512 5860533168
Apr 4 00:22:06 Server emhttpd: read SMART /dev/sdj
Apr 4 00:22:22 Server unassigned.devices: Warning: Cannot change the disk label on device 'sdj1'.
Apr 4 00:22:47 Server unassigned.devices: Removing partition '1' from disk '/dev/sdj'.
Apr 4 00:23:12 Server unassigned.devices: Device '/dev/sdj' block size: 5860533168.
Apr 4 00:23:12 Server unassigned.devices: Clearing partition table of disk '/dev/sdj'.
Apr 4 00:23:12 Server unassigned.devices: Reloading disk '/dev/sdj' partition table.
Apr 4 00:23:12 Server unassigned.devices: Reload partition table result: /dev/sdj: re-reading partition table
Apr 4 00:23:12 Server unassigned.devices: Creating Unraid compatible gpt partition on disk '/dev/sdj'.
Apr 4 00:24:17 Server kernel: sdj: sdj1
Apr 4 00:24:17 Server unassigned.devices: Reloading disk '/dev/sdj' partition table.
Apr 4 00:24:17 Server kernel: sdj: sdj1
Apr 4 00:24:17 Server unassigned.devices: Reload partition table result: /dev/sdj: re-reading partition table
Apr 4 00:24:17 Server unassigned.devices: Formatting disk '/dev/sdj' with 'xfs' filesystem.
Apr 4 00:24:33 Server unassigned.devices: Reloading disk '/dev/sdj' partition table.
Apr 4 00:24:33 Server kernel: sdj: sdj1
Apr 4 00:24:33 Server unassigned.devices: Reload partition table result: /dev/sdj: re-reading partition table
Apr 4 00:54:38 Server emhttpd: spinning down /dev/sdj

I have UD, UD plus and UD preclear installed. I've tried uninstalling and reinstalling all three apps.

Any help would be appreciated, TIA

Link to comment
On 4/1/2022 at 8:52 AM, cholzer said:

Is it possible to ssh into unraid and then remotely call UD to unmount or mount a disk?
 

I did take a look at the scripts in the first post but these dont seem to hold the answer. 😅

 

Reason for my question is that as it truns out I run into several issues with the SMB share creation/destruction when I remotely SSH into unraid and then just mount/unmount the disk.

These problems do not exists when I use the "mount" button in the UD gui, so I guess the solution would be to call UD remotelly via SSH and let it do the mount/umount. But how?

Thanks in advance!


I think I figured it out. :)

Goal:
Short Version:
Use ssh to have UnassignedDevices mount/umount a specific disk and create an SMB/CIFS share for that disk.

Long Version - my usecase:

  1. (pre-backup script) a Server on my network connects to UNRAID via SSH and instructs UD to mount a specific disk which also creates the share
  2. this server then runs a backup job which has this UD share as target
  3. (post-backup script) once the backup is done the server connects to UNRAID via SSH and instructs UD to unmount this specific disk which also removes the share

 

Step-by-step guide:

I assume that your disk already has a single partition

  1. Connect the disk to your Unraid system
  2. go to the settings of the disk, enable the 'share' setting
  3. mount the disk, make sure that the share is created and can be accessed
  4. note the disk id (sd* i.e. sdg) next to the drive serial in the UD GUI
  5. ssh into the UNRAID server or open the terminal in the webgui
  6. run "ls -ahlp /dev/disk/by-uuid" to list all drives by their UUID (look for the sd* to find your disk's UUID)
  7. now you can use these 2 commands to mount/unmount this specific disk via SSH or a script on your UNRAID machine.
     
/usr/local/sbin/rc.unassigned mount '/dev/disk/by-uuid/THEUUIDOFYOURDISK'
/usr/local/sbin/rc.unassigned umount '/dev/disk/by-uuid/THEUUIDOFYOURDISK'


Hope this might help someone who finds himself in the same situation as I was in. :)

Edited by cholzer
Link to comment
4 hours ago, cholzer said:
/usr/local/sbin/rc.unassigned mount '/dev/disk/by-uuid/THEUUIDOFYOURDISK'
/usr/local/sbin/rc.unassigned umount '/dev/disk/by-uuid/THEUUIDOFYOURDISK'


Hope this might help someone who finds himself in the same situation as I was in. :)

 

There is an easier way of doing this.  Give the disk an alias name and use that name to mount/unmount the disk:

393672679_Screenshot2022-04-04052945.png.70be5ea2423ea5c2c48954415e67f93c.png

 

/usr/local/sbin/rc.unassigned mount name=MusicBk
/usr/local/sbin/rc.unassigned umount name=MusicBk

 

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.