How can I check contents and remove an accidentally added USB drive from an array?


Recommended Posts

So yeah... I had 2x 4TB drives, one as parity and one as data. 1x 120GB SSD as cache (if I had known, I'd have made it a larger drive). I was trying to add a 64GB usb thumb drive to the system to backup the current USB boot thumb drive. Make it a clone, so to speak, to have a backup. Seems I managed to add it to the array. Now I can't stop and remove the disk from the array since it always shows up as missing with data to be reconstructed. So I added it back for now.

 

How can I clear the USB drive and prepare it for permanent removal? I am hoping to create a new array of 3x 1TB disks (1x parity and 2x data... not sure if can be done) and need that extra slot now being used in the OS by that USB drive.

Edited by NMGMarques
Link to comment
  • NMGMarques changed the title to How can I check contents and remove an accidentally added USB drive from an array?
1 hour ago, JorgeB said:

You need to do a new config (tools -> new config) without it then re-sync parity.

You mean remove the disk and then while it gives me the error do the re-sync?

And how can I see what data is on it? It says it has 400MB of data, though when I click the small explorer icon to the right, it shows an empty drive.

Edited by NMGMarques
Link to comment
3 hours ago, NMGMarques said:

And how can I see what data is on it? It says it has 400MB of data, though when I click the small explorer icon to the right, it shows an empty drive.

 

That 'data usage' may well be the space required for the formatting information and file structure that formatting puts on all new media.  If the little Explorer shows that there is nothing there, then there is no user data present on that drive.  (However, because the way that Unraid's parity works, that formatting data and file structure for that drive becomes a part of the parity data and that is the reason that parity will have to be rebuilt after that drive is removed.)

Link to comment

IF you want even more verification that there is no usable data on that drive, open the GUI terminal  ( the    >_    icon on the toolbar) and type the following command:

ls -alh /mnt/diskx

Replace the   'x'   at the end with the appropriate number for the drive in question from the   Main   tab of the GUI. 

Link to comment
31 minutes ago, Frank1940 said:

IF you want even more verification that there is no usable data on that drive, open the GUI terminal  ( the    >_    icon on the toolbar) and type the following command:

ls -alh /mnt/diskx

Replace the   'x'   at the end with the appropriate number for the drive in question from the   Main   tab of the GUI. 

I'm assuming it's disk2 in your example.

image.png.34ac0728bc72488c62754f8d9a3f51ef.png

 

I typed in ls-alh /mnt/disk2 and in return got this:

image.png.8b85a5a547cab2ef7eebfef8bf6ce4ed.png

 

but when listing drives with the below command it only shows 1 disk it seems.

image.png.0bcef314b27822816ee18a5cfafa94e6.png

 

Link to comment

image.png.5f0a647355e308da4a6f2a2e64513200.png

Device sdb is NOT disk1     sdb is your boot flash flash drive.            That '1' that is in the sdb1 signifies the first partition on device sdb has the label.  (disk1 is sdc and the flash drive (disk2) that is mounted in the array is sda)!

 

Those of us who are grounded in the Windows world often have a problem with UNIX/Linux because of a difference in the basic philosophy between the UNIX world and the Windows world.  I can recall be told in my first UNIX class back in about 1982, that UNIX only has files and directories.  Physical devices don't exist.  They are simply special types of file systems that are integrated into the larger file system.  In other words don't looking for a C:\ on a Unix system.  (Windows has partially moved to a similar philosophy but never quite went the whole way.)

 

As I recall sdb is the call out for the physical attachment point for what Unraid (on your system) calls 'Flash'.  Unraid tracks the actual physical device by its serial number and if you were to plug it into another USB port, it would still be mounted as 'Flash' BUT it might now be sdf.  This allows you to move those physical drives to a new MB and have all of those drives in the same position in the array or cache pool without any effort on your part. 

 

It is confusing to most people (including myself) but UNIX attempts to isolate the user from the physical hardware and leave all those details to the system administrator for each UNIX machine. 

 

PS:  More than 98% of all the Diagnostics that I have looked have the boot flash drive as sda.  I suspect that as soon as you remove that other flash drive from the system, it will become sda.  

 

Link to comment

Long story short, the drive has no data, and to get it out of the array you have to

8 hours ago, JorgeB said:

You need to do a new config (tools -> new config) without it then re-sync parity.

Stop the array, go to Tools - New Config, then Retain All, then Apply. Unassign that disk then start the array to begin parity resync.

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.