David Bolt wrote:
This is different. The mount point is created but the drive isn't
mounted straight away. It's only when a user, normal or root, looks in
the directory that the drive is auto-mounted by submountd.
>
In my setup the drive seems to be mounted whenever the WD_USB_2 icon is
present on the desktop, i.e. whenever anybody is logged in via a Gnome
desktop on the console. If nothing else has explicitly mounted the drive
and the console is logged out the drive is unmounted.
As long as
someone is looking in the directory, e.g. a window is open to look at
the contents, or a shell is open with the directory as (part of) the
current path, the drive stays mounted. After the last access to it, it's
no longer part of someone's CWD, or the directory window is closed,
submountd waits for about three seconds and then unmounts the drive.
That sounds very similar.
Another thing that I've noticed is that if the drive is in use by a
normal user and then I use FTP to transfer files from one machine to
that drive, they fail because of a permissions problem. For some reason,
the files take on a root.users ownership and stay that way until it is
unmounted. Once it's unmounted, I can remount it as a normal user and
the files take on my $UID.users ownership.
Isn't that common VFAT behavior? I certainly haven't reformatted my
drive so its still VFAT. My backup script runs as root, but that hasn't
stopped me looking at stuff as a normal user. This is what I'd expect
since VFAT doesn't understand file ownership. The disk content must
inherit its ownership from the user who mounted it.
I think the mount directory name is made from the drive maker
abbreviation (Western Digital) plus the USB port (USB_1 or USB_2 - I
have the drive in the bottom port of two.
Maybe, although that doesn't explain the 20GB drive being given the
mount-point usbdisk. I wonder if the "WD_USB_2" is a part of the
identifier string.
Could it be the VFAT volume (partition) label? In this case it could
have been written as "WD" for the manufacturer and USB_2 because its a
USB 2.0 device. Using the volume label would make a lot of sense because
the disk would always be mounted in the same place regardless of which
USB connector it was plugged into.
I've not yet tried to connect the drive to a Winders box so I can't tell
whether my volume label guess is right. Does your no-name drive have a
volume label set? If not, maybe "usbdisk" is the default.
- ssh login does not spin up or mount the drive. Nor does running a
script. As long as the drive is connected and powered on, the act of
mounting it spins it up. Umounting it causes it to time out and stop.
Testing using my 20GB drive on SUSE 10.0, running a script does mount
the drive. I don't know about spinning up the drive as it's a quiet
drive and the cooling fans here make a bit too much noise to hear it
unless the enclosure is pressed against my ear.
That's a difference. From a script or an ssh login the mount point
remains in /media as long as the drive is connected and powered on but
is empty unless the USB drive has been mounted.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
|