i m running suse 11.2 on a generic desktop machine with two external usb hard disks for data storage. when i restart, the names of the names of the usb disks get changed in /media from exampledisk to exampledisk-1, another boot up and i get exampledisk-2. the data is no longer in exampledisk, but in exampledisk-1 or exampledisk-2.
Part of that video shows adding a label - It’s using Parted Magic
With a USB HD you could install Gparted in your system and use that. You must unmount drives before working on them
thank you, i ll have to try this out. but the drives have labels and are recognised. yet in the /media folder i get multiple entries. it doesn t happen at every restart, only from time to time.
What happens here is that you do not “remove savely” (unmount) the partitions. Thus HAL still has the entries for them when it tries to mount them again and uses the -1, -2, etc numbering to keep them unique. See also: SDB:Basics of partitions, filesystems, mount points - openSUSE. When you understand what is explained there, you will understand that having a label or not will not change the behaviour of the -1, -2, etc. It will only add those numbers to a different (label) name.
From your post I deduct that you use these partitions permanent on the system. In that case you should handle them as every permanent (from boot to shutdown) available partition and use* /etc/fstab*. As a bonus you will them have the possibility to mount them where you want them you ar not bound to the mount points defined by HAL (inside /media).
On 2011-01-07 11:06, hcvv wrote:
>
> What happens here is that you do not “remove savely” (unmount) the
> partitions.
The system should umount them first when powering off, regardless of how they were mounted. However,
there is suspicion that this does not always happen, when fsck runs on boot on those disks (listed
in fstab).
Im guessing that the umount is not done by the desktop, but by the halt script; thus the old
mountpoint is not removed, and on next mount it creates a new mountpoint.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))
better use entries from /dev/disk/by-label or other /dev/disk/by-id directories then /dev/sd* ones. Especialy these USB devices are easily unplugged and plugged again in a different slot and thus they could change from sdb to sdc (or sde), while the by-label or by-id will stay the same.
I am not sure about these VFAT things (I would create native Linux file systems like ext4 on such permanent devices), but I think default is often recommended here. Maybe browse these Forums for other threads on these. The problem is a bit that VFAT c.s. do not have the Linux owner/group/acces-bits and the must be faked in such a way that all users can use the files (or maybe not all, that is something up to you as system manager).
Again that is up to you, but I would never mount these inside /media because /media is allready used for the mounting (by HAL) of all sorts of come and go devices (often seen as “media” because they contain music, movies, pictures). I would choose a mountpoint fit for the use of the contents. But I admit that ideas about this vary. Often people mount at* /mnt/<something>* (or even at /<something>) and then make soft links from e.g. a place inside their home directory to it.
BTW, I doubt if there is something like an option auto. A general option of /etc/fstab is noauto (the main purpose of* /etc/fstab *being to tell the system what to mount on boot and noauto telling NOT to mount on boot).
I think that might be the case. It will be unmounted at shutdown (and thus synced and thus not become corrupted), But not by HAL and HAL’s administration (inside /media) will still think the mountpoint is in use.
On 2011-01-07 12:36, hcvv wrote:
>
> BTW, I doubt if there is something like an option -auto-.
No, auto is the default behaviour.
This is not normally used for external media: if they are not present, boot
will fail at the initial fsck and the stop/warning message is all but clear
to understand.
If left to auto, then use “nofail” as well to avoid that. But then, if they
don’t activate during boot, the system will not warn of the failure. Even
if the command “mount whatever” fails, it will remain silent.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
As already said, never use device names (sdaX, sdbX, etc) for any hd partitions in /etc/fstab. You can use the halinfo script (Displaying partitions infos from hal daemon) to display disk IDs, labels and UUIDS for all your partitions.
Use halinfo -hV to query the hal daemon and halinfo -uV to query the udev daemon with extra verbose output (both outputs are similar). Or use the command blkid.
just one thing: is HAL likely to get upset about mounting those drives in /media via fstab? i understand it is not very elegant, but i have reasons to prefer this option unless HAL is going to croak it (because heaps of files on those drives are linked to a program and cumbersome to link to another location).
HAL does not touch partitions when it sees they are allready cared for in /etc/fstab (I found that in the HAL documentation). Also I doubt that HAL will try to offer something to mount that is allready mounted. No need to worry there.
BTW. You mat still have some loose mountpoints in* /media*. To clean up, these can be removed and when you are sure there is nothing mounted in /media, you can also remove the two files* .hal-mtab* and* .hal-mtab-lock*. That will give HAL a clean start.
On 2011-01-08 12:36, honda185 wrote:
>
> thank you all, very helpful info indeed.
>
> just one thing: is HAL likely to get upset about mounting those drives
> in /media via fstab? i understand it is not very elegant, but i have
> reasons to prefer this option unless HAL is going to croak it (because
> heaps of files on those drives are linked to a program and cumbersome to
> link to another location).
I’m not 100% sure. I have see some times strange things that could be
caused by using that directory.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)