LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2009, 10:20 PM   #1
mike11
Member
 
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
External USB HD, two partitions with gparted, df shows incorrect partition sizes


OS: Debian Squeeze.

I've formatted an IO Data 500G external USB HD with gparted as follows:
partition 1: 10G FAT32
partition 2: 490G ext3

I reboot and mount the partitions (/media/usbwin, /media/usblin, respectively).
fdisk -l gives (the output relevant to the USB drive):
Code:
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8b997317

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1275    10241406    b  W95 FAT32
/dev/sdb2            1276       60801   478142595   83  Linux
but df -h gives:
Code:
/dev/sdb1             466G   16K  466G   1% /media/usbwin
/dev/sdb2             449G  199M  426G   1% /media/usblin
where did the 466G and 449G come from? is there something wrong with gparted, du or both?.

Cheers,
Mike.

Last edited by mike11; 11-30-2009 at 11:22 PM. Reason: code
 
Old 11-30-2009, 10:59 PM   #2
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
try du -h and see what that gives you. Or better yet try df -h df is disk free and will give you all your drives.

Last edited by exvor; 11-30-2009 at 11:00 PM. Reason: added info
 
Old 11-30-2009, 11:19 PM   #3
mike11
Member
 
Registered: Apr 2009
Posts: 222

Original Poster
Rep: Reputation: 17
tnx 4 replying exvor. the above output is for df -h (see the output is with K and G).
 
Old 12-01-2009, 05:51 PM   #4
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Ahh yes I see it now. I should stop replying to 0 post threads when blurry eyed at work.
 
Old 12-06-2009, 03:52 AM   #5
mike11
Member
 
Registered: Apr 2009
Posts: 222

Original Poster
Rep: Reputation: 17
Seems gparted didn't do a good job.
I've solved this by: a) using fdisk to rewrite the partition table and then b) using mkfs.vfat and mkfs.ext3 to format the windows and linux partitions, respectively (of course this erases everything on the drive, which in my case was fine since the drive was still empty). Everything works fine now and df reports the correct partition sizes.

http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
http://www.linuxquestions.org/questi...-drive-474470/
 
Old 12-06-2009, 01:50 PM   #6
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Thanks for including the links that will definitely help out other members that have this problem. You could have probably used cfdisk to do the partitioning too. It is like fdisk but has a ncurses menu instead of being totally command line. Cfdisk is my personal choice in partitioning disks even if it does aggravate me sometimes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntfs partition on usb disk messed up by gparted needs recovery cristiano.fava Linux - Hardware 8 03-09-2009 10:02 AM
usb drive: resized partition using gparted, now it won't automount retrovertigo Ubuntu 3 08-27-2008 08:55 AM
gparted shows no partitions wussboy Ubuntu 5 02-19-2007 08:10 AM
Mounting USB external drive with multiple partitions, USB bluetooth mouse xmeson Slackware 7 12-17-2006 09:00 AM
cdrecord -scanbus shows incorrect device (external USB CD-RW) Avatar Linux - Hardware 2 04-14-2004 09:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration