Jump to content

[Plugin] Remount Flash Drive

This topic contains 19 posts with an estimated read time of 12 minutes. A summary containing the most significant posts is available with an estimated read time of 6 minutes.

Featured Replies

Posted

Remount Flash Drive

 

This is a simple plugin that will remount your flash drive if it happens to drop offline due to flakey USB ports, flakey drive, evil cats and/or children etc.

 

The OS itself does not recover very gracefully if the flash drive for one reason or another happens to drop offline and then becomes available again.  This plugin will automatically remount the flash drive if that happens, and everything will be back to the way that it was.  It will also automatically run a filesystem check on the flash drive to ensure that everything is good.

 

A call trace when this happens will appear in the system log (completely normal under the circumstances) and then the system will log that it's remounting the flash drive.  At that point your system has completely recovered.

 

Note that there is a situation where the server cannot recover from the flash drive dropping offline.  Namely if the array is stopped.  This is due to how certain files are mounted from the flash drive with the array stopped.  If the array is stopped when the flash drive drops and reconnects, then this plugin will ignore the situation altogether and won't attempt a remount until the array is started and the flash drops and reconnects again.  But, in that circumstance you're probably going to have issues anyways because those files which prevent proper operation of this plugin running won't be correctly written in the first place.  You're best off there to reboot if you notice the problem.

 

Display Glitch:  With the Unassigned Devices plugin installed, the remounted flash will appear in the UD section on Main showing that it's mounted.  DO not unmount it.  This is a display glitch with UD because it thinks that a new drive is installed because Linux automatically assigns a new drive letter to it.  

I needed this so badly!!  Thank you!

  • 5 months later...
On 9/6/2021 at 10:41 AM, Squid said:

Display Glitch:  With the Unassigned Devices plugin installed, the remounted flash will appear in the UD section on Main showing that it's mounted.  DO not unmount it.  This is a display glitch with UD because it thinks that a new drive is installed because Linux automatically assigns a new drive letter to it

This isn't an issue for two reasons:

  • UD won't unmount it because it was not mounted by UD at /mnt/disks.
  • A recent update to UD wil recognize the label is 'UNRAID' and will mark the mount button as 'Array' and disable the button.
  • 1 year later...

It doesn't do it every time, but my Samba shares drop out of visibility on my Windows clients after the flash drive remounts.  I do see the smb services restarting after the remount process, is there a command I can run as a stopgap?  Rebooting does reset it

  • 3 weeks later...

Rebooting and restarting the server does reset the Samba visibility, but I have to make sure I catch it before the USB stick drops off again, else I have to go downstairs and restart the whole box.

 

Still drops out of visibility on 6.12 stable, I was hoping the samba updates would take care of this.

  • 1 month later...

This plugin no longer appears to be working with 6.12.2, and I can't keep my USB drive connected long enough to complete a parity check from the previous hard shutdown because the USB drive doesn't stay connected.  The internal updater for 6.12.3 did not take because the USB drive is not seen by the system, so I will manually update and check again.

  • Author

It still works no problem.

 

As mentioned in the OP, if the array is stopped then the plugin will not remount the drive and as a side effect you also won't be able to start the array with the flash offline.  This is because of a design consideration of the OS and if the plugin attempts a remount then the entire system crashes.

 

The plugin was never meant to be "the end-all, be-all" of if you have this problem, then all your problems will disappear. 

 

Rather its a stop gap solution to keep things more or less running.

 

If you suffer from constant disconnects, then you should use a different port or different device.

  • 6 months later...

How do I install this plugin? I don't see a link

And does this only apply to the unraid/boot drive or all USB devices connected?

  • Author

Only the boot flash.  The unassigned devices plugin can auto mount any other usb storage for you

 

and you get it from Apps

  • 9 months later...

I installed this plugin. Is there a log showing when it reconnects the USB? I haven't seen anything in system log. I'm trouble shooting an issue. Thanks.

From  the first post of this thread:

 

On 9/6/2021 at 11:41 AM, Squid said:

A call trace when this happens will appear in the system log (completely normal under the circumstances) and then the system will log that it's remounting the flash drive.  At that point your system has completely recovered.

2 hours ago, ConnerVT said:

From  the first post of this thread:

 

I should learn to read.... Thanks 😊 

  • 5 months later...

Hey everyone.  Does this remount the drive after you move USB ports as well?  I had a USB 2 port directly on my mobo (which I first used when I built out the OS).  I then moved it to a port on the back of the mobo while I was doing some cable management and I forgot to move it back when I booted the system.  It booted just fine on the back of the mobo, but after I tried to move it back to the internal port, it won't boot properly.  Makes zero sense.  

  • Author
6 hours ago, ChknNRice said:

Hey everyone.  Does this remount the drive after you move USB ports as well?  I had a USB 2 port directly on my mobo (which I first used when I built out the OS).  I then moved it to a port on the back of the mobo while I was doing some cable management and I forgot to move it back when I booted the system.  It booted just fine on the back of the mobo, but after I tried to move it back to the internal port, it won't boot properly.  Makes zero sense.  

Yeah, it will remount it while the OS is running.   For it not booting, has to be something (presumably) in the BIOS settings

1 hour ago, Squid said:

Yeah, it will remount it while the OS is running.   For it not booting, has to be something (presumably) in the BIOS settings

I doubt it's the BIOS because it finds the drive and boots from it. Once the OS starts to come up the config doesn't load. It's almost like something has bound the last port the USB stick was plugged into.

 

 

 

The GUI is unaccessible but the NIC pings. When I pull up the CLI over IPMI, the hostname is "Tower" and not what I defined. 

 

 

 

If I move the stick back to the last slot it was in and reboot, it boots just fine. 

  • Author

ok.  A caveat emptor of the plugin is that it can't do anything to help until basically the array is started.  After its started, it can handle everything except when the array is stopped.  Limitation due to how the OS currently works.  Might change in the future ;) 

As long as I have it on the back of the motherboard it boots. I'll try this.  Boot everything normally, move it physically, then run the plug-in. We'll see what happens on the next boot. 

  • 2 weeks later...

I FINALLY figured this out. The USB controller which the pen drive was plugged into was bound to vifo and once the config started to boot and that portion was loaded per instruction, the USB stick became unreadable by the OS. Once I lifted the bound and rebooted the system, it booted clean on the internal port on the mobo I had been trying to use.

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