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


Recommended Posts

1 hour ago, chli01 said:

I'm using a Luks->Ext4 (with system enc key) external HDD. In the past mounting this device was working well, however after last reboot (and perhaps a new version of UD) I'm no longer able to mount the device because UD tries to mount it as XFS. Decrypting and mounting the volume manually wis working fine so it's not an issue of the device, see also the log:

 

Dec 18 19:15:11 lud unassigned.devices: Adding partition 'WD_Elements_25A3'...
Dec 18 19:15:11 lud unassigned.devices: Mounting partition 'WD_Elements_25A3' at mountpoint '/mnt/disks/WD_Elements_25A3'...
Dec 18 19:15:11 lud unassigned.devices: Using Unraid api to open the 'crypto_LUKS' device.
Dec 18 19:15:11 lud  emhttpd: shcmd (281): /usr/sbin/cryptsetup luksOpen /dev/sdb1 WD_Elements_25A3
Dec 18 19:15:13 lud unassigned.devices: Mount drive command: /sbin/mount -t 'xfs' -o rw,noatime,nodiratime '/dev/mapper/WD_Elements_25A3' '/mnt/disks/WD_Elements_25A3'
Dec 18 19:15:13 lud kernel: XFS (dm-5): Invalid superblock magic number

UD has never mounted an encrypted ext4 disk.

Link to comment
9 hours ago, dlandon said:

UD has never mounted an encrypted ext4 disk.

Cannot be. It was working for years. However the disk was not initialzed with UD, since I already formatted it before.

 

So maybe it was only working by chance. Anyways... it does not seem to be an intended feature so I have to chance the disk format. Thanks for your reply.

Link to comment
6 hours ago, chli01 said:

Cannot be. It was working for years. However the disk was not initialzed with UD, since I already formatted it before.

 

So maybe it was only working by chance. Anyways... it does not seem to be an intended feature so I have to chance the disk format. Thanks for your reply.

I see it.  I made some changes so I could add parameters based on the file system on the encrypted device.  The way it was before was just a happenstance that you could mount an ext4 disk.  I'll make a change so the ext4 encrypted disk can be mounted and release an update.

Link to comment
7 hours ago, chli01 said:

Cannot be. It was working for years. However the disk was not initialzed with UD, since I already formatted it before.

 

So maybe it was only working by chance. Anyways... it does not seem to be an intended feature so I have to chance the disk format. Thanks for your reply.

Update UD and see if it works.

Link to comment

Hello,

 

Moved over from a Windows server with RAID5 60 TB to Unraid raidz2 120TB with two pools. Everything has went well.

 

I am now having an issue with the unassigned devices plugin and the device names being mixed up. At first all device names were good in the list. I have 6 drives on my new LSI HBA and 6 drives on my Adaptec 71605 (RAID5). 

 

The plugin worked well but I had issues after I retired the RAID5. Unplugged my Adaptec raid card, then moved the clear drives from the RAID5 to the HBA as a new pool.

 

That went well too, but when I did that the device names "i.e. dev6" is wrong or replicated and I took a screenshot. After unistalling the unraid listed them in order but when I reinstall the unassigned devices plug-in the names get mixed up again. The names will not match the actually device names for maybe about 3-4 drives.

 

When reinstalling the plug I can see the passthrough and other setting have stuck around. Maybe there is a way to clear the unassigned devices plugin history settings?

 

Please see attached screen shot. I have tried to rename the device to the right number and save but that doesnt work. I hope this would not cause a an issue with an accidental format on the wrong drive but glad I notcied before I clear the the drives from the RAID.

 

I could not trust the visual format and cleared the drives by command line and all is well. No issues but wanted to report it and see what I can do about clearing the history/settings?

 

DEV 1 and 6 and the main issues. Top DEV1 is really 11 and bottom DEV1 is the real DEV1.

 

 

 

unassisgned devices.png

