[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Partition sizes in Squeeze



On 22 mei 2010, at 20:09, Nima Azarbayjany wrote:

> I have a recent install of Squeeze on my laptop.  I have setup my partitions according to Debian Installer's defaults for separated /root, /home, /usr, etc. partitions with LVM.  I have installed a small number of packages over time.  Today when I installed KDevelop (actually the only KDE program until now) Debian complained about low disk space on /usr.  Currently, there is around 200Mb on the partition and I'm not intending to install more software at this time.  But what should I do if I needed more space?  This is not much space and fills up so quickly.
> 

Assuming you used up all you available physical disk space, you'll need to shrink one of you lv's and grow the lv for /usr. To do this, you should read the man pages for lvm and  the tool to resize & check your filesystem of choice. Assuming you have ext3 as filesystem, the apps mentioned below (e2fsck & resize2fs) should do. 

The procedure will be something like below, but this is not a howto, read man pages first. You could F***up you filesystem when doing things wrong!:

- boot from CD (SystemRescueCD, some live cd ..)

- activate you lv's:

  # vgscan
  # vgchange -a -y <vg_name>
  # vgmknodes

- shrink a lv (e.g. resize /home to 2GB)

  # e2fsck -f /dev/mapper/vg01-home
  # resize2fs -p /dev/mapper/vg01-home 1.9G
  # lvreduce --size 2G /dev/vg01/home
  # resize2fs /dev/mapper/vg01-home

- grow a lv (e.g. resize /usr with 500MB)

  # lvextend --size +500M /dev/vg01/usr
  # e2fsck -f /dev/mapper/vg01-usr
  # resize2fs /dev/mapper/vg01-usr


HTH,

Peter

Reply to: