Re: udev and automounting

2007-10-10 Thread Celejar
On Sat, 29 Sep 2007 08:55:23 -0700
Andrew Sackville-West <[EMAIL PROTECTED]> wrote:

> On Sat, Sep 29, 2007 at 11:27:35AM -0400, Max Hyre wrote:
> > Andrei Popescu wrote:
> >> The package usbmount might be what you need.
> >
> >The description of usbmount says:
> >
> > This package automatically mounts USB mass
> > storage devices (typically  USB pens) when they
> > are plugged in, and unmounts them when they are
> > removed.
> >
> >Does this limit filesystems to FAT?  FAT doesn't care if you rip it out 
> > without doing any cleanup.  If you've formatted your thumbdrive as an ext2 
> > filesystem, how can it be properly unmounted if you simply unplug it?  
> > Won't that mean you have to run fsck every time you plug it in again?
> 
> maybe mount with sync instead of async, though mount warns of
> life-shortening possibilities with flash stuff. probably a good idea
> to go for noatime also to help coutneract that. Both of those would
> minimise the risk of damage -- so long as the current process was
> done, you could pull it. that just a guess. check man mount.

>From the usbmount README:


> Vfat Filesystems
> 
> 
> Filesystems of type vfat are not considered by default, despite being
> popular for many USB devices, because the Linux kernel does not yet
> fully implement sync-mounting for this filesystem type. This means that
> you risk losing data or even corrupting the filesystem if you remove the
> medium before all data has been written to it. If you include vfat in
> the FILESYSTEMS configuration variable, you *MUST* run the 'sync'
> command before removing the device.

So ext works via sync-mounting, and vfat requires manual syncing.

> A

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev and automounting

2007-09-29 Thread André Berger
* Jesus Arocho (2007-09-28):
> Try an entry in /etc/udev/10-local.rules; great howtos on the net.
> 
> On Thursday 27 September 2007 07:50, Dan H wrote:
[...]

There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html

-André

-- 
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from 
...
..
.



Re: udev and automounting

2007-09-29 Thread André Berger
* Jesus Arocho (2007-09-28):
> Try an entry in /etc/udev/10-local.rules; great howtos on the net.
> 
> On Thursday 27 September 2007 07:50, Dan H wrote:
[...]

There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html

-André

-- 
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from 
..
.



Re: udev and automounting

2007-09-29 Thread Douglas A. Tutty
On Sat, Sep 29, 2007 at 08:24:51PM -0400, Max Hyre wrote:
> Andrei Popescu wrote:
> >You could also run 'sync;umount /dev/sda1' before unplugging, just to be 
> >sure.
> 
>Umm, OK.  But that sort of obviates the point of 
> usbmount.  I guess I'll just continue to umount by hand.

I don't use any sort of automounting or unmounting.  I don't have
NFS-homes (the traditional UNIX automounter setup).  This is a UNIX-like
OS, although its lookin more and more like a Windows-like OS.

I label the filesystems on anything I want users to mount.  I then have
per-label mount points and lines in fstab; users are responsible for
their own mounts and umounts and any damage they do.  Then again, I
don't have that many devices.

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev and automounting

2007-09-29 Thread Max Hyre

Andrei Popescu wrote:
You could also run 'sync;umount /dev/sda1' before unplugging, just to be 
sure.


   Umm, OK.  But that sort of obviates the point of 
usbmount.  I guess I'll just continue to umount by hand.



Best wishes,

Max Hyre


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: udev and automounting

2007-09-29 Thread André Berger
* Jesus Arocho (2007-09-28):
> Try an entry in /etc/udev/10-local.rules; great howtos on the net.
> 
> On Thursday 27 September 2007 07:50, Dan H wrote:
[...]

There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html

-André

-- 
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from 
.



Re: udev and automounting

2007-09-29 Thread Andrei Popescu
On Sat, Sep 29, 2007 at 08:55:23AM -0700, Andrew Sackville-West wrote:
> On Sat, Sep 29, 2007 at 11:27:35AM -0400, Max Hyre wrote:
> > Andrei Popescu wrote:
> >> The package usbmount might be what you need.
> >
> >The description of usbmount says:
> >
> > This package automatically mounts USB mass
> > storage devices (typically  USB pens) when they
> > are plugged in, and unmounts them when they are
> > removed.
> >
> >Does this limit filesystems to FAT?  FAT doesn't care if you rip it out 
> > without doing any cleanup.  If you've formatted your thumbdrive as an ext2 
> > filesystem, how can it be properly unmounted if you simply unplug it?  
> > Won't that mean you have to run fsck every time you plug it in again?
> 
> maybe mount with sync instead of async, though mount warns of
> life-shortening possibilities with flash stuff. probably a good idea
> to go for noatime also to help coutneract that. Both of those would
> minimise the risk of damage -- so long as the current process was
> done, you could pull it. that just a guess. check man mount.

You could also run 'sync;umount /dev/sda1' before unplugging, just to be 
sure.

Regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)


signature.asc
Description: Digital signature


Re: udev and automounting

