Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-01-11 18:37:25

Snood
Member
Registered: 2009-05-02
Posts: 56

[Solved]Can't get USB hard drive to maintain a mount point throughout a session.

I've got a Western Digital Passport drive (powered through the USB port) attached to my notebook computer.

OS: Debian Squeeze with Xfce as DE

Current /etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=2fab087f-554b-42bb-af68-7f32873e65ca /               ext3    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=96866d18-7a83-4a56-94b9-d21d443d7686 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd0       /media/floppy0  auto    rw,user,noauto  0       0
/dev/sdb1       /media/modular    auto    rw,user,noauto  0       0
/dev/sdc1       /media/passport     auto    rw,user,noauto  0       0

Both /dev/sdb1 (modular bay drive) and /dev/sdc1 (Passport USB drive) have to be mounted after boot. The modular bay drive holds its mount point, but the USB drive does not.

What I mean by this is that the drive still has its left-most front panel light on, and the "mount devices" plugin for the Xfce-panel still shows it as mounted. But I cannot unmount it or remount it. However, a device called /dev/sdd1 shows up in the mount devices list, and it will mount at /media/passport_.

In Lenny I had the same problem with the drive losing the mount point, but I had a procedural work-around. I could open an instance of Thunar, highlight the passport drive in the left pane, and leave Thunar running minimized. I would then see the drive lights showing that the drive was being polled every few seconds, and it would never lose the mount point.

That does not work in Squeeze.

Is there a way for me to get Thunar to continuously poll the drive, or maybe a smarter sort of fix. My procedural fix for this right now is to leave the drive unmounted until I actually need it, and then to unmount it just as soon as I finish using it.

Thanks,
Snood

PS: Forgive my being an idiot. I thought I was posting this under General but must have had a senior moment.

I also forgot to mention that I have tried using UUID="" and LABEL="" instead of device names in fstab, and that has no effect upon this behavior at all.

Offline

#2 2010-01-12 12:56:02

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: [Solved]Can't get USB hard drive to maintain a mount point throughout a session.

The problem comes from HAL still trying to manage the device, despite your fstab configuration meaning they've already been mounted at boot. I'm afraid I don't know a fix for that off the top of my head but that should at least hint you in the right direction.
As for not being able to unmount/remount, you might want to check your policykit authorisations. Easiest way to do this is by installing policykit-gnome.

As for thunar, make sure it's running daemonised and make sure thunar is set as the volume manager, in the advanced tab of it's preferences.

Offline

#3 2010-01-12 18:01:12

Snood
Member
Registered: 2009-05-02
Posts: 56

Re: [Solved]Can't get USB hard drive to maintain a mount point throughout a session.

I guess the easiest way to handle this is to just leave them unmounted except for when I actually need to use them. It's not a huge inconvenience if I put those entires in /etc/fstab and just use the little panel applet for mounting and unmounting. I may look into the policykit just for kicks.

Thanks for your thoughts.

Offline

#4 2010-01-13 13:19:13

FrancisT
Member
Registered: 2009-05-20
Posts: 7

Re: [Solved]Can't get USB hard drive to maintain a mount point throughout a session.

The way I do this is to give the USB volume a name (e.g. passport) using fdisk or *parted rather than muck around with /etc/fstab.

If the volume has a name then almost always (as in all the recent *buntus and debians I've tried but maybe not in some older ones?) it will show up as "volume name" in /media e.g. /media/passport. You probably need to set the Removable Drives & Media setting to make it automount too

That should be all you need

Offline

#5 2010-01-13 15:25:31

Snood
Member
Registered: 2009-05-02
Posts: 56

Re: [Solved]Can't get USB hard drive to maintain a mount point throughout a session.

FrancisT wrote:

The way I do this is to give the USB volume a name (e.g. passport) using fdisk or *parted rather than muck around with /etc/fstab.

If the volume has a name then almost always (as in all the recent *buntus and debians I've tried but maybe not in some older ones?) it will show up as "volume name" in /media e.g. /media/passport. You probably need to set the Removable Drives & Media setting to make it automount too

That should be all you need

I agree. That's all I should need. I might have made my situation clearer if I had posted the alternate fstab configurations I've tried. I have indeed already assigned labels or volume names to the devices and used the LABEL="" designation for them in fstab instead of device names. I've also used UUID="" to replace device names. I get the same problem. It's not an issue with device order detected at boot time or anything like  that, per se. Instead, what happens is  that the aggressive power management firmware on the little USB-power Passport drive causes it to wander off into la-la land after it has been mounted but sat idle for a while. If I use the Xfce mount devices panel applet or Thunar to try to wake the drive up it will mount again -- but not at the original /media/passport location. That's because that mount point is still being reserved because the system didn't get notified that the drive / device was "removed". (It wasn't removed, it just stopped responding because of its power management features.) So when I remount the Passport drive it gets assigned to "/media/passport_" and that means that my unison profile can no longer find it, among other things.

I'm afraid I'm stuck with a procedural workaround for now. That is to say, I only mount the drive when I actually need to use it for something, and then I unmount it right away so that it doesn't get a chance to do its power management trick, leaving its mount point occupied but not usable. It's not really a big deal now that I've figured out how to deal with it, but it will be interesting to see if the behavior improves over time with software upgrades.

Offline

#6 2010-01-18 19:42:32

Snood
Member
Registered: 2009-05-02
Posts: 56

Re: [Solved]Can't get USB hard drive to maintain a mount point throughout a session.

Just to let you know that the problem was that I was trying to make this too hard.

When Debian Squeeze / Xfce was set up on this system the fstab file was created with the modular bay drive (/dev/sdb1) and the WD Passport USB-connected drive listed with their mount points. I made matters worse by trying to add the flash drive into the mix. And I experimented with LABEL= and UUID= to replace the device lists. I had also created folders under /media for the modular, passport, and flash drives.

Instead of trying to control everything, I should have left only the primary and modular drives listed, changing the modular drive's designation to UUID=. It would then mount to the /media/modular point as directed in fstab.

The USB drives shouldn't have been in fstab at all. And neither should I have created directories for them under /media. Thunar-Volman does that very nicely when you plug a USB drive in and click on the corresponding drive icon in the left pane of Thunar. And, if the drives are labeled, they get mounted to mount points with the same name -- so /media/passport for the drive labeled passport and so on.

I can see now that the folks who responded to me knew all of this and didn't realize that I was laboring under the mistaken impression that I was required to micro-manage all of this crap in fstab.

I read a lot (over 20) different articles online about this issue, and not one of them mentioned the fact that a labeled single partition drive would get its own appropriately named mount point, and that it would be mountable / unmountable by the standard user account without any help from fstab. Is this a new feature? Is it specific to just some of the desktop environments, or is it pretty universal?

I realize now that you guys were pointing me in the  right direction, but you weren't quite spelling it all out in a way that my teensy mind was ready to comprehend.

I appreciate your help. Even if I wasn't smart enough to realize what you meant until I had suffered through a few more days of dimwitted flailing about.

Offline

Board footer

Powered by FluxBB