USB External Hard Drive Partitionning/Mounting (SCSI Emulation) - Hardware

This is a discussion on USB External Hard Drive Partitionning/Mounting (SCSI Emulation) - Hardware ; Hi I have a USB external hard drive that I just bought. It is a little special: It provides a virutal CDROM device on an invisible partition for windows installation junk, and a Direct Drive device where the storage is. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: USB External Hard Drive Partitionning/Mounting (SCSI Emulation)

  1. USB External Hard Drive Partitionning/Mounting (SCSI Emulation)

    Hi
    I have a USB external hard drive that I just bought. It is a little
    special: It provides a virutal CDROM device on an invisible partition
    for windows installation junk, and a Direct Drive device where the
    storage is. Both are SCSI devices. The one of concern is the hard drive
    which has been assigned /dev/sda

    When I fdisk /dev/sda it says the device has 16 partitions already--
    wierd because if i do a 'p' in fdisk it shows 1 partition (c) . I then
    fdisk /dev/sda1 and it only has four... sda2 onward don't exist.

    I said OK and partitionned /dev/sda1 since fdisk didn't complain about
    it. I wrote my partition table and went to mkfs... mkfs said it coudn't
    find any of the partition devices that my table described... i did mkfs
    /dev/sda and it began formatting the entire disk as a single volume
    (maybe this is normal behavior??) Now i can mount /dev/sda1 but it's
    the entire 320GB and not the first 40G partition i made... And the
    partition table i wrote to /dev/sda1 is now gone completely.

    Can you NOT partition a USB hard drive?? What is the normal procedure
    with a SCSI device? (I am accustomed to IDE drives...) Should i just
    delete the partition C of /dev/sda and make my table on that? will that
    work? or will i scrap my drive?

    I will paste my /proc/scsi/scsi in case it helps...
    -----------------------------------
    Attached devices:
    Host: scsi0 Channel: 00 Id: 00 Lun: 00
    Vendor: DMI Model: USB2.0 CD-ROM Rev: 1.15
    Type: CD-ROM ANSI SCSI revision: 02
    Host: scsi0 Channel: 00 Id: 00 Lun: 01
    Vendor: DMI Model: USB2.0 Storage Rev: 1.15
    Type: Direct-Access ANSI SCSI revision: 02
    -----------------------------------
    And the strange fdisk output wrt /dev/sda, for whatever i can pull out:
    -----------------------------------
    [patrick@server patrick]$ sudo /sbin/fdisk /dev/sda
    Warning: too many partitions (16, maximum is 8).

    Command (m for help): p

    Disk /dev/sda: 255 heads, 63 sectors, 38892 cylinders
    Units = cylinders of 16065 * 512 bytes


    16 partitions:
    # start end size fstype [fsize bsize cpg]
    c: 1 305080* 305079* unused 0 0

    Command (m for help):
    -----------------------------------


    Thanks,
    Pat


  2. Re: USB External Hard Drive Partitionning/Mounting (SCSI Emulation)

    pzaloum@gmail.com wrote:
    > Hi
    > I have a USB external hard drive that I just bought. It is a little
    > special: It provides a virutal CDROM device on an invisible partition
    > for windows installation junk, and a Direct Drive device where the
    > storage is. Both are SCSI devices. The one of concern is the hard drive
    > which has been assigned /dev/sda
    >
    > When I fdisk /dev/sda it says the device has 16 partitions already--
    > wierd because if i do a 'p' in fdisk it shows 1 partition (c) .


    > I then fdisk /dev/sda1 and it only has four... sda2 onward don't exist.


    There's your first problem. You should *not* have found a partition
    table on /dev/sda1. /dev/sda is the whole drive, including the
    partition table itself. /dev/sda1 and on are partitions which do *not*
    hold partition tables.

    > I said OK and partitionned /dev/sda1 since fdisk didn't complain about
    > it. I wrote my partition table and went to mkfs... mkfs said it coudn't
    > find any of the partition devices that my table described...


    Not surprising, since the partition table should be on /dev/sda not
    /dev/sda1.

    > i did mkfs
    > /dev/sda and it began formatting the entire disk as a single volume
    > (maybe this is normal behavior??)


    When you issued the mkfs /dev/sda command, you specifically asked it to
    make a filesystem spanning the entire disk...overwriting any existing
    partition table in the process.

    > Now i can mount /dev/sda1 but it's
    > the entire 320GB and not the first 40G partition i made...


    Again, that makes no sense. You should be able to mount /dev/sda since
    that's where you made the filesystem, but /dev/sda1 got blown away
    (along with the rest of the partition table).

    > And the
    > partition table i wrote to /dev/sda1 is now gone completely.


    As it should be, given what you've done.

    > Can you NOT partition a USB hard drive?? What is the normal procedure
    > with a SCSI device? (I am accustomed to IDE drives...)


    SCSI is the same as IDE: you partition /dev/sda just as you would
    /dev/hda to get /dev/sda1 (or /dev/hda1) and so on. You certainly don't
    write partition tables to the individual partitions.

    However, the problem may arise from the virtual CD-ROM that this device
    emulates. If you need to keep that, you could have some difficulty. If
    not, blow away the partition table, the filesystem, everything on the
    drive and write a new, sane partition to /dev/sda following the
    procedures for the IDE drives you're accustomed to.

+ Reply to Thread