Re: Using parted to resize partitions in a Woody HPPA system
Ok, I agree with you, it's better to be in the safe side, so I already
have my /var in a .tar.bz2 file in another partition. To go single user
I can just do init 1, isn't it? Or I must go the boot way? And then,
just umount /var, do the schrink / move / remove steps, mount /var again
and proceed to /usr steps...
Joel Soete wrote:
Joao Carlos de Lima Roscoe wrote:
My system has one 4GB HD (/dev/sda). At the moment, /dev/sda7 (/var)
partition has almost 2GB, while /dev/sda6 (/usr) partition is just
0.9GB wide - ok, its weird, don't ask... I intend to use parted to
fix it. So I got some hints from parted manual and imagined the
hmm I have no experience with parted but don't you have to umount /var
and /usr fs before all?
It is not clear in 'man parted' but it shouldn't be a pb as parted
stand in /sbin (and more safe? )
May be should you operate in single user mode to be able to umount
/usr (iirc add option -s after the name of your kernel into
1. List current partition table: parted>p
minor start end type filesystems flags
1 0.030 96.632 primary boot
6 1100 2000 logical ext2
7 2000 4000 logical ext2
Shrink the /var partition (it's the last one) by 1.5GB :
parted>resize 7 2000 2300
That is the most dangerous without backup !!!
My /var is about 40Mb and and backup like 'tar cjspf
/SomeOtherFS/Var.tar.bz2 /var' could be reduced to 10Mb.
So you could certainly find a place for such backup (not /var and not
/usr :) )? (important because /var contains the dpkg db !!)
Or don't you have a remote system to make such backup?
2. Make a new partition at the end of the disk, big enough for the
new /var: parted>mkpartfs logical ext2 3700 4000
3. Copy the old (shrinked) /var (/dev/sda7) to the new one: parted>cp
4. Remove the old one: parted>rm 7
5. Grow /usr to occupy new open space: parted>resize 6 1100 3700
6. Exit: parted>quit
No changes will be needed in fstab, because the partition numbers
didn't changed.Also, root and boot partitions weren't touched, so I
think that I won't have any problems with the bootloader.
So, proceedand reboot system, and that's it.
At this time I have no media do make backup disk images, and I want
avoid reinstalling all stuff again (data is already safe), so this
must work in the first try. Any comments? Anyone?
Thanks a lot,
PS: For my own I have enough with /var of about 250mb