Persistent usb mount

Asked by Nev Mun

Hi,

I am a Linux newbie. I am running Ubuntu 9.10. I have a maxtor onetouch drive. when I plug it in via usb it mounts but if when it is left for sometime (overnight) it "unmounts" and is no longer available. I order to get access to it, I have to unplug it and plug it back in. Is there a way to stop this from happening?

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andre Mangan (kyphi) said :
#1

I have never tried to leave my Maxtor Onetouch connected overnight nor would I do so because there is no point in leaving the drive to spin continuously when not in use.

I would suspect that the Power Management in System, Preferences would have something to do with automatic unmounting when the computer is powered down.

Revision history for this message
Nev Mun (whodamun) said :
#2

I hear you, but, I come from a windows environment where I can usually "plug & forget". I like to have my external drive plugged in and available..

There is no power management setting that I can see. Even if I restart the machine the drive doesn't automatically mount unless I unplug and plug it in again.

Revision history for this message
Cefn (6-launchpad-net-cefn-com) said :
#3

I have never experienced this problem with drives, even if they disappear for some kind of power-down, they are auto-mounted when they reappear.

You can mount a drive using a command in the terminal like...
mount /dev/sdb1 /mnt
...where the /dev/sdb1 is the device identifier. The filesystem on the drive will appear at the directory you specify.

When the device is mounted, you can run...
mount -l
...to get a list of the currently mounted devices, and find out what the identifier is for your drive.

If you want to configure the drive so it automatically mounts, you may have to add those kind of details (which device, and what directory) to /etc/fstab so that the mount operation will be done automatically for you.

There is introductory information about the FileSystemTABle file here...
http://www.tuxfiles.org/linuxhelp/fstab.html

Keep in mind that there's a chance that the drive itself is so smart that it has its own power-down routine when it's not being accessed, and a linux system will tend not to waste resources accessing a drive unless it's necessary, whilst a windows machine may do otherwise. It's possible you could keep the drive alive by occasionally accessing it. If I were to do this, I would use crontab, but it's not easy to configure. There may be other ways to run a command periodically which don't involve editing a complex text file.

Revision history for this message
Cefn (6-launchpad-net-cefn-com) said :
#4

I recently bought a Seagate drive and experienced exactly the same problem that you report. This is the fix I found...

http://www.neowin.net/forum/topic/605434-seagates-drives-to-work-selectively-with-operating-systems/

Revision history for this message
Cefn (6-launchpad-net-cefn-com) said :
#5

More specifically, after running Applications=>Accessories=>Terminal, I found the drive identifier 'sdb' by typing this and hitting enter.

mount -l

Confirmed the Standby flag was set on my external drive by typing this and hitting enter...

sudo sdparm -a /dev/sdb

Fixed it by typing these lines, hitting enter each time...

sudo sdparm --command=start /dev/sdb
sudo sdparm --clear STANDBY -6 /dev/sdb

Reconfirmed that the Standby flag was now unset by typing this and hitting enter...

sudo sdparm -a /dev/sdb

Hopefully the problem has now gone away for me. Don't know if Maxtor is the same.

Can you help with this problem?

Provide an answer of your own, or ask Nev Mun for more information if necessary.

To post a message you must log in.