Issues trying to partition a USB drive

Mikkel L. Ellertson mikkel at infinity-ltd.com
Mon Mar 17 19:51:58 UTC 2008


kevin kempter wrote:
> Hi List;
> 
> I have a 320G SATA drive that used to have Fedora 8 on it, I no longer 
> need it as a main Linux drive so I want to use is as USB storage.
> 
> However I'm having issues trying to fdisk the drive into a single 
> partition. 
> 
> Here's what I did :
> 1) put the drive in a USB 2.0 enclosure
> 2) plugged the USB into my Fedora box
> 3) as root ran 'fdisk /dev/sdb'
> 4) removed all partitions on the drive and wrote the changes
> 
> 5) rebooted my Fedora box
> 6) ran 'fdisk /dev/sdb' again
> 
> at this point I get this if I print the partition table:
> 
> /Command (m for help): p
> 
> Disk /dev/sdb: 320.0 GB, 320072933376 bytes
> 255 heads, 63 sectors/track, 38913 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x0000733a/
> 
> 
> 7) added a single partition: 
>   - choose 'p' for primary partition   
>   - choose '1' for partition number
>   - choose '1' for the first cyllinder
>   - choose '38913' for the last cyllinder
> 
> Like this:
> 
> /Command (m for help): n
> Command action
>   e   extended
>   p   primary partition (1-4)
> p
> Partition number (1-4): 1
> First cylinder (1-38913, default 1): 1
> Last cylinder or +size or +sizeM or +sizeK (1-38913, default 38913): 38913/
> 
> 
> 8) wrote the changes (w) 
> 9) I went back into fdisk and printed the partition table:
> 
> /Command (m for help): p
> 
> Disk /dev/sdb: 320.0 GB, 320072933376 bytes
> 255 heads, 63 sectors/track, 38913 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x0000733a
> 
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1               1       38913   312568641   83  Linux/
> 
> 
> 10) rebooted the Fedora box again
> 
> 11) plugged in the USB drive
> 
> KDE asks what to do - I say open in a new window.
> What I see is the data from my old /boot file system
> 
> Also now if I do a 'df -h' I see the second (USB) drive as only the size 
> of the old /boot file system (1.9G) not the 320G I expect to see:
> 
> /$ df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/mapper/VolGroup00-LogVol00
>                              48G   35G   11G  77% /
> /dev/sda1             190M   19M  162M  11% /boot
> tmpfs                    506M  364K  505M   1% /dev/shm
> /dev/sdb1             1.9G   52M  1.8G   3% /media/-boot1/
> 
> 
> What am I doing wrong ?
> 
> Thanks in advance...
> 
> /Kevin
> 
Because you did not format the new partition, it is getting file 
system size and usage from the old file system. In fact, at this 
point, you could probably recover the old partition table and file 
systems. If you unmount /dev/sdb1, and run "mke2fs /dev/sdb1" you 
will end up with an empty file system using the full partition.

Make sure you use the correct device...

Mikkel
-- 

   Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080317/c1932383/attachment-0001.sig>


More information about the fedora-list mailing list