USB hard drive partitioning mini-howto
--------------------------------------

David McMillen (mcmillen math . bu . edu)

This is a *very* mini HOWTO, describing the steps I took to implement two separate partitions on my portable USB hard drive. (After helpful discussions with Bennett Todd, he encouraged me to post a description of the procedure, here, in the hopes that people trying to do the same thing might find it useful.)

The Hardware:

Pocketec DataStor USB 2.0 Portable Hard Drive (AKA "Pockey"), 30G
ASUS P4PE motherboard with built-in USB 2.0 controller

The Software:

RedHat 9, running kernel 2.4.20-18.9 (straight from up2date, no customization)

The Goal:

To split the 30G on the drive into two partitions, one ext3 and one vfat.

The History:

I hooked up the disk, which was detected and worked from the beginning, appearing initially as a 30G vfat on /dev/sda1. I started out under RedHat 7.3, though still using a kernel from the 2.4.20 family (compiled from source); under 7.3, the USB disk was detected but ran only at USB 1.1 speeds. When I updated to RedHat 9, USB 2.0 started to work, and I have no idea why. I'm not asking questions, I'm just happy it works!

Initial partitioning with fdisk seemed to be completely ignored by both Linux and Windows: whatever I did to the partition table, the disk appeared as a 30G vfat partition when I plugged it in. After much thrashing around, I repartitioned using Windows XP's built-in partitioning functions (the "Disk Management" tool, under "Computer Management"). I created a 20G blank partition, and a 10G vfat partition. Back under Linux (I have a dual-boot system), the 20G partition appeared as /dev/sda1, and the 10G as /dev/sda2. I formatted /dev/sda1 as ext3 ("mkfs -t ext3 /dev/sda1"), left /dev/sda2 as it was, and added the following to /etc/fstab:

/dev/sda1 /Portable ext3 user,noauto,exec,dev,suid,rw 0 0
/dev/sda2 /WinPortable vfat user,noauto,noexec,suid,dev,rw,conv=auto,uid=500,gid=500,umask=000 0 0


Directories /Portable and /WinPortable both belong to "dave", a regular user, rather than "root". I don't know for sure how many of those fstab options are really necessary, but it works for me and I'm not messing with it. (There's probably a catchy saying about not fixing things when they're not broken, but I can't remember it right now.:))

Note 1: I'm pretty sure I could have used "fdisk" rather than the Windows XP partitioning software, if only I'd known that the second partition would show up as /dev/sda2. "fdisk" kept referring to things called "/dev/sda1p1" and "/dev/sda1p2", which did not appear to exist anywhere.

Note 2: Presumably if you have other USB or SCSI devices before this one, your partitions will show up as /dev/sdb1 and /dev/sdb2, and so on.

The Result:

I can now use the ext3 partition to store my files, free from the
vfat restrictions (like the inability to create symlinks), but I have the vfat partition available for storing Windows files -- sometimes I need to carry files to someone's Windows machine, or back things up from my own. Windows XP ignores the ext3 partition, but Windows 98 tries to mount it and sees nothing but gibberish: the volume name appears as a string of garbage characters. I think bad things would happen if I tried to access that volume under Win 98, so I avoid doing that. :)


So far (two weeks in), this all seems quite stable and reliable, no problems. The Pocketec, by the way, is a great gadget: it weighs in at about 150 grams (5 or 6 oz?, not sure), so it's easy to carry, and transfer rates are blazingly fast provided you can get the USB 2.0 rates to work.

Cheers,
Dave




------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to