Edited by 1WayJonny
Link to comment
2 hours ago, 1WayJonny said:

Hello,

 

Moved over from a Windows server with RAID5 60 TB to Unraid raidz2 120TB with two pools. Everything has went well.

 

I am now having an issue with the unassigned devices plugin and the device names being mixed up. At first all device names were good in the list. I have 6 drives on my new LSI HBA and 6 drives on my Adaptec 71605 (RAID5). 

 

The plugin worked well but I had issues after I retired the RAID5. Unplugged my Adaptec raid card, then moved the clear drives from the RAID5 to the HBA as a new pool.

 

That went well too, but when I did that the device names "i.e. dev6" is wrong or replicated and I took a screenshot. After unistalling the unraid listed them in order but when I reinstall the unassigned devices plug-in the names get mixed up again. The names will not match the actually device names for maybe about 3-4 drives.

 

When reinstalling the plug I can see the passthrough and other setting have stuck around. Maybe there is a way to clear the unassigned devices plugin history settings?

 

Please see attached screen shot. I have tried to rename the device to the right number and save but that doesnt work. I hope this would not cause a an issue with an accidental format on the wrong drive but glad I notcied before I clear the the drives from the RAID.

 

I could not trust the visual format and cleared the drives by command line and all is well. No issues but wanted to report it and see what I can do about clearing the history/settings?

 

DEV 1 and 6 and the main issues. Top DEV1 is really 11 and bottom DEV1 is the real DEV1.

 

 

 

unassisgned devices.png

Post diagnostics.

Link to comment

I have a problem, in device script I have this:

  'REMOVE' )

    # Spinning down disk
    logger Spinning disk down -t$PROG_NAME
    /usr/local/sbin/rc.unassigned $DEVICE

 

But the disk do not spin down, it does do a notification I have after that part, and the system log does say:

Dec 23 21:45:36 NAS OfflineBackup: Spinning disk down

 

But if I replace the "$DEVICE" with "sde", it does spin down and the system log says:

Dec 23 21:50:03 NAS OfflineBackup: Spinning disk down
Dec 23 21:50:03 NAS  emhttpd: spinning down /dev/sde

 

Why doesnt "$DEVICE" work? Its probably not ideal to use "sde" in that script?

Edited by Mihle
Link to comment
On 12/22/2022 at 2:42 PM, 1WayJonny said:

Attached with the unassigned devices plug installed. Let me know if you need anything else.

 

Thank you!

diagnostics-20221222-1240.zip 144.39 kB · 1 download

UD is keeping the last device that was assigned to the disk in the historical information and is not replacing it like it should when the device is re-attached.  I'll work on a fix.  For the moment, go to the device settings (three gears) and clear the disk name and cick save, and the correct devX designation will be assigned.

Link to comment
19 minutes ago, Mihle said:

I have a problem, in device script I have this:

  'REMOVE' )

    # Spinning down disk
    logger Spinning disk down -t$PROG_NAME
    /usr/local/sbin/rc.unassigned $DEVICE

 

But the disk do not spin down, it does do a notification I have after that part, and the system log does say:

Dec 23 21:45:36 NAS OfflineBackup: Spinning disk down

 

But if I replace the "$DEVICE" with "sde", it does spin down and the system log says:

Dec 23 21:50:03 NAS OfflineBackup: Spinning disk down
Dec 23 21:50:03 NAS  emhttpd: spinning down /dev/sde

 

Why doesnt "$DEVICE" work? Its probably not ideal to use "sde" in that script?

Your command is wrong.  It should be:

 /usr/local/sbin/rc.unassigned spindown $DEVICE

 

If the disk is an encrypted disk, use $LUKS, if the disk is not encrypted, use $DEVICE.  An encrypted disk's device is /dev/mapper/mountpoint and not /dev/sdX.

 

The best way to handle disk spin down is to set a disk name (alias) and use that.

 

  • Like 1
