LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-14-2006, 11:11 AM   #1
jb8578
LQ Newbie
 
Registered: Dec 2006
Posts: 14

Rep: Reputation: 0
missing 20GB on 160GB drive


I put a 160GB hard drive that was formatted NTFS and probably had an XP install on it at one point in my FC5 box as a slave drive on the primary channel. I ran FDISK, deleted and created a new partition. Then formatted it as EXT2. When i mounted the drive it only gave me 7GB.

So i ran this:
[root@localhost ~]# dd if=/dev/zero of=/dev/hdb1 bs=1024k count=1

and repeated the FDISK and format steps and now I have 139GB.

Much better, but is there a way i can get the remaining 20GB or so?




These are a few other things i tried:
[root@localhost ~]# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 9729 78043770 8e Linux LVM

Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 19457 156288321 83 Linux

Disk /dev/dm-0: 79.3 GB, 79322677248 bytes
255 heads, 63 sectors/track, 9643 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost ~]#


[root@localhost ~]# umount /dev/hdb1

[root@localhost ~]# e2fsck -f /dev/hdb1

e2fsck 1.38 (30-Jun-2005)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hdb1: 11/19546112 files (9.1% non-contiguous), 628733/39072080 blocks

[root@localhost ~]# resize2fs -f /dev/hdb1

resize2fs 1.38 (30-Jun-2005)
The filesystem is already 39072080 blocks long. Nothing to do!
 
Old 12-14-2006, 12:19 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The "missing" space is in reserved blocks. You can release the reserve by using the command:

tune2fs -m0 /dev/hdb1
 
Old 12-14-2006, 01:25 PM   #3
jb8578
LQ Newbie
 
Registered: Dec 2006
Posts: 14

Original Poster
Rep: Reputation: 0
thanks

that got me to 147GB from 139.
 
Old 12-14-2006, 01:40 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Most of the rest is in the different definitions of gigabyte. Linux uses power of 2 based values to report disk space, while Windows and drive manufacturers now use power of 10 based values.

So:

160GB = 160*1000*1000 = 160000000

and

160000000/1024/1024 = 152.59GB

The remaining delta, 5.59GB (152.59-147) is in filesystem overhead (the data structures needed to create and store files/directories, permissions and extended attributes.
 
  


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
FC4 - HP COLORADO 20GB, ATAPI TAPE drive problems markusmac Fedora 1 02-26-2006 09:50 AM
160Gb harddrive only 140Gb??? Dee-ehn Linux - Hardware 9 08-15-2005 05:41 PM
LILO Doesn't Work With 160GB Drive bfwissel Linux - Newbie 5 03-11-2005 02:33 PM
Hard Drive won't mount HDB 20GB Maxtor sovietpower Slackware 4 08-28-2004 12:14 AM
western digital 160GB usb hard drive linuxlastslonge Linux - Hardware 1 08-16-2004 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:31 PM.

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