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


Recommended Posts

And no possibility for work-around I presume?

 

Yes there is a workaround and that is to mount it manually in the go file like below.

 

#Mount the intel 750 nvme
mkdir /mnt/nvme
mount /dev/nvme0n1 /mnt/nvme

 

You also have to partition and format it if you haven't already done that. More info in this post by dAigo

 

But this still doesn't let me create share on it, meaning VMs cannot be run off from it.

 

Why don't you mount it as a cache drive and run your VMs from there?

 

Because I already have SSD for a cache drive. Adding M.2 to that pool would bottleneck its performance.

Also, running vms off from cache feels a bit wrong. Why would storing vm/docker data be considered a cache task.

 

Running VMs and Dockers from the cache is the recommended mode of operation for unraid and is not wrong.

 

I have two VMs and 5 Dockers running off an SSD cache drive with no problems.  One of the VMs is a Windows Media Center computer serving extenders and recording TV shows at the same time without any issues with performance on the SSD cache.

 

Would it be reasonable or possible to create the share on cache, but symlink it simply to the m.2 mountpoint?

Link to comment

And no possibility for work-around I presume?

 

Yes there is a workaround and that is to mount it manually in the go file like below.

 

#Mount the intel 750 nvme
mkdir /mnt/nvme
mount /dev/nvme0n1 /mnt/nvme

 

You also have to partition and format it if you haven't already done that. More info in this post by dAigo

 

But this still doesn't let me create share on it, meaning VMs cannot be run off from it.

 

Forgive my ignorance, but why do you feel the need to create a share for your VMs to install into? Wouldn't a simple folder do the job?

 

Link to comment

And no possibility for work-around I presume?

 

Yes there is a workaround and that is to mount it manually in the go file like below.

 

#Mount the intel 750 nvme
mkdir /mnt/nvme
mount /dev/nvme0n1 /mnt/nvme

 

You also have to partition and format it if you haven't already done that. More info in this post by dAigo

 

But this still doesn't let me create share on it, meaning VMs cannot be run off from it.

 

Forgive my ignorance, but why do you feel the need to create a share for your VMs to install into? Wouldn't a simple folder do the job?

 

Isn't this the requirement/limitation of unraid?

Link to comment

And no possibility for work-around I presume?

 

Yes there is a workaround and that is to mount it manually in the go file like below.

 

#Mount the intel 750 nvme
mkdir /mnt/nvme
mount /dev/nvme0n1 /mnt/nvme

 

You also have to partition and format it if you haven't already done that. More info in this post by dAigo

 

But this still doesn't let me create share on it, meaning VMs cannot be run off from it.

 

Forgive my ignorance, but why do you feel the need to create a share for your VMs to install into? Wouldn't a simple folder do the job?

 

Isn't this the requirement/limitation of unraid?

 

Well, I only use a couple of very simple VMs, myself and I don't try to do anything clever like passing through hardware devices, so your requirements may be very different from mine. But I see no intrinsic requirement for the folder that contains the virtual disk images (or any installation ISOs, for that matter) to be accessible across a network, which, after all, is the purpose of a share. Suppose you follow saarg's suggestion and then

mkdir /mnt/nvme/VMs

and set up your VMs to have their disk images there. Wouldn't that achieve what you're wanting to do?

 

I can see a case for making the location of the installation ISOs available across the network, simply for the ease of copying them into place, but on the one hand they can be copied from elsewhere using the command line and on the other I doubt that you'd want to waste your expensive and fast M.2 storage on them anyway.

 

Come to think of it, I don't even know why we're even discussing this here - it has very little to do with Unassigned Devices, other than it's something that exists outside of the main unRAID array.

 

If I happen to be way off track, then please educate me.

 

Link to comment

I think that perhaps the idea of some limitation or requirement that your VMs have to install into a share stems from the fact that many people install them onto their cache disks. Any folder in the root of the cache is by definition a user share. Some people install them onto separate disks that operate outside of the main unRAID array and cache, and to do that they make use of Unassigned Devices to manage those disks. In addition to providing an easy way of automatically mounting disks outside the main array, UD makes it easy to share them across the network but that, as far as I can see, is a bonus, not a necessity for using them to hold VMs.

 

Link to comment

And no possibility for work-around I presume?

 

Yes there is a workaround and that is to mount it manually in the go file like below.

 