Link to comment
15 minutes ago, dlandon said:

Your command is wrong.  It should be:

 /usr/local/sbin/rc.unassigned spindown $DEVICE

 

If the disk is an encrypted disk, use $LUKS, if the disk is not encrypted, use $DEVICE.  An encrypted disk's device is /dev/mapper/mountpoint and not /dev/sdX.

 

The best way to handle disk spin down is to set a disk name (alias) and use that.

 

My mistake, the command is what you say there, it was an error by copying it over.


But yes, it is encrypted. $DEVICE do work for unmount tho so weird it doesnt for spindown, while using sde works?
When using sde, it does say dev/sde and not /dev/mapper/mountpoint? Even tho its supposed to be an encrypted disk?

EDIT: $LUKS works for spin down, Why is it better to use disk alias?

 

Edited by Mihle
Link to comment
1 minute ago, Mihle said:

My mistake, the command is what you say there, it was an error by copying it over.


But yes, it is encrypted. $DEVICE do work for unmount tho so weird it doesnt for spindown, while using sde works?
When using sde, it does say dev/sde and not /dev/mapper/mountpoint? Even tho its supposed to be an encrypted disk?

 

When unmounting the disk, $DEVICE is set to '/dev/mapper/mountpoint' and this is what gets unmounted on an encrypted disk.  An Unraid api call is used to spin down disks and it does this by the 'sdX' device designation.

 

Like I said, when the disk is encrypted, use the $LUKS variable.  This is the physical device.  The $DEVICE variable is the mounted device on an encrypted disk.

  • Like 1
Link to comment
On 12/22/2022 at 9:10 AM, 1WayJonny said:

Hello,

 

Moved over from a Windows server with RAID5 60 TB to Unraid raidz2 120TB with two pools. Everything has went well.

 

I am now having an issue with the unassigned devices plugin and the device names being mixed up. At first all device names were good in the list. I have 6 drives on my new LSI HBA and 6 drives on my Adaptec 71605 (RAID5). 

 

The plugin worked well but I had issues after I retired the RAID5. Unplugged my Adaptec raid card, then moved the clear drives from the RAID5 to the HBA as a new pool.

 

That went well too, but when I did that the device names "i.e. dev6" is wrong or replicated and I took a screenshot. After unistalling the unraid listed them in order but when I reinstall the unassigned devices plug-in the names get mixed up again. The names will not match the actually device names for maybe about 3-4 drives.

 

When reinstalling the plug I can see the passthrough and other setting have stuck around. Maybe there is a way to clear the unassigned devices plugin history settings?

 

Please see attached screen shot. I have tried to rename the device to the right number and save but that doesnt work. I hope this would not cause a an issue with an accidental format on the wrong drive but glad I notcied before I clear the the drives from the RAID.

 

I could not trust the visual format and cleared the drives by command line and all is well. No issues but wanted to report it and see what I can do about clearing the history/settings?

 

DEV 1 and 6 and the main issues. Top DEV1 is really 11 and bottom DEV1 is the real DEV1.

 

 

 

unassisgned devices.png

Found a bug.  It will be fixed in the next release.  Unfortunately, I'm working on zfs integration and php8.1 updates currently and I'm not comfortable releasing the updated version until I have done more testing.

Link to comment
1 minute ago, dlandon said:

When unmounting the disk, $DEVICE is set to '/dev/mapper/mountpoint' and this is what gets unmounted on an encrypted disk.  An Unraid api call is used to spin down disks and it does this by the 'sdX' device designation.

 

Like I said, when the disk is encrypted, use the $LUKS variable.  This is the physical device.  The $DEVICE variable is the mounted device on an encrypted disk.

Why is it better to use alias than $LUKS for example?

Link to comment
Just now, Mihle said:

Why is it better to use alias than $LUKS for example?