2007-09-29 Thread Andrew Sackville-West
On Sat, Sep 29, 2007 at 11:27:35AM -0400, Max Hyre wrote:
> Andrei Popescu wrote:
>> The package usbmount might be what you need.
>
>The description of usbmount says:
>
>   This package automatically mounts USB mass
>   storage devices (typically  USB pens) when they
>   are plugged in, and unmounts them when they are
>   removed.
>
>Does this limit filesystems to FAT?  FAT doesn't care if you rip it out 
> without doing any cleanup.  If you've formatted your thumbdrive as an ext2 
> filesystem, how can it be properly unmounted if you simply unplug it?  
> Won't that mean you have to run fsck every time you plug it in again?

maybe mount with sync instead of async, though mount warns of
life-shortening possibilities with flash stuff. probably a good idea
to go for noatime also to help coutneract that. Both of those would
minimise the risk of damage -- so long as the current process was
done, you could pull it. that just a guess. check man mount.



A


signature.asc
Description: Digital signature


Re: udev and automounting

2007-09-29 Thread Max Hyre

Andrei Popescu wrote:

The package usbmount might be what you need.


   The description of usbmount says:

This package automatically mounts USB mass
storage devices (typically  USB pens) when they
are plugged in, and unmounts them when they are
removed.

   Does this limit filesystems to FAT?  FAT doesn't care if 
you rip it out without doing any cleanup.  If you've 
formatted your thumbdrive as an ext2 filesystem, how can it 
be properly unmounted if you simply unplug it?  Won't that 
mean you have to run fsck every time you plug it in again?



Best wishes,

Max Hyre


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: udev and automounting

2007-09-29 Thread André Berger
* Jesus Arocho (2007-09-28):
> Try an entry in /etc/udev/10-local.rules; great howtos on the net.
> 
> On Thursday 27 September 2007 07:50, Dan H wrote:
[...]

There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html

-André

-- 
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from 



Re: udev and automounting

2007-09-28 Thread Jesus Arocho
Try an entry in /etc/udev/10-local.rules; great howtos on the net.

On Thursday 27 September 2007 07:50, Dan H wrote:
> Hello,
>
> I'm really having trouble getting my head around udev and udev rules for
> removeable USB devices. When I plug in my USB stick, it automounts under
> /media/sda1. What I don't like is that I have to "su" to write to the stick
> and to unmount it again, so this automounting is pretty useless. I've tried
> to decipher the files under /etc/udev to find the rule that actually mounts
> stuff, but grepping for "mount" just shows me some unmounting detail in a
> file called "hal.rules".
>
> What I'd like is:
>
> 1. Automounting USB mass storage devices under some unique name determined
>by the label of the partition
>
> 2. Write access and unmounting by normal user.
>
> I've seen this work transparently under Gnome and KDE, but I use fvwm or no
> X at all so that's no option for me.
>
> Thanks
> --D.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev and automounting

2007-09-27 Thread Andrei Popescu
On Thu, Sep 27, 2007 at 01:50:11PM +0200, Dan H wrote:
> Hello,
> 
> I'm really having trouble getting my head around udev and udev rules for 
> removeable USB devices. When I plug in my USB stick, it automounts under 
> /media/sda1. What I don't like is that I have to "su" to write to the stick 
> and to unmount it again, so this automounting is pretty useless. I've tried 
> to decipher the files under /etc/udev to find the rule that actually mounts 
> stuff, but grepping for "mount" just shows me some unmounting detail in a 
> file called "hal.rules".
> 
> What I'd like is:
> 
> 1. Automounting USB mass storage devices under some unique name determined
>by the label of the partition
> 
> 2. Write access and unmounting by normal user.
> 
> I've seen this work transparently under Gnome and KDE, but I use fvwm or no X 
> at all so that's no option for me.
 
The package usbmount might be what you need.

Regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)


signature.asc
Description: Digital signature


Re: udev and automounting

2007-09-27 Thread Douglas A. Tutty
On Thu, Sep 27, 2007 at 01:50:11PM +0200, Dan H wrote:
> Hello,
> 
> I'm really having trouble getting my head around udev and udev rules
> for removeable USB devices. When I plug in my USB stick, it automounts
> under /media/sda1. What I don't like is that I have to "su" to write
> to the stick and to unmount it again, so this automounting is pretty
> useless. I've tried to decipher the files under /etc/udev to find the
> rule that actually mounts stuff, but grepping for "mount" just shows
> me some unmounting detail in a file called "hal.rules".
> 
> What I'd like is:
> 
> 1. Automounting USB mass storage devices under some unique name
> determined by the label of the partition
> 
> 2. Write access and unmounting by normal user.
> 
> I've seen this work transparently under Gnome and KDE, but I use fvwm
> or no X at all so that's no option for me.

I've never had a problem; I've never used automount.

What type of filesystem is on the USB and who created it?  If root
created an ext2, then it belongs to root.  You would want to create it
as your own user.  If its FAT* then use the UID/GID mount options.

Put the mount point in /etc/fstab and use the user option.

You can use the LABEL= instead of a device name and create per-LABEL
mount points and put them all in fstab.

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]