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


dlandon

Recommended Posts

56 minutes ago, TexasUnraid said:

Yeah, the BTRFS still applies once luks is unlocked. Same command/label as an unencrypted drive, just "under" the luks.

 

The luks label is not really used for much that I can tell, anytime I mount a drive on another system it only uses the btrfs label/details. The luks is just unlocked and nothing else is really done with it that I can tell.

Then I have to find out the file system - btrfs or xfs.  I don't think I can find out the file system until it is mounted.  I'll have to put some time into experimenting with it.

  • Like 1
Link to comment
10 hours ago, dlandon said:

Then I have to find out the file system - btrfs or xfs.  I don't think I can find out the file system until it is mounted.

Unraid already does something similar when you for example create a new pool, might be able to use the same thing:

 

May 24 10:37:40 Tower11 emhttpd: shcmd (5636): mkdir -p /mnt/wd 
May 24 10:37:42 Tower11 emhttpd: shcmd (5637): blkid -t TYPE='xfs' /dev/sdw1 &> /dev/null 
May 24 10:37:42 Tower11 emhttpd: shcmd (5637): exit status: 2 
May 24 10:37:42 Tower11 emhttpd: shcmd (5638): blkid -t TYPE='btrfs' /dev/sdw1 &> /dev/null 
May 24 10:37:42 Tower11 emhttpd: shcmd (5639): mount -t btrfs -o noatime,space_cache=v2 /dev/sdw1 /mnt/wd

 

 

Link to comment
10 hours ago, JorgeB said:

Unraid already does something similar when you for example create a new pool, might be able to use the same thing:

 


May 24 10:37:40 Tower11 emhttpd: shcmd (5636): mkdir -p /mnt/wd 
May 24 10:37:42 Tower11 emhttpd: shcmd (5637): blkid -t TYPE='xfs' /dev/sdw1 &> /dev/null 
May 24 10:37:42 Tower11 emhttpd: shcmd (5637): exit status: 2 
May 24 10:37:42 Tower11 emhttpd: shcmd (5638): blkid -t TYPE='btrfs' /dev/sdw1 &> /dev/null 
May 24 10:37:42 Tower11 emhttpd: shcmd (5639): mount -t btrfs -o noatime,space_cache=v2 /dev/sdw1 /mnt/wd

 

 

Don't know how that's working.  This disk was formatted by Unraid:

/dev/sdg1: UUID="0cd04ece-dfe7-4c59-bff0-5ae6ef294aef" TYPE="crypto_LUKS"

 

I have figured out how to apply an encrypted file system label.  It will be in the next release.

  • Like 1
Link to comment
On 5/24/2021 at 3:42 PM, dlandon said:

 

Don't know how that's working.  This disk was formatted by Unraid:


/dev/sdg1: UUID="0cd04ece-dfe7-4c59-bff0-5ae6ef294aef" TYPE="crypto_LUKS"

 

I have figured out how to apply an encrypted file system label.  It will be in the next release.

 

Very nice for times like this when I have to move drives around between systems.

 

Along this same line, why are the btrfs formatted disks I made on ubuntu not mountable in UD? It does not even detect a file system?

 

Not a big deal in this case as they were not encrypted and I planned to reformat them anyways but found it odd.

 

I tried mounting it manually and they did mount up and work fine, UD just simply didn't detect the partition it seems.

Link to comment

Very minor thing, but on systems with many disks, unassigned devices will show disks "out of order" when sdz rolls over to sdaa, sdab, etc.

 

Is there some logic that could be added to show disks in the "correct" order?

Link to comment
5 hours ago, jortan said:

Very minor thing, but on systems with many disks, unassigned devices will show disks "out of order" when sdz rolls over to sdaa, sdab, etc.

 

Is there some logic that could be added to show disks in the "correct" order?

I need more information than this.  Post a screen shot that shows what you are talking about.

Link to comment
Posted (edited)

image.png.a24ee5b63c75f94889fef2eac20fea4a.png

 

Not a big deal but I figured it might be a one-liner to order these so sdaa comes after sdz.  This becomes more of an issue on another system where I have a lot of "unassigned devices" that are used in ZFS pools.  Disks plugged in to that system drop in to the middle of a long list of unassigned devices instead of the bottom of the list.

Edited by jortan
Link to comment
4 minutes ago, jortan said:

image.png.a24ee5b63c75f94889fef2eac20fea4a.png

 

Not a big deal but I figured it might be a one-liner to order these so sdaa comes after sdz.  This becomes more of an issue on another system where I have a lot of "unassigned devices" that are used in ZFS pools.  Disks plugged in to that system drop in to the middle of a long list of unassigned devices instead of the bottom of the list.

