how can I stop Redhat 9 from reordering scsi drives - Redhat

This is a discussion on how can I stop Redhat 9 from reordering scsi drives - Redhat ; I only sometimes have my backup scsi drives powered up, when I do, I then insmod the scsi module for the adaptec card to do a backup on the tape drive. My question is, sometimes I have my flash SD ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: how can I stop Redhat 9 from reordering scsi drives

  1. how can I stop Redhat 9 from reordering scsi drives


    I only sometimes have my backup scsi drives powered up,
    when I do, I then insmod the scsi module for the
    adaptec card to do a backup on the tape drive.
    My question is, sometimes I have my flash SD card
    reader (SanDisk Cruzer) plugged into USB and because RH 9
    is using the ide-scsi for it, it considers it a scsi device. Because
    of this sometimes the scsi devices are reordered
    and so the devices I have in the
    /etc/fstab don't always match to the
    devices. This makes it annoying because I can't
    then just type "mount /mnt/ibm" or "mount /mnt/micropolis"
    because the devices don't match.

    Is there some way to force Redhat to
    map the drives consistently always (ie map them
    only by the scsi id since that doesn't change).
    Another way would be if the USB Cruzer device could
    be forced to always be considered the last one if
    it's seen?
    Then the scsi drives would always map the same
    whether it was plugged in or not?

    Mark

  2. Re: how can I stop Redhat 9 from reordering scsi drives

    Mark wrote:
    > I only sometimes have my backup scsi drives powered up,
    > when I do, I then insmod the scsi module for the
    > adaptec card to do a backup on the tape drive.
    > My question is, sometimes I have my flash SD card
    > reader (SanDisk Cruzer) plugged into USB and because RH 9
    > is using the ide-scsi for it, it considers it a scsi device. Because
    > of this sometimes the scsi devices are reordered
    > and so the devices I have in the
    > /etc/fstab don't always match to the
    > devices. This makes it annoying because I can't
    > then just type "mount /mnt/ibm" or "mount /mnt/micropolis"
    > because the devices don't match.
    >
    > Is there some way to force Redhat to
    > map the drives consistently always (ie map them
    > only by the scsi id since that doesn't change).
    > Another way would be if the USB Cruzer device could
    > be forced to always be considered the last one if
    > it's seen?
    > Then the scsi drives would always map the same
    > whether it was plugged in or not?
    >
    > Mark


    Have you thought of mounting them the way Red Hat wants you to? E.g.,
    some of the entries in my /etc/fstab are like this:

    LABEL=/dataA /dataA ext2 defaults 1 2
    LABEL=/data0 /data0 ext2 defaults 1 2
    LABEL=/data1 /data1 ext2 defaults 1 2
    LABEL=/data2 /data2 ext2 defaults 1 2
    LABEL=/data3 /data3 ext2 defaults 1 2

    You cannot tell, nor do you need to, on what drives these file systems
    reside. Since I never plug anything in or out, I happen to know that
    /dataA is on /dev/hda10, that /data0 is on /dev/sda1, /data1 is on
    /dev/sdb1, /data2 is on /dev/sdc1, and /data4 is on /dev/sdd1. But if I
    unplugged one of those drives, the others would still be found. Or if I
    fiddled with their SCSI ID numbers, then provided I made no duplicates,
    everything should work just fine.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 23:55:00 up 3 days, 20:10, 2 users, load average: 4.42, 4.27, 4.20


  3. Re: how can I stop Redhat 9 from reordering scsi drives

    In article <4070d733$0$12165$61fed72c@news.rcn.com>,
    Mark writes:
    >
    > I only sometimes have my backup scsi drives powered up,
    > when I do, I then insmod the scsi module for the
    > adaptec card to do a backup on the tape drive.
    > My question is, sometimes I have my flash SD card
    > reader (SanDisk Cruzer) plugged into USB and because RH 9
    > is using the ide-scsi for it, it considers it a scsi device. Because
    > of this sometimes the scsi devices are reordered
    > and so the devices I have in the
    > /etc/fstab don't always match to the
    > devices.


    Are you saying that when you boot, the USB device is /dev/sda, but after
    inserting the module for the Adaptec controller, the USB device becomes
    /dev/sdb? If so, I don't believe that's the way it should work.

    If you're saying that the backup device becomes /dev/sda or /dev/sdb
    depending upon whether or not you plugged in the USB device first, then
    I'd suggest that you simply compile the Adaptec driver into the module,
    forcing your hard disk to become /dev/sda and the USB device (when
    present) to be /dev/sdb. If there's some reason you can't or won't do
    this, then please elaborate.

    --
    Rod Smith, rodsmith@rodsbooks.com
    http://www.rodsbooks.com
    Author of books on Linux, FreeBSD, and networking

  4. Re: how can I stop Redhat 9 from reordering scsi drives

    Jean-David Beyer writes:
    > Have you thought of mounting them the way Red Hat wants you to? E.g.,
    > some of the entries in my /etc/fstab are like this:
    >
    > LABEL=/dataA /dataA ext2 defaults 1 2
    > LABEL=/data0 /data0 ext2 defaults 1 2
    > LABEL=/data1 /data1 ext2 defaults 1 2
    > LABEL=/data2 /data2 ext2 defaults 1 2
    > LABEL=/data3 /data3 ext2 defaults 1 2


    I believe that not all filesystems allow the use of labels. Also, this
    doesn't work well with removeable media.

    Jeff

  5. Re: how can I stop Redhat 9 from reordering scsi drives

    Jeffrey J. Kosowsky wrote:
    > Jean-David Beyer writes:
    >
    >>Have you thought of mounting them the way Red Hat wants you to? E.g.,
    >>some of the entries in my /etc/fstab are like this:
    >>
    >>LABEL=/dataA /dataA ext2 defaults 1 2
    >>LABEL=/data0 /data0 ext2 defaults 1 2
    >>LABEL=/data1 /data1 ext2 defaults 1 2
    >>LABEL=/data2 /data2 ext2 defaults 1 2
    >>LABEL=/data3 /data3 ext2 defaults 1 2

    >
    >
    > I believe that not all filesystems allow the use of labels. Also, this
    > doesn't work well with removeable media.
    >

    I suppose they do not, but ext2 and ext3 both do, and they seem to be by
    far the most used.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 17:25:00 up 4 days, 13:40, 5 users, load average: 4.12, 4.08, 3.87


  6. Re: how can I stop Redhat 9 from reordering scsi drives

    Rod Smith wrote:

    > In article <4070d733$0$12165$61fed72c@news.rcn.com>,
    > Mark writes:
    >>
    >> I only sometimes have my backup scsi drives powered up,
    >> when I do, I then insmod the scsi module for the
    >> adaptec card to do a backup on the tape drive.
    >> My question is, sometimes I have my flash SD card
    >> reader (SanDisk Cruzer) plugged into USB and because RH 9
    >> is using the ide-scsi for it, it considers it a scsi device. Because
    >> of this sometimes the scsi devices are reordered
    >> and so the devices I have in the
    >> /etc/fstab don't always match to the
    >> devices.

    >
    > Are you saying that when you boot, the USB device is /dev/sda, but after
    > inserting the module for the Adaptec controller, the USB device becomes
    > /dev/sdb? If so, I don't believe that's the way it should work.


    No, what I mean is that if the box is booted with the
    cruzer USB drive not plugged in, then because it's
    not given sda1, then the other scsi drives get moved
    down one:

    df without usb flash drive plugged in at boot time(cruzer):

    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda1 608642 290874 286848 51% /mnt/dynamo
    /dev/sdb5 2063472 34316 1924336 2% /mnt/micropolis
    /dev/sdc5 8815340 327328 8040204 4% /mnt/ibm

    df output with flash drive:
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda1 122912 28832 94080 24% /mnt/cruzer
    /dev/sdb1 608642 179898 397824 32% /mnt/dynamo
    /dev/sdc5 2063472 34316 1924336 2% /mnt/micropolis
    /dev/sdd5 8815340 1541104 6826428 19% /mnt/ibm

    so since my /etc/fstab scsi section is like this:

    /dev/sda1 /mnt/cruzer vfat noauto,users 0 0
    /dev/sdb1 /mnt/dynamo ext3 noauto,users 0 0
    /dev/sdc5 /mnt/micropolis ext3 noauto,users 0 0
    /dev/sdd5 /mnt/ibm ext3 noauto,users 0 0

    the problem is that if I want to simply type mount /mnt/ibm, then the
    device it looks up in the fstab is wrong, it looks up sdd5 but it
    needs sdc5. So I just want to know if there's some way when you're
    using ide-scsi to have it put the USB drive at the end, like always
    /dev/sde1 or something, then leave the real scsi devices alone. This
    would work fine because I always power them up all at the same time.

    > If you're saying that the backup device becomes /dev/sda or /dev/sdb
    > depending upon whether or not you plugged in the USB device first, then
    > I'd suggest that you simply compile the Adaptec driver into the module,
    > forcing your hard disk to become /dev/sda and the USB device (when
    > present) to be /dev/sdb. If there's some reason you can't or won't do
    > this, then please elaborate.


    I already do use the aic7xxx as a module. The way I usually like
    to use these old scsi devices is to bring them up if I need
    them by powering them up and then manually insmoding the aic7xxx
    module. Then I can mount them. But like I said, it seems that the
    aic7xxx module orders the devices differently depending on if
    the Cruzer was there first or not.

    Mark


  7. Re: how can I stop Redhat 9 from reordering scsi drives

    In article <40721223$0$1641$61fed72c@news.rcn.com>,
    Mark writes:
    >
    > Rod Smith wrote:
    >
    >> If you're saying that the backup device becomes /dev/sda or /dev/sdb
    >> depending upon whether or not you plugged in the USB device first, then
    >> I'd suggest that you simply compile the Adaptec driver into the module,
    >> forcing your hard disk to become /dev/sda and the USB device (when
    >> present) to be /dev/sdb. If there's some reason you can't or won't do
    >> this, then please elaborate.

    >
    > I already do use the aic7xxx as a module.


    Sorry, I meant to say "into the kernel," the idea being to assign /dev/sda
    to the real hard disk rather than the USB removable disk.

    > The way I usually like
    > to use these old scsi devices is to bring them up if I need
    > them by powering them up and then manually insmoding the aic7xxx
    > module. Then I can mount them. But like I said, it seems that the
    > aic7xxx module orders the devices differently depending on if
    > the Cruzer was there first or not.


    If you're powering the drives on and off (and if this is OK with the
    hardware and drivers you've got), then I know of no way to force an
    assignment. I can think of a workaround, though: Give each device (both
    the hard disk and the USB disk) TWO entries in /etc/fstab:

    # "Cruzer" inserted first....
    /dev/sda1 /mnt/cruzera vfat noauto,users 0 0
    /dev/sdb1 /mnt/dynamob ext3 noauto,users 0 0

    # "Dynamo" inserted first....
    /dev/sdb1 /mnt/cruzerb vfat noauto,users 0 0
    /dev/sda1 /mnt/dynamoa ext3 noauto,users 0 0

    Another alternative would be to write scripts that would try to identify
    the device and mount it at the correct mount point no matter what the
    device ID is (within a range coded within the script). For instance, the
    script might use "fdisk -l" or the contents of some /proc pseudo-file to
    identify the devices at /dev/sda and /dev/sdb based on their CHS
    geometries or model numbers, then mount /dev/sda or /dev/sdb as
    appropriate.

    --
    Rod Smith, rodsmith@rodsbooks.com
    http://www.rodsbooks.com
    Author of books on Linux, FreeBSD, and networking

  8. Re: how can I stop Redhat 9 from reordering scsi drives

    Mark writes:
    >Rod Smith wrote:
    >
    >> In article <4070d733$0$12165$61fed72c@news.rcn.com>,
    >> Mark writes:
    >>>
    >>> I only sometimes have my backup scsi drives powered up,
    >>> when I do, I then insmod the scsi module for the
    >>> adaptec card to do a backup on the tape drive.
    >>> My question is, sometimes I have my flash SD card
    >>> reader (SanDisk Cruzer) plugged into USB and because RH 9
    >>> is using the ide-scsi for it, it considers it a scsi device. Because
    >>> of this sometimes the scsi devices are reordered
    >>> and so the devices I have in the
    >>> /etc/fstab don't always match to the
    >>> devices.

    >>
    >> Are you saying that when you boot, the USB device is /dev/sda, but after
    >> inserting the module for the Adaptec controller, the USB device becomes
    >> /dev/sdb? If so, I don't believe that's the way it should work.

    >
    >No, what I mean is that if the box is booted with the
    >cruzer USB drive not plugged in, then because it's
    >not given sda1, then the other scsi drives get moved
    >down one:


    Take a look at devfs. It will solve your reordering problem.

    scott


  9. Re: how can I stop Redhat 9 from reordering scsi drives

    Jean-David Beyer writes:
    > Jeffrey J. Kosowsky wrote:
    > > Jean-David Beyer writes:
    > >
    > >>Have you thought of mounting them the way Red Hat wants you to? E.g.,
    > >>some of the entries in my /etc/fstab are like this:
    > >>
    > >>LABEL=/dataA /dataA ext2 defaults 1 2
    > >>LABEL=/data0 /data0 ext2 defaults 1 2
    > >>LABEL=/data1 /data1 ext2 defaults 1 2
    > >>LABEL=/data2 /data2 ext2 defaults 1 2
    > >>LABEL=/data3 /data3 ext2 defaults 1 2

    > > I believe that not all filesystems allow the use of labels. Also,
    > > this
    > > doesn't work well with removeable media.
    > >

    > I suppose they do not, but ext2 and ext3 both do, and they seem to be
    > by far the most used.


    ext2 and ext3 are perhaps most frequent on core linux drives. But when
    you talk about removeable media such as for cameras or for PDAs/mp3
    players, then vfat is much more common (and is of course the default
    formatting of such cards) and indeed almost necessary if you want
    interchangeability across other devices.

    Also, the whole concept of fixed labels in the fstab file doesn't
    really make sense in the context of wanting to mount an arbitrary
    removeable media cards (unless you decided to give all your removeable
    media the 'same' label in which case you could only mount one card at
    a time, plus you still would have a problem the first time you want to
    mount the card before it is assigned a label)

+ Reply to Thread