#Mount the intel 750 nvme
mkdir /mnt/nvme
mount /dev/nvme0n1 /mnt/nvme

 

You also have to partition and format it if you haven't already done that. More info in this post by dAigo

 

But this still doesn't let me create share on it, meaning VMs cannot be run off from it.

not sure why you would think you need a share to run a VM?    I have a SSD that I mount in the go file and my VMs run from it with no problem.
Link to comment

What exactly do you mean by drive designator?

 

there are the drives:

root@Tower:~# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
md1           9:1    0   3.7T  0 md   /mnt/disk1
md2           9:2    0   3.7T  0 md   /mnt/disk2
sda           8:0    1  14.3G  0 disk 
??sda1        8:1    1  14.3G  0 part /boot
sdb           8:16   0   3.7T  0 disk 
??sdb1        8:17   0   3.7T  0 part 
sdc           8:32   0 232.9G  0 disk 
??sdc1        8:33   0 232.9G  0 part /mnt/cache
sdd           8:48   0   3.7T  0 disk 
??sdd1        8:49   0   3.7T  0 part 
sde           8:64   0   3.7T  0 disk 
??sde1        8:65   0   3.7T  0 part 
loop0         7:0    0    10G  0 loop /var/lib/docker
loop1         7:1    0     1G  0 loop /etc/libvirt
nvme0n1     259:0    0   477G  0 disk 
??nvme0n1p1 259:1    0   477G  0 part

 

This:

nvme0n1     259:0    0   477G  0 disk

 

UD does not recognize this type of drive.

 

I can add the nvme device to UD as a beta feature, but I have no way to test it because I do not have any nvme disks and have no plan on acquiring one.

 

You would have to try it out and let me know what problems come up.

Link to comment

And no possibility for work-around I presume?

 

Yes there is a workaround and that is to mount it manually in the go file like below.

 

#Mount the intel 750 nvme
mkdir /mnt/nvme
mount /dev/nvme0n1 /mnt/nvme

 

You also have to partition and format it if you haven't already done that. More info in this post by dAigo

 

But this still doesn't let me create share on it, meaning VMs cannot be run off from it.

not sure why you would think you need a share to run a VM?    I have a SSD that I mount in the go file and my VMs run from it with no problem.

 

You guys were right indeed. VMs can be run from any mount on the system.

Link to comment

Thanks for this great plugin, this helped me out with using an SSD primarly for Windows, so the R/W performance wouldn't be impacted when using the main array.  :D

 

Edit:

WOW! We can even Auto-Mount (Makes a Share of the USB Device) USB attached storage!

This solves so much struggle! Thank you! Where is the donate button when you need it, haha.

Link to comment

I just upgraded to 6.2 beta 21,  because of performance issues on Windows 10 still...

 

I now can no longer mount the Unassingable Devices mount.


May 08 22:19:55 Adding disk '/dev/sdc1'...
May 08 22:19:55 Mount drive command: /sbin/mount -t btrfs -o auto,async,noatime,nodiratime '/dev/sdc1' '/mnt/disks/Samsung_SSD_850_EVO_500GB_S2RBNXBH218918P'
May 08 22:19:55 Mount of '/dev/sdc1' failed. Error message: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

 

So, good bye Windows VM?

Link to comment

I just upgraded to 6.2 beta 21,  because of performance issues on Windows 10 still...

 

I now can no longer mount the Unassingable Devices mount.


May 08 22:19:55 Adding disk '/dev/sdc1'...
May 08 22:19:55 Mount drive command: /sbin/mount -t btrfs -o auto,async,noatime,nodiratime '/dev/sdc1' '/mnt/disks/Samsung_SSD_850_EVO_500GB_S2RBNXBH218918P'
May 08 22:19:55 Mount of '/dev/sdc1' failed. Error message: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

 

So, good bye Windows VM?

 

It sounds like the disk may have gotten corrupted.  Does the disk mount in 6.1.9 if you revert back?  I've not heard of anyone having any compatibility issues from 6.1.9 to 6.2 with btrfs.

 

I don't know what you can do to fix a btrfs disk that cannot be mounted.  I don't feel comfortable with btrfs yet, and don't have any experience on the tools available to fix a non-mountable btrfs disk.

 

You should probably reformat the disk and copy your backup of the VM vdisk image back and move on.

Link to comment

Wow, thanks for the fast reply!

 