I understand, but I have no way of testing.  I'll include a potential fix in the next release for you to try.

  • Like 1
Link to comment
10 minutes ago, Eric22 said:

I've downloaded ud and ud+ to my server to attach my ssd to my array. I attempted to format  and mount the disk and unraid is not allowing me to do so.  Here are the diagnostics and the photos.  Any help would greatly appreciated. Thanks. 

thebomb-diagnostics-20210526-1445.zip 164.97 kB · 0 downloads

Not seeing any screen shots.

 

Is the 'Mount' button grayed out?

 

One of your disks is struggling:

May 24 18:13:59 TheBomb kernel: ACPI: Thermal Zone [PCT0] (17 C)
May 24 18:13:59 TheBomb kernel: ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
May 24 18:13:59 TheBomb kernel: ata2.00: READ LOG DMA EXT failed, trying PIO
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Send/Recv Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Non-Data Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: ATA-9: WDC WD120EMFZ-11A6JA0, X1G1X2ZL, 81.00A81, max UDMA/133
May 24 18:13:59 TheBomb kernel: ata2.00: 23437770752 sectors, multi 0: LBA48 NCQ (depth 32), AA
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Send/Recv Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Non-Data Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: configured for UDMA/133
May 24 18:13:59 TheBomb kernel: scsi 2:0:0:0: Direct-Access     ATA      WDC WD120EMFZ-11 0A81 PQ: 0 ANSI: 5
May 24 18:13:59 TheBomb kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
May 24 18:13:59 TheBomb kernel: sd 2:0:0:0: [sdc] 23437770752 512-byte logical blocks: (12.0 TB/10.9 TiB)
May 24 18:13:59 TheBomb kernel: sd 2:0:0:0: [sdc] 4096-byte physical blocks
May 24 18:13:59 TheBomb kernel: sd 2:0:0:0: [sdc] Write Protect is off
May 24 18:13:59 TheBomb kernel: sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
May 24 18:13:59 TheBomb kernel: sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
May 24 18:13:59 TheBomb kernel: ata2: failed to read log page 10h (errno=-5)
May 24 18:13:59 TheBomb kernel: ata2.00: exception Emask 0x1 SAct 0x1000 SErr 0x0 action 0x0
May 24 18:13:59 TheBomb kernel: ata2.00: irq_stat 0x40000000
May 24 18:13:59 TheBomb kernel: ata2.00: failed command: READ FPDMA QUEUED
May 24 18:13:59 TheBomb kernel: ata2.00: cmd 60/08:60:00:00:00/00:00:00:00:00/40 tag 12 ncq dma 4096 in
May 24 18:13:59 TheBomb kernel:         res 40/00:00:00:00:00/00:00:00:00:00/40 Emask 0x1 (device error)
May 24 18:13:59 TheBomb kernel: ata2.00: status: { DRDY }
May 24 18:13:59 TheBomb kernel: ata2.00: both IDENTIFYs aborted, assuming NODEV
May 24 18:13:59 TheBomb kernel: ata2.00: revalidation failed (errno=-2)
May 24 18:13:59 TheBomb kernel: ata2: hard resetting link

 

And your log is loaded with this:

May 24 18:13:59 TheBomb kernel: ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Send/Recv Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Non-Data Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Send/Recv Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: failed to get NCQ Non-Data Log Emask 0x1
May 24 18:13:59 TheBomb kernel: ata2.00: configured for UDMA/133
May 24 18:13:59 TheBomb kernel: ata2: EH complete

 

Link to comment
2 minutes ago, Eric22 said:

OOOOOOHHHHHHHHHH!!!!!!  That's crazy. lol Now it works!!!!!! Thanks.    Another question.  according to the log , another one of my disks ai strugling.  How do know which one it is ?

I asked if you tried Yes instead of yes in your original thread, and you said it didn't work.

Link to comment

Curious, I have a bunch of drives plugged into the server at the moment, I keep manually spinning them down but for some reason they will spin up again within a few minutes?

 

With them being unmounted I would not think there is anything that would cause them to spin up. Any ideas what is causing the spin up?

Link to comment
26 minutes ago, TexasUnraid said:

Curious, I have a bunch of drives plugged into the server at the moment, I keep manually spinning them down but for some reason they will spin up again within a few minutes?

 

With them being unmounted I would not think there is anything that would cause them to spin up. Any ideas what is causing the spin up?

You need to post diagnostics.  6.8.3 and 6.9 deal with the spin down differently.

Link to comment
2 hours ago, Eric22 said:

