Installed an Ubuntu system a few months ago. Have decided to tear down and reformat the 2nd drive, which I have already done. fdisk reports correct storage size. I deleted ay partitions, created one single partition, and ran mkfs.ext3.
Everything appeared to be dandy. But, when I df, it shows almost 1/3rd of the drive is used. I have copied info that reflects the process below, but I am perplexed. If I fdisk all partitions, I flatten the whole harddrive and reinit it, then format it. But... I can't recover the full drive.
Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c88f6
Device Boot Start End Blocks Id System
/dev/sdb1 1 48641 390708801 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
root@tpl:/etc# mkfs.ext3 -b 4096 /dev/sdb1
mke2fs 1.40.2 (12-Jul-2007)
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
48840704 inodes, 97677200 blocks
4883860 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
2981 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Reported space right after fdisk and mkfs -
root@tpl:/etc# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 357G 274G 65G 81% /
varrun 2.0G 92K 2.0G 1% /var/run
varlock 2.0G 0 2.0G 0% /var/lock
udev 2.0G 140K 2.0G 1% /dev
devshm 2.0G 0 2.0G 0% /dev/shm
/dev/sdb1 367G 195M 348G 1% /media/sdb