I didn't have a backup of the image, but I only just finished installing everything, no sensitive content was lost.

 

However, how would I go about formatting the drive this time, SSH?

And, if nessecarry, because even creating a new VM using the default UnRAID array storage... I can't get a new VM of Windows to run (black screen), how would I do a revert? :)

 

Edit:

Or can I do a clean 6.2 b21 install on my USB stick, and keep the Array in-tact /working?

Link to comment

Wow, thanks for the fast reply!

 

I didn't have a backup of the image, but I only just finished installing everything, no sensitive content was lost.

 

However, how would I go about formatting the drive this time, SSH?

 

UD can format the disk for you.  Click on 'Help' on the UD page and it will tell you what to do to format a disk.

 

And, if nessecarry, because even creating a new VM using the default UnRAID array storage... I can't get a new VM of Windows to run (black screen), how would I do a revert? :)

 

You can post on the VM thread about your VM issue and someone there can help you.  This is a common issue with some VM installations.  I have done a Windows 10 and Windows 7 VM install on 6.1 and did not had any issues.  I think most issues are with device pass through.

 

There are instructions on the 6.2 b18 post that explain how to revert back to 6.1.9.

Link to comment

I just upgraded to 6.2 beta 21,  because of performance issues on Windows 10 still...

 

I now can no longer mount the Unassingable Devices mount.


May 08 22:19:55 Adding disk '/dev/sdc1'...
May 08 22:19:55 Mount drive command: /sbin/mount -t btrfs -o auto,async,noatime,nodiratime '/dev/sdc1' '/mnt/disks/Samsung_SSD_850_EVO_500GB_S2RBNXBH218918P'
May 08 22:19:55 Mount of '/dev/sdc1' failed. Error message: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error

 

So, good bye Windows VM?

Just checking one thing, the messages above are for sdc1, is that hard coded?  The drive symbols can change between boots, even more likely after OS updates.  It's always best to refer to the drive by something more permanent than its drive symbol.  But ignore me if I'm off-base!

Link to comment

I just upgraded to 6.2 beta 21,  because of performance issues on Windows 10 still...

 

I now can no longer mount the Unassingable Devices mount.


May 08 22:19:55 Adding disk '/dev/sdc1'...
May 08 22:19:55 Mount drive command: /sbin/mount -t btrfs -o auto,async,noatime,nodiratime '/dev/sdc1' '/mnt/disks/Samsung_SSD_850_EVO_500GB_S2RBNXBH218918P'
May 08 22:19:55 Mount of '/dev/sdc1' failed. Error message: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error

 

So, good bye Windows VM?

Just checking one thing, the messages above are for sdc1, is that hard coded?  The drive symbols can change between boots, even more likely after OS updates.  It's always best to refer to the drive by something more permanent than its drive symbol.  But ignore me if I'm off-base!

 

Correct.  They can change.  UD uses the drive serial number to look up the device.

 

It was sdc at the time correct?  If not, that is a problem.

Link to comment

Hey guys,

 

can someone please help me with something regarding Unassigned Devices. Im new to unraid, and pretty noob at these things. I installed Unassigned Devices, added 2 devices that are not in the main raid (ssd and a normal drive). The SSD is freshly formatted, but the normal drive still has the old data in it (ntfs). Both drives get picked up by UD and manage to mount them and the tick for "share" works as expected.

 

Once shared, im using another PC to browse to the drives/folders. When i do so, i can add/modify files on the SSD but not on the Spinny drive "permission denied" (i tried moving some files, i tried adding a file to the root, etc). Is this expected behaviour or am i doing something wrong? Im using Windows 10 to make these edits.

 

Im trying to move some of the data out of the spinny drive so i can format it, maybe that might fix it.

 

Also another question i have is, if there is a way to share one of the disks with the VM running on the same unraid install without having this drive exposed on the network? So, sort of restricted access just for the VM. I have a W10 VM installed in the same unraid, and the VM is installed in the unraid arrays cache drives, i just want to pass through this spinny drive into the VM as a secondary drive.

Link to comment

I don't know if this is the situation, but it was (is?) not uncommon in the Linux realm to only be able to read NTFS filesystems. One used to have to use different drivers to be able to write to it.

 

Hopefully someone that does use UD and NTFS can give more specifics.

Link to comment

If you are trying to move files off and then format the drive why not just COPY the files instead and then format it like you intended?

Alright, let me give some more context. I HAD a diffeernt windows server im now moving ton unraid + VM (windows). the old windows server had a secondary drive which had my downloads and some data files etc. I was hoping that i could plugin this secondary drive into the new VM and still keep the old files that were on it. I was initially intending on creating a folder saying "backups" and chuck everything in there and later (when i have more time) just delete what i dont need and clean things up, but the permission issue did not allow me to do so. So now, im trying to copy everything into the main Raid (this is going to take a long time) so i can format and hope that i dont get the same permission issue.

 

So essentially, i wanted to do the "cleanup" process later rather than sooner. Ah well, just means my plans will be set back by a day or so.

Link to comment

Out of curiosity, if/when i try to format, is there a preferred format type i should use? This is a 3TB Spinny drive (Seagate Desktop drive i believe).

It really depends on how you want to be able to move the drive around.  If you want to be able to move it back to Windows (or use it from a Windows VM) then you want to pick a file system that is recognised by Windows (probably NTFS).  If it will only ever be used by unRAID then a Linux option might be better from a performance perspective and something like XFS would make sense as it is one of the formats used on the main array drives.
Link to comment

Once shared, im using another PC to browse to the drives/folders. When i do so, i can add/modify files on the SSD but not on the Spinny drive "permission denied" (i tried moving some files, i tried adding a file to the root, etc). Is this expected behaviour or am i doing something wrong? Im using Windows 10 to make these edits.

  Not sure why you get this - I can read/write to NTFS formatted drives on unRAID without problems.  It might be some residue of how the permissions are set at the NTFS level?

 

Also another question i have is, if there is a way to share one of the disks with the VM running on the same unraid install without having this drive exposed on the network? So, sort of restricted access just for the VM. I have a W10 VM installed in the same unraid, and the VM is installed in the unraid arrays cache drives, i just want to pass through this spinny drive into the VM as a secondary drive.

If you want a drive to be dedicated to a VM then there is no need to set it up as a share at all (instead you use the internal Linux path when assigning it to the VM).  The normal reason for wanting it visible as a share is so that it can be accessed simultaneously from multiple systems/VMs.
Link to comment

The ntfs driver built into unraid is read only.  UD installs the ntfs-3g driver that allows read and write access to ntfs mounted drives.  Your ntfs drive should mount read/write and you should be able to write to it using UD.

 

The problem I think you are having is that Windows mounted disks can be left in a state where Linux will not mount them read/write.  UD tries to mount a ntfs disk read/write and if that fails, UD will mount it read only.  This was done so disks could at least be read with UD and data moved off of them.

 

If you look at the UD log, you will probably see an entry after UD tries to first mount your ntfs disk that it can only be mounted read only and then an entry after that where UD mounts the disk successfully read only.

 

The solution to your problem is to get the data you want off the disk and re-format the disk with UD and then you can read/write on it with ntfs if that is your format of choice.

 

As someone mentioned, if you want to move the disk back and forth to Windows, ntfs would be a good choice for the disk format.  Remember that Windows may leave it again in a read/only mountable condition.  This normally happens on a system disk where Windows has hibernated or on a Windows 10 system disk with fast boot enabled.  Data disks should not have this condition.

 

If the disk is to be left in unraid, I would use a format native to Linux.  Because of its maturity, I am favoring XFS right now.

Link to comment

@dlandon thanks so much for clarifying things. That makes perfect sense, i think i understand it a lot better now. Felt like some sorcery before haha. I will format it and try again (in the process of copying stuff at the moment, it will be another half a day haha).

 

@itimpi: Thanks for the Advice. I got couple of questions after reading your bit though:

 

If you want a drive to be dedicated to a VM then there is no need to set it up as a share at all (instead you use the internal Linux path when assigning it to the VM).  The normal reason for wanting it visible as a share is so that it can be accessed simultaneously from multiple systems/VMs.

 

So, yes, i remember reading about this on the first post on this thread. I will be using the drive in unraid only, and only for this VM. So, it doesnt really need to be imported into another windows environment. I will likely try setup as a secondary drive to the VM rather than a "share". Is there a prefered format type if i were to mount it to the VM as a secondary drive, or should i use XFS? Also, how do you select your secondary drive: do you select under "2nd Vdisk Location" of the VM and select "/mnt/disks/MY_DISK_NAME_HERE"?

 

Link to comment
  • trurl pinned this topic

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.