suse 11.2 changes folder names on usb drives on startup

FWIW, to sum up what i ve done and to report success, here s my fstab again, with mount points and permissions for the vfat drives in red. of course joe is the name of the user who can read+write on these drives. i ve rebooted 3 times since - just to check it all - and it all seems to work.


/dev/disk/by-id/ata-ST3120827-part5       swap      swap       defaults                          0 0
/dev/disk/by-id/ata-ST3120827-part3       /ext3       acl,user_xattr                  1 1

/dev/disk/by-label/Elements                 /media/Emu-1       vfat         rw,uid=joe,umask=000     0 0
/dev/disk/by-label/LaCie                       /media/Lala-1        vfat          rw,uid=joe,umask=000    0 0

proc                /proc                proc       defaults                0 0
sysfs               /sys                  sysfs      noauto                 0 0
debugfs          /sys/kernel/debug    debugfs    noauto       0 0
usbfs              /proc/bus/usb           usbfs        noauto            0 0
devpts            /dev/pts                   devpts      mode=0620,gid=5       0 0

these permissions are essential, coz the old vfat doesn t recognize file permissions, even though it pretends to do so: you get the file permissions showing up in the console, but changing them is not possible. don t even bother with file manager as superuser. the umask=000 gives you drwxrwxrwx (if that s what you want).

Glad you solved the issue. There might be a simpler solution you may want to check for future reference.

I had this problem some time ago, in oS 11.0 IINM. A pen drive was reamed to <volumename>_1 in /media and would not go back to <volumename> whatever I tried.

Then I noticed that the mount daemon would create a hidden lock file and reference to each folder in /media while in use, and delete them when the drive was unmounted. The pendrive in question was mounted when the system restarted (probably due to a power failure/reset accidentally pressed), so the .lock file was never deleted, and the mount system would then append the _1, _2, etc.

Simply deleting the hidden files in /media solved the problem. I don’t know if, with all the changes in hal, etc., this is still valid, but it may be worth a try.

thank you, that is the explanation of the problem and a simpler way to fix it.

and now, as far as i can tell, putting the drives in fstab means that hal doesn t create a lock file for them.

Yes, I told you earlier in this thread that HAL does do nothing when there is an an fstab entry for the device.

I also showed you above that HAL’s administartion in* /media* can be deleted without any problem when no devices handled by HAL are mounted. BTW you can check if the HAL administration is clean when no HAL mounts are active, by looking at the size of those files. They should be 0 then. That also means that a simple

>.hal-mtab
>.hal-mtab-lock

will also clean HAL’s administration, but

rm .hal-mtab .hal-mtab-lock

is simple enough and HAL wil recreate them when needed.

As you are aware of the fact that VFAT misses a lot of the features a native Linux file system has and as you seem to have these devices connected all the time to your openSUSE system (not connecting it ever to a MS system), you would be better off when you created native Linux file systems (like ext3 or ext4) on them. Then you would have all the security features like ownership by user and group and access bits in place (and a correct time stamp, we just learned from another thread here that VFAT has only a 2 secs granularity in it’s timestamp).

formatting in ext3 or 4 will be the way to go when i buy the next drive; at the moment i m lacking the diskspace to free a drive for formatting. i ll also get a UPS (writing from brisbane…).
but for now fstab was the way to go, i have a lot of data on those drives, with some weird filenames, and having that data moved to xxx-1 is a nuisance. some links inevitably break, even when moving it back to xxx.

OK, I think you have all under control, knowing what you are doing and why. That is the most important.
Good luck.

On 2011-01-12 04:06, honda185 wrote:
> FWIW, to sum up what i ve done and to report success, here s my fstab
> again, with mount points and permissions for the vfat drives in red. of
> course joe is the name of the user who can read+write on these drives. i
> ve rebooted 3 times since - just to check it all - and it all seems to
> work.

One more detail: they are external disks, listed in fstab. If they are not
available on boot, boot will “crash”. You will get to a prompt to “repair”
your system with no partitions mounted except “/”. The messages at that
point are unclear, it seems at first sight that you are requested to fsck
partitions.

In this situation, I use either the option “noauto” or “nofail”. The first
one doesn’t attempt to mount; the second one will give no warning/error if
mounting fails.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

thank you, suggestion appreciated, i add “nofail”.