OOOOOOHHHHHHHHHH!!!!!!  That's crazy. lol Now it works!!!!!! Thanks.    Another question.  according to the log , another one of my disks ai strugling.  How do know which one it is ?

Click on the icon to the left of the 'Identification' and it will show the ata number.

Link to comment
31 minutes ago, TexasUnraid said:

Curious, I have a bunch of drives plugged into the server at the moment, I keep manually spinning them down but for some reason they will spin up again within a few minutes?

 

With them being unmounted I would not think there is anything that would cause them to spin up. Any ideas what is causing the spin up?

If you are using 6.9.2 there are some issues with spin ups, I reverted to 6.9.1 you could try 6.9.1

Link to comment
Posted (edited)
12 minutes ago, dlandon said:

You need to post diagnostics.  6.8.3 and 6.9 deal with the spin down differently.

I am on 6.9.2 if that helps. Server is down for the moment while I chase some unrelated cable issues.

Edited by TexasUnraid
Link to comment
5 minutes ago, SimonF said:

If you are using 6.9.2 there are some issues with spin ups, I reverted to 6.9.1 you could try 6.9.1

 

Interesting, I am guessing using the built in downgrade option is the best way to do that? I will give it a try.

Link to comment
Just now, TexasUnraid said:

I am on 6.9.2 if that helps. Server is down for the moment while I chase some unrelated backplane cable issues.

Unraid manages spin down on 6.9.2.  Post diagnostics when you can.

Link to comment

New release of UD.  Many small cosmetic and minor bug fixes.  One thing that is new is that files will be sync'd before a disk is unmounted.  This will flush all the disk writes to the physical disk before the disk is unmounted.  When this happens, you'll see the 'Unmounting' indicator on the 'Mount' button while syncing.  It may show for quite a while.  In your scripts that automount a pluggable disk, you should have a:

sync -f $MOUNTPOINT

in the 'UNMOUNT' case of your script.  The default script now has this included.  In any scripts where this is missing, UD will take care of it when the disk is unmounted.  This will help with cleaner unmounts.

Link to comment
4 hours ago, dlandon said:

New release of UD.

Quote

Fix: Change UD disk sorting order to natural so /dev/sdaa shows up at the bottom of the list.

 

Unfortunately this didn't seem to work, but thanks for trying!

Link to comment
Posted (edited)

Still sorting out cable/drive issues and have not got it started back up yet but had another question I ran across.

 

While I am in here, I am curious how the user scripts part of UD is supposed to work?

 

I have a user script that I would like executed after mounting a drive (creates a snapshot of drive). It looks like it wants me to select a user script file in the "script file" input but when I try it will never populate the path from the dropdown menu?

 

The "user script" input is grayed out and will not let me enter anything.

 

I tried coping the script contents into the "script content" section at one point but it didn't seem to work and gave me no output to debug it.

 

Is it possible to just trigger a user script when a drive is mounted (preferably with the user script background logging enabled)? I could not figure out the UD scripting layout and it always failed.

Edited by TexasUnraid
Link to comment
2 hours ago, TexasUnraid said:

Still sorting out cable/drive issues and have not got it started back up yet but had another question I ran across.

 

While I am in here, I am curious how the user scripts part of UD is supposed to work?

 

I have a user script that I would like executed after mounting a drive (creates a snapshot of drive). It looks like it wants me to select a user script file in the "script file" input but when I try it will never populate the path from the dropdown menu?

 

The "user script" input is grayed out and will not let me enter anything.

 

I tried coping the script contents into the "script content" section at one point but it didn't seem to work and gave me no output to debug it.

 

Is it possible to just trigger a user script when a drive is mounted (preferably with the user script background logging enabled)? I could not figure out the UD scripting layout and it always failed.

The 'Script File' is the file that runs when the drive is installed.  You could run the User Script when the 'ADD' case in the default script is triggered.

 

You have to be aware that you can not run an executable file on the flash drive.  Copy it to /tmp/, chmod to executable and run it from the /tmp/ location.

 

The User Script field is only there to allow UD to indicate ('Running' on the mount button) when the User Script is running.  Most likely you'd have the UD disk mounted and the User script would run at a specific time.  The User Script field is grayed out because you have to have a Script File defined.

Link to comment

Ok, user script in this context is literally just a script that the user created and not a script in the user script plugin. That was throwing me off big time.

 

Sadly easier and simpler to just manually run the user script then try to get the automated script working with UD and then have to manage scripts in multiple places. It would be so cool if the plugins could work together.

 

A basic option in UD to kick off a user script "run in background" task just as if I had pressed the button manually.

 

Not a huge deal, I have been manually running the snapshot script and can keep doing so.

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.