[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: firewire/usb2.0 storage & automounting
> > automounting of a volume on a usb or firewire hard drive doesnt do
>anything
> > at all. i know the current limitation of the automounting on firewire
>is
> > that the current up to date RH9 linux kernel doesnt map hotplugged
>firewire
> > devices to dev nodes yet (such as /sda or /scda), but instead only does
>so
> > on boot.
>
>Not necessarily. It's a kernel problem though. If you think about it,
>the kernel knows about the cdrom drive, thus it can monitor it for a
>change in status. It'll require code in the kernel to monitor the
>firewire bus looking for specific file systems to become available. It
>should not be hard but it will require some work to account for the
>various (albiet only a few) firewire to ide adapters.
i think a userspace app could do it easily enough assuming you are looking
for a device that already has a filesystem on it. fdisk -l /dev/sd? should
print a list of all found partitions on all your scsi hard drives (havent
tried it, but im pretty sure it should work)
>
> > this isnt a big deal (this is fixed in newer kernel versions and
> > in the subversion tree of the ppl doing the firewire drivers).
>
>Excellent.
>
> > my problem
> > is that when i hook up this hard drive through usb or through firewire,
>its
> > never automounted.
>
>Right. You may be able to use some of the hooks from USB (is there not a
>usb daemon or something?) but firewire is another story.
i might have to come up with the monitoring daemon myself and set it up to
watch both channels, i would prefer that it doesnt have to sit and keep
polling looking for changes but rather gets notified of changes. i probably
would set it up in such a way that it used scripts to do the bulk of its
work and make it so that polling or notifications either or would be
invisable to said scripts.
>
> > ideally i would like it automounted either to the
> > desktop of the current logged in user or into /mnt and a link be made
>for
> > the desktops of all the users. ive been googling and havent yet found a
> > real solution to this.
>
>Here should be the quick and dirty. Run the rescanscsibus script linked
>here:
>
>http://www.rimboy.com/firewire/
>
>on a regular basis. It should find the drive which should hopefully cause
>automounter to realize there's a new device. YMMV.
i will have to try it and see what it does in my situation. i have a
usb/firewire drive bay and a straight firewire drive bay. also have the
same model usb/firewire bay at work that i can borrow to do testing against.
>
> > one thing to keep in mind is that the first usb device the system sees
>is
> > /dev/sda and the second is /dev/sdb, but the icons the user sees
>shouldnt
> > scream out that the /dev/sd? path is different if the devices were
>plugged
> > in in reverse order
>
>Ok. You need to use the filesystem label support that's generally
>available as an option to mkfs. If you notice RH is doing something along
>the lines of:
>
>LABEL=/home /home xfs defaults 1 2
>
>Basically, the LABEL statement is telling mount that rather than address
>by /dev/ entry, find the drive with that lable and mount accordingly (this
>info is contained in the above link to my site). ext2 and 3 should
>support the LABEL option, along with some other filesystems.
>
im not sure that this needs to be in fstab though, as these are removable
drives subject to the whim of the owner. im not opposed, but im not sure
that its needed. also the idea is that new devices the user tries to attach
are automagically mounted and an icon made on the user's desktop.
> > this automounter should be able to be set to mount certain file system
>types
> > as read only always (such as ntfs) and also set permissions so that
>other fs
> > types are mounted rw for a certain group and ro for everyone else.
>
>That to me sounds like an option to specify in your fstab.
yeah, its a mounting option definately, be it done in fstab or done on the
command line when the script/daemon mounts the drive. i would associate the
setting with the config file for the watching/mounting daemon.
>
> > maybe even unmount after 30 or 60 seconds if inactivity but as long as
>the
> > device is still physically plugged in the icon remains on the users
>desktop.
>
>I would not do that... It would complicate matters. I would force the
>issue though about unmounting before removing. I can see where your idea
>would pay off, but it's still pretty risky.
if we could have it auto remount when that path was needed again, that
should remove the risk. im just wanting to ensure data integrity of whats
on the drive, ensure that any disk buffers have been flushed to the drive.
an idle timeout dismount is just one way to do that. im sure there are
better ways.
>
> > does anyone know of a direction i might start looking in for this? i
>have
> > now fully switched my home system over to rh9 and find having to su and
> > mount annoying when i just want to ro mount my usb drive to listen to an
>mp3
> > or watch a video. im not against trying to tackle writing/implimenting
>this
> > myself but im curious as to what else ppl have done before me towards
>this
> > end.
>
>Look into the "user" option that's available as an option to fstab.
>
i had thought about it, but still i have to either set up a script that i
can easily dbl click or open a terminal and mount it manually. this is what
im wanting to avoid. i want it mounted all on its own with me just plugging
it into the machine.
its something that macos and beos both do (i prefer how beos does its
mounts, but then again beos was a touch more of a geek os than macos). hook
in the drive and bamb, an icon for it appears on the desktop. with windows
you plug it in and it gets a drive letter (and keeps the same drive letter
usually as it stores the drive letter and drive serial number in the
registry). this is something that i think linux could benefit from.
of course now i suppose the best thing would be to impliment it on my
machine how i want it implimented and then release to the community to see
how they like it.
now for a slightly different thing, any way to figure out what usb/1394
physical device that /dev/sda is?
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.