LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   missing 20GB on 160GB drive (http://www.linuxquestions.org/questions/fedora-35/missing-20gb-on-160gb-drive-510426/)

jb8578 12-14-2006 11:11 AM

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!

macemoneta 12-14-2006 12:19 PM

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

tune2fs -m0 /dev/hdb1

jb8578 12-14-2006 01:25 PM

thanks

that got me to 147GB from 139.

macemoneta 12-14-2006 01:40 PM

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.


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