USB drive dev changes...

I have a HP desktop box, running 10.3 for the moment, that has a 250 MB SEAGATE USB drive and a 1 TB HP Personal Media Drive divided into 4 partitions of ext3 file type. Before I installed the PMD, the Seagate USB would occupy /dev/sdb1. After I installed the PMD, I had a bear of a time figuring out where everything went. The devices wandered around a bit with the Seagate finally settling back down on /dev/sdb1 but the PMD wanders from sdc to sdf to sdg, seemingly at random, or at least in no discernable pattern. This makes the fstab entries invalid and I have to mount the partitions manually, which kind of stinks for an unattended server. Any ideas on how to get them to attach to the same /dev device consistently?

Search Google or another search engine of your choice for Disklabels and how to set them for the respective file systems your are using.

Also do not put any external USB device into fstab.

Another useful toll are UUIDs (you can search for them, too.)

Hi divinsal

To add to this discussion, external devices are normally handled dynamically by hal/desktop environment. As already explained by Akoellh, you can add a disk label to each partition on your external storage media, so that they get unique mount-point names within the /media directory. I recommend you have a read of this:

SDB:Basics of partitions, filesystems, mount points - openSUSE

I put the following line in fstab:

LABEL=HPPMD4 /ar4 ext3 …

At boot or if I try to do a mount like “mount /ar1” I get:
mount: wrong fs type, bad option, bad superblock on /dev/disk/by-label/HPPMD4,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

but if I do: mount /dev/disk/by-label/HPPMD1 /ar1

it works. Could this be a 10.2 problem???

I put the following line in fstab:

There’s your mistake right there. As already stated by Akoellh

Also do not put any external USB device into fstab.

For ext2/ext3 partitions, you can use e2label. For example

e2label /dev/sdb1 backup

Type ‘man e2label’ for more info.

I guess: you said it is an ext3 filesystem in your fstab entry. But in real life it is not, but NTFS or so. And as you do not mention the fstype in the mount statement, mount tries to detect it and succeeds in finding out what it is.

It is a guess, because like many people who are to lazy to give **complete **information to us when hey ask help from us, you have not given the complete copied/pasted entry from your /etc/fstab (or do you swear it ends in …?) nor the copied/pasted mount command. You should reread the SDB page deano_ferrari gave you, because it tells you there how /etc/fstab and the mount command interact.

I am not completely with those who say you should not put USB mass storage in your fstab. As HAL may mount it where you do not want it (see the SDB) and as HAL will not mount when it is in the fstab, it is a good way to mount those mass storage devices you have often (permanent) attached on a place of your choice. Too many people talk about ‘interna’ and ‘external’ disks, but I mostly do not indicate what they mean with it. Some mean ‘inside’ or ‘outside’ of th iron/platic box that contains among other things the motherboard (for those: what about SCSI disk in a seperate box?). Others mean USB vs. other types of connection (for those: I can have an USB disk internal in my box).

One should more look at the usage made of the device. Coming and going CDs, DVDs, USB sticks with pictures, movies, music? That looks more like letting it be automated by HAL on /media. Permanent storage for the system or the user? Use /etc/fstab, it is not different from your / or /home.

The fstype is ext3. It was repartitioned and formatted and fsck verifies this. When it does mount it shows as ext3. I can make the system mount the fs where I want it but I want to know WHY the fstab entry does not work with LABEL=.

I am just a tad OCD when something does not work. I need to have all my mount choices in one place and that is fstab. I could use /media and LINK the directories to the entries therein but this would restrict the options. Oh, well. I am moving the seagate to my 11.0 machine and will see what we will see.

I really appreciate all the feed back.

Just use /dev/disk/by-label/<the-label> as device special file in /etc/fstab. Should work. Of course replace <the-label> with HPPMD4 if that is the label. You can check this by looking in /dev/disk/by-label/ when the thing is attached.

Same result BUT…

LABEL=HPPMD1 /ar1 ext3 rw,uid=aruser 0 2
fails the command “mount /ar1”
LABEL=HPPMD1 /ar1 ext3
works with “mount /ar1”.

What is unique? HPPMD1 is a HP Personal Media Drive that has been fsdisk’ed and mkfs.ext3. fsck shows everything fine. Somewhere in the bowels of the kernel it stumbles over the options when trying to parse/mount. This does not happen with normal internal disk drive partitions, eg. the fstab entry:

“LABEL=USR /usr ext3 …options… 1 2” works fine and mounts at boot time.

I am going to try it on 11.1 as soon as it is downloaded.

When I look in man mount at the chapter about *ext3 *mount options, I fail to see the option *uid=… *I also fail to see what it should do when it would exist (but maybe my imagination i not big enough :wink: ).

Try without the uid= clause.

Good point. The uid= option is not in other entries for ext3 fstypes in the fstab. I’ll fix the options, with the fine book, open to mount. I’ll let you know. And thanks again.

It was a bad option! I had copied the entry for the seagate drive which is ntfs and had the uid= and gid= options… Duh.

I feel so much better now. I just hate it when it is so obvious… to someone else.

Thanks to all of you. As I used to tell me clients, RTFB!!! “Read The Fine Book”

That is not a good argument. What isn’t there could be there when needed. But for ext3 it is nonsense and what is important, it is not in the documentation. One should alwys try to understand what things are supposed to do and not copy from another statement without comtemplating why it does what it does.

Anyhow, congrats you got it working.