LVM allows for great flexibility when allocating Hard disk partitions. The reason partitions are used is because: of seperate xen host servers, and for providing for a more stable server: if /var/tmp is filled up - the server can still function, as other partitions are unaffected.
cfdisk
apt-get install lvm2 pvcreate /dev/sda3 pvcreate /dev/sdb2 vgcreate main-vol /dev/sda3 /dev/sdb2 vgscan
lvcreate -n zachome –size 50g main-vol lvcreate -n zachomeswp –size 1g main-vol
mkfs.ext3 /dev/main-vol/zachome mkswap /dev/main-vol/zachomeswp
resize2fs /dev/main-vol/zachome 40000 lvreduce -L-10g /dev/main-vol/zachome #subtract 10Gb from current size!
pvscan
lvscan
//umount the partition or poweroff the domU server. //the commands below should be available on the dom0 or main server. lvextend -L+10G /dev/main-vol2/twister //extend the LinuxVolume. Add 10 gigabytes to the present size. e2fsck -f /dev/main-vol2/twister //Run a (forced) check on the filesystem resize2fs /dev/main-vol2/twister //resize the filesystem
swapoff -v /dev/VolGroup00/LogVol01 lvm lvresize /dev/VolGroup00/LogVol01 -L +256M mkswap /dev/VolGroup00/LogVol01 swapon /dev/VolGroup00/LogVol01
e2fsck -f /dev/vg0/vm07-root resize2fs -p /dev/vg0/vm07-root 10G lvresize -L 11G /dev/vg0/vm07-root e2fsck -f /dev/vg0/vm07-root resize2fs -p /dev/vg0/vm07-root
http://fedorasolved.org/Members/zcat/shrink-lvm-for-new-partition
Main One = http://www.debian-administration.org/articles/410