Re: How to reclaim space on hard drive not partitioned fully initially?
Dear Mike,
Thank you very much for your extraordinarily clear explanation of what was
going on and plan for proceeding. I read it and this is what I did.
I used the fact that my partitions were
/dev/hda1 /boot
/dev/hda2 /
/dev/hda3 /home
and all i had on the extended partition was the swap.
I removed the swap, and extended partition and
recreated the extended partition and swap pushed at the end of the drive.
The I deleted the /home partition, created it again using all the free space
and then extended the file system within the bigger partition. Here is what I
did.
1. I Backed up all my /home data via rsync to another machine.
2. used quantian (a knoppix variant) disc.
3. Booted into quantian,
4. swapoff to turn off use of
the /dev/hda5 linux swap partition within quantian
5. used parted to remove logical swap partition /dev/hda5
and remove /dev/hda4 the extended partition.
using parted
rm 5
rm 4
6. created a new /dev/hda4 extended partition at the end of the drive (last 2
gb).
mkpart extended 112564.819 114470.969
7. added a new swap logical partition to the new extended partition at the
end.
mkpartfs logical linux-swap 112564.819 114470.969
8. tried to run qtparted to extend the /dev/hda3 to cover the 'gap' before
the /dev/hda4 and /dev/hda5 . qtparted refused saying: that "my ext2 (3) file
system was strange and qtparted didnt support it yet".
9. I then ran
tunefs -O '^has_journal' /dev/hda3
this converted /dev/hda3 ie /home from ext3 to a ext2 file system.
10. I tried once again to run qtparted to extend this (now ext2) file system
to the full intervening space.
I still got the error message about a 'strange' file system not supported.
11. So then I ran fdisk. I wrote down the beginning cylinder number of
/dev/hda3 (2445) and !!!!deleted the /dev/hda3!!!!,
VERY SCARY
12, then still under fdisk I did:
n to create a new partition started at cylinder 2445 (default choice) and
ended at 14350 (default choice!!). Then I did
13. resize2fs -p /dev/hda3
It refused. It told me first I had to run:
14. e2fsck -f /dev/hda3
I did that and it did what it wanted.
15. resize2fs -p /dev/hda3
16. tune2fs -h /dev/hda3
17. remounted the /dev/hda3 on /home
YABADABADOO!!!
I now have a 90GB /home partition.
Thank you very much for your help!!
Mitchell
Reply to: