swapless in Toronto
Fraser Campbell
fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Tue Feb 8 00:28:49 UTC 2005
On Monday 07 February 2005 12:38, David J Patrick wrote:
> le box ! What's the sane way to resize my home partition ? I've poked
IMO, the best way is to use LVM ;-)
Probably you could backup /home to other partitions where there is space,
resize /home partition (fdisk) and then create a swap partition in the newly
freed space. Format the new /home and swap, restore, continue ... there
might be tools that automate this (partition magic I expect, and I'm sure
some free stuff).
For future iterations I would suggest that you use LVM partitions. My home
system looks like this:
/dev/mapper/vg0-root 960M 184M 726M 21% /
/dev/md0 118M 25M 88M 22% /boot
/dev/mapper/vg0-home 15G 12G 3.8G 75% /home
/dev/mapper/vg0-tmp 960M 82M 827M 10% /tmp
/dev/mapper/vg0-usr 5.0G 4.0G 789M 84% /usr
/dev/mapper/vg0-var 30G 19G 9.5G 67% /var
/dev/mapper/vg0-backups 30G 19G 9.3G 68% /var/backups
/dev/mapper/vg0-opt 496M 280M 192M 60% /opt
Start with logical volumes at the size you expect to use (not significantly
larger) then grow the LVs as you need to. Eventually I expect
my /var/backups partition will grow beyond 30G at which time all I'll need to
do is:
- umount /var/backups
- fsck /dev/vg0/backups
- lvresize -L50G /dev/vg0/backups
- resize2fs /dev/vg0/backups
- mount /var/backups
Reiserfs supposedly supports online resizing (anyone tried it?), had I used
that (supposedly) I could resize my filesystem without even unmounting. My
swap is also a logical volume so if I wanted more swap I could follow the
same procedure (swapoff, lvresize, mkswap, swapon) or just create a second
swap LV.
I don't see myself running out of space for quite a while, my volume group has
28GB unallocated, when I eventually use that up I have another 40GB of RAIDed
space that I can add to the volume group ... all of that space can be tacked
onto the logical volumes that need it, trivially. My point is that it's
good leave extra space unallocated until you find out where you need it ...
often some time long after install.
--
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org> http://www.wehave.net/
Georgetown, Ontario, Canada Debian GNU/Linux
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list