I need to add space to /var (thank you, libreoffice), which is on lvm. Since my one volume group vg is getting low, I thought this would be a good time to extend it as well.
Alan (McKinnon) has posted very helpful lvm bits (reprinted below). Following alan's bottom up creation mandate I believe the idea is phy disk: /dev/sda my only drive phy part: fdisk create another partition of type LVM (/dev/sda8) phy vol: pvcreate /dev/sda8 vol grp: vgextend vg /dev/sda8 log vol: lvextend --size +10G /dev/vg/var file sys: resize2fs /dev/vg/var files/dirs: not relevant Questions 1. Apparently 2.6 (hence 3.x) kernels can expand mounted file systems (/var is mounted as ext3). Since I can't unmount /var because it is in use, I guess that, if I every need to shrink /var, I would need to boot off a CD. Is that correct? Back in the day, we had single user mode for this, but I don't see how to get the equivalent now. Is it really safe to extend /var (i.e., /dev/vg/var) while mounted as ext3? It sounds frightening since daemons could start running and access /var. 2. Since currently /var is entirely from /dev/sda7 (my original lvm partition) should I use the optional parameter to lvextend to force the new space for /var to come from there as well? lv extend --size +10G /dev/sda7 thanks in advance allan ==================== from Alan McKinnon ============================== Let's look first at the layers of stuff involved: files & directories file system logical volume (LV) volume group (VG) physical volume (PV) physical partition (i.e. /dev/sda1 etc) physical disk (i.e. something Seagate etc made) OK, there's a lot of stuff there. When you made the LV, you worked from the bottom up Nothing in that list can be bigger than the thing below it.