Setting mount options for hotpluggable devices
Hi list - I just bought a big external disk as a back-up for my PC. What I want to do is to copy the homes and data directories to this disk, keeping the directory structure intact and then regularly synchronise them with my home pc (partly) my work pc with rsync or unison. So far so good, mounting of the external disk works. The problem is that the disk has (of course) a Win*** file system (FAT 32 LBA) that does not know about lower and uppercase filenames. In principle I see two ways around this: a) Re-formatting the disk with reiserfs or ext3 or so. I tried that first with my memory stick: Formatting with Yast partition. This gave me some problems like now it is detected but always owned by root and I apparently cannot change that (even as root) and sometimes I got 0K free and 0K available (although 250MB should have been available). Summarising, it just does not work - probably I did something wrong. b) Quicker fix: set mount option for the disk to shortname=winnt. My question is: How can I set the mount options for the disk (can also be set for all USB storages, since they normally come as FAT32) within the hal/udev system? Any pointers? TIA gl P.S.: Sorry if this is off-topic for this list - I expect I will in this case punished with an eerie silence.... -- Günter Lichtenberg ========>mailto:lichten@sron.nl
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guenter Lichtenberg escribió:
My question is: How can I set the mount options for the disk (can also be set for all USB storages, since they normally come as FAT32) within the hal/udev system? Any pointers?
Hi: I don't know if this I write you will help you: I have differents external HDs (usb) and format all to fat32 for use them with winXP. I have only this line on my /etc/fstab -> /dev/sda1 /usb1 auto noauto,user 0 0 I can mount by hand on /usb1 or automount on kde-konqueror (media:/). Cheers - -- Chema Ollés Usuario Linux: #198057 Linux 2.6.14-rc3-g82984114 #1 SMP Sat Oct 8 15:39:19 CEST 2005 i686 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDWM7f65SpD7GhbzoRAmICAJ0bU9GPe9OinaUTdHjBrfe+vW77QQCdHz0T smjGcD/ZIUTNSZC7Ltg//98= =NMKS -----END PGP SIGNATURE-----
On Friday 21 October 2005 13:19, Chema Ollés wrote:
Guenter Lichtenberg escribió:
My question is: How can I set the mount options for the disk (can also be set for all USB storages, since they normally come as FAT32) within the hal/udev system? Any pointers?
I have only this line on my /etc/fstab -> /dev/sda1 /usb1 auto noauto,user 0 0 I can mount by hand on /usb1 or automount on kde-konqueror (media:/). Cheers
Hi - thanks for the answer, but I was looking for a way to change the mount options for hotpluggable device, i.e. let the device mount automatically. If I put them into the fstab, I would need to remember in which USB port I plugged the stick/disk in, AFAIK I don't get the same device assigned to the same USB disk/stick. If I put the stick into a USB port it gets assigned to /dev/sdx where x can be anything from a-z. Automatic mounting via hal/udev (or subfs?) takes care of that, which is why I would like to keep the automatic mounting. Ciao gl -- Günter Lichtenberg ========>mailto:lichten@sron.nl
Friday 21 Oct 2005 18:40 samaye Guenter Lichtenberg alekhiit:
plugged the stick/disk in, AFAIK I don't get the same device assigned to the same USB disk/stick. If I put the stick into a USB port it gets assigned to /dev/sdx where x can be anything from a-z.
My USB flash drive always gets registered as /dev/sdb, since I have one 80 GB SATA HDD which is /dev/sda. IIAN wrong, the particular USB port which you plug your device in does not matter. USB is just an interface. The name of the device under /dev will go by what *kind* of device it is rather than what USB port it goes into. I have one printer, one digital tablet, one UPS and sometimes one flash drive plugged randomly into my USB ports. I've never had to make any changes in configuration just because I changed the USB port I plugged the device into. HTH, Shriramana Sharma.
On Friday 21 October 2005 17:37, Shriramana Sharma wrote:
Friday 21 Oct 2005 18:40 samaye Guenter Lichtenberg alekhiit:
plugged the stick/disk in, AFAIK I don't get the same device assigned to the same USB disk/stick. If I put the stick into a USB port it gets assigned to /dev/sdx where x can be anything from a-z.
I have one printer, one digital tablet, one UPS and sometimes one flash drive plugged randomly into my USB ports. I've never had to make any changes in configuration just because I changed the USB port I plugged the device into.
IMHO not entirely true. If you plug in more than one storage device, it depends on the order (just tested it). The first plugged in (or better recognised) gets /dev/sde1, the second /dev/sdf1. For my problem it would be probably good enough to remember to plug the disk in and switch it on before I plug another stick in. Then I could just set the options in fstab - but I would like the other option - using properly configured hotplugs - better. Greetings gl -- G�nter Lichtenberg ========>mailto:lichten@sron.nl SRON (EOS) Sorbonnelaan 2 3584 CA UTRECHT the Netherlands Tel.: +31 30 253 5719 FAX : +31 30 254 0860
Hello, Am Freitag, 21. Oktober 2005 12:26 schrieb Guenter Lichtenberg: [...]
a) Re-formatting the disk with reiserfs or ext3 or so. I tried that first with my memory stick: Formatting with Yast partition. This gave me some problems like now it is detected but always owned by root and I apparently cannot change that (even as root)
mount it and chmod/chown it then. If it is automounted, first "cd" into the directory and then call "chown/chmod ."
and sometimes I got 0K free and 0K available
That's an automount-related problem. Again, cd into /media/where-it-is and call "df ." Also note that journaling filesystems need some space for the journal etc. - but this shouldn't take all the space on a 256 MB stick.
b) Quicker fix: set mount option for the disk to shortname=winnt.
My question is: How can I set the mount options for the disk (can also be set for all USB storages, since they normally come as FAT32) within the hal/udev system? Any pointers?
Untested: Have a look at the 10.0 release notes - they describe how to automount without sync option. Maybe you can also add other options this way. (Danny, are you out there? ;-) Is my guess correct?) Regards, Christian Boltz -- Hmm ... Du meinst das RamA ... Das macht das Frühstück gut ... denn wenn Du RamA verwendest, dann meckert die Frau nicht, wenn Du schon zum Frühstück vor dem Rechner sitzt. [Konrad Neitzel in suse-linux]
On Friday 21 October 2005 23:26, Christian Boltz wrote:
always owned by root and I apparently cannot change that (even as root)
mount it and chmod/chown it then.
If it is automounted, first "cd" into the directory and then call "chown/chmod ."
OK, I'll try that.
and sometimes I got 0K free and 0K available
That's an automount-related problem. Again, cd into /media/where-it-is and call "df ."
That's what I did - I think?
Also note that journaling filesystems need some space for the journal etc. - but this shouldn't take all the space on a 256 MB stick.
Yes I know...
My question is: How can I set the mount options for the disk (can also be set for all USB storages, since they normally come as FAT32) within the hal/udev system? Any pointers?
Untested: Have a look at the 10.0 release notes - they describe how to automount without sync option. Maybe you can also add other options
I overlooked that (sorry), it is worth a try. I tried out to back-up my directory to the manually mounted FAT 32 system, but it is really to much trouble. While I got most of the uppercase/lowercase problems solved (only if I have two directories named DIR and dir I get a problem, but I shouldn't have that) Kmail (and maybe others) has names with ':' in it which don't get copied. So I will go on and format the disk to reiserfs. If I need to set special mount options I try out if I can do it like described in the release notes. Thanks to all gl -- G�nter Lichtenberg ========>mailto:lichten@sron.nl
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guenter Lichtenberg escribió:
Hi list - I just bought a big external disk as a back-up for my PC. What I want to do is to copy the homes and data directories to this disk, keeping the directory structure intact and then regularly synchronise them with my home pc (partly) my work pc with rsync or unison. So far so good, mounting of the external disk works.
Hi. Now,I have a similar problem with an usb mount ro because is a ntfs partition. I read this messages: Oct 23 18:06:34 linux hal-subfs-mount[16700]: NTFS partition detected. Mount readconly, if you want mount as rw add key 'volume.policy.mount_option.rw=true' to the device in HAL I don't know anything about hal. Where can I write this option? cheers - -- Chema Ollés Usuario Linux: #198057 Linux 2.6.14-rc3-g82984114 #1 SMP Sat Oct 8 15:39:19 CEST 2005 i686 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDW7vU65SpD7GhbzoRArtqAJ4yi1EnDsMJZWY30CNz4SoHGLq0WgCgnyS5 9VfG1tXXOSNW98mRGH4WjjI= =v92h -----END PGP SIGNATURE-----
Guenter Lichtenberg wrote:
The problem is that the disk has (of course) a Win*** file system (FAT 32 LBA) that does not know about lower and uppercase filenames. In principle I see two ways around this:
could you create a cramfs file on the flash device and use a loopback mount to store your data there? this would (a) give you long file names (b) give compression Paul
On Monday 24 October 2005 12:15, Paul Mansfield wrote:
could you create a cramfs file on the flash device and use a loopback mount to store your data there?
this would (a) give you long file names (b) give compression
Paul - thank you for the suggestion, but as I mentioned above I just re-formatted the disk to reiserfs and use it as a back-up. (this had the nice effect of apparently making the file transfer much faster) gl -- G�nter Lichtenberg ========>mailto:lichten@sron.nl
participants (6)
-
Chema Ollés
-
Christian Boltz
-
Guenter Lichtenberg
-
Günter Lichtenberg
-
Paul Mansfield
-
Shriramana Sharma