|
/Admin/LVM:
Create a new logical volume / partition[1]:
Create the logical volume:
lvcreate --size 200G volgroupname -n scratch
Format the volume:
mkfs.ext3 /dev/volgroupname/scratch
Create an entry in /etc/fstab to mount the volume:
/dev/volgroupname/scratch /scratch ext3 defaults 0 2
Then create the /scratch directory and mount it.
[1] https://wiki.archlinux.org/index.php/LVM
posted at: 09:19 | path: /Admin/LVM | permanent link to this entry
"pvs" and "pvdisplay" lists all physical volumes,
"vgs" and "vgdisplay" lists all volume groups,
"lvs" and "lvdisplay" lists all volumes.
"vgs" displays the amount of free space that has not yet been assigned to a volume.
posted at: 08:24 | path: /Admin/LVM | permanent link to this entry
/Admin/LVM:
Reduce an LVM Volume[1]
The Volume must be unmounted before it can be rduced:
umount /home
Check the volume for errors:
fsck -f /dev/mapper/home/
Shrink the file system to 200G:
resize2fs /dev/mapper/home 200G
Shrink the LVM volume group to the same size:
lvresize -L 200G /dev/mapper/home
[1] http://tcpdump.com/kb/os/linux/lvm-resizing-guide/shrink.html
posted at: 02:15 | path: /Admin/LVM | permanent link to this entry