Inside a UD device script, either $DEVICE or $LUKS (depending on whether or not the disk is encrypted) works fine because UD is maintining the correct values.  If you do some UD script work outside UD, for example I have a User Script run at night doing some backup work and it spins down the disk by using the alias, because the alias is fixed and never changes.  If you get into the habit of using an alias, you'll not have to be concerned about which device variable to use to spin down the disk.

Link to comment

I'm experiencing some odd behavior with the UD plugins. I was having array parity issues and during the course of troubleshooting I ended up with the unRAID USB key throwing some read errors. I shutdown and pulled the USB key and then did a full format of it on my Mac. It reported no issues during the format, but I decided to pro-actively replace it. Alas I made a big goof and forgot to copy the diagnostics off the USB key before formatting it.

 

For the new USB I decided to do a 'clean' install of unRAID rather than restoring from backup. This was relatively painless but has left me with a couple of annoyances. First is I'm getting a persistent banner indicating I should reboot unRAID to update UD:

 

UD-UpdateBanner.thumb.jpg.5c8bc038c2ee53a843d79b8947b676ab.jpg

 

I've rebooted numerous times, yet the banner keeps re-appearing. I made sure to clear my browser cache and cookies each time the banner re-appeared, but that made no difference. I then decided to try uninstalling the UD plugins, reboot and then re-install. Seemed OK but then the banner re-appeared. So then I uninstalled again, and deleted the 'unassigned.devices' folder at /boot/config/plugins/ and then rebooted. After re-installing again, the banner seems to be gone, but now my ZFS pool devices all show a 'Mount' button instead of PASSED.

 

As I deleted the folder, it lost the settings so I went to each drive and set the switch for Passed Through, but returning to the Main screen, the UD section still shows a 'Mount' button. I then went to each drive and set the 'Disable Mount button' switch. Then they showed up with the UNMOUNT button greyed out. When I stop the array, this changes to PASSED. It also shows the Used and Free space incorrectly for the ZFS drives.

 

Is there something else I can try to return it to the simple PASSED button and not show the drive Used and Free space? Thanks!

 

Link to comment
20 minutes ago, dlandon said:

Can you post a screen shot?

 

Here's what I saw before replacing the USB key and doing the 'clean' re-install:

 

PassedBefore.thumb.jpg.78890a469bfa21114b62392bbc155622.jpg

 

Here's with Passed Through and Disable Mount Button switches turned on:

 

PassedMountDisable.thumb.jpg.15f6f1663e2359fd402e87600f2bca1d.jpg

 

And here's with only the Passed Through switch enabled for the 1st drive in the ZFS pool:

 

PassedOnly.thumb.jpg.3a4f2d4085c17b05348f2d4f2e6e5c26.jpg

 

This is all purely cosmetic, as everything is operating as expected, other than the re-occurring banner mentioned in my previous message. And that banner so far hasn't re-appeared after my last clean install of the UD plugins with the folder removed from the USB key.

 

Puzzling, but not creating any real usability issues. Let me know if you need any additional info. Thanks!

 

Link to comment
22 minutes ago, AgentXXL said:

Puzzling, but not creating any real usability issues. Let me know if you need any additional info. Thanks!

I am able to reproduce your issue.  I've been working on implementing zfs disk handling into UD on Unraid 6.12, along with many updates to be compatible with php8.1.  I released a version that was a partial zfs implementation and because of the way zfs disks are mounted, UD was not detecting a passed through disk properly because UD thought it had mounted the disk.  A fix will be in the next release of UD.  I'm not ready to release it though because I've made a lot of changes for zfs and I don't want to release it until I've done more testing. 

 

The early release of UD was to prepare for a 6.12 beta release.  There were several php8.1 changes that kept UD from running at all on 6.12 and the syslog ended up getting clogged with php warnings from UD. I wanted an updated UD that would at least run on 6.12 and would not clog the syslog with php warnings.

 

It's really not causing a problem with the zfs disks, it's just a display issue.

  • 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.