Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: USB drive dev changes...

  1. #1
    Join Date
    Jul 2009
    Location
    Ba Ria, Viet Nam and New Bern, NC
    Posts
    37

    Question 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?

  2. #2

    Default Re: USB drive dev changes...

    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.)

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,711
    Blog Entries
    1

    Default Re: USB drive dev changes...

    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

  4. #4
    Join Date
    Jul 2009
    Location
    Ba Ria, Viet Nam and New Bern, NC
    Posts
    37

    Default Re: USB drive dev changes...

    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???

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,711
    Blog Entries
    1

    Default Re: USB drive dev changes...

    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.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,840

    Default Re: USB drive dev changes...

    Quote Originally Posted by divinsal View Post
    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 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.
    Henk van Velden

  7. #7
    Join Date
    Jul 2009
    Location
    Ba Ria, Viet Nam and New Bern, NC
    Posts
    37

    Default Re: USB drive dev changes...

    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.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,840

    Default Re: USB drive dev changes...

    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.
    Henk van Velden

  9. #9
    Join Date
    Jul 2009
    Location
    Ba Ria, Viet Nam and New Bern, NC
    Posts
    37

    Default Re: USB drive dev changes...

    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.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,840

    Default Re: USB drive dev changes...

    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 ).

    Try without the uid= clause.
    Henk van Velden

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •