Lvm

From Halfface
Revision as of 20:42, 21 October 2007 by 192.168.2.57 (talk) (New page: Create partition. fdisk /dev/sda1 Create physiscal volume. pvcreate /dev/sda3 pvdisplay Create volume group. vgcreate VolGroup00 /dev/sda1 vgdisplay Create logical volume. Create a...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Create partition.

fdisk /dev/sda1

Create physiscal volume.

pvcreate /dev/sda3
pvdisplay

Create volume group.

vgcreate VolGroup00 /dev/sda1
vgdisplay

Create logical volume. Create a logic volume spanning 3 disks, each stripe 256kb, 1,5TB, called home, in Volume Group 00 The logical volume is being created under /dev/VolGroup00/LogVol00

lvcreate i3 -I 256 L1500000 -n LOgVol00 VolGroup00
lvdisplay

Extend a resizerfs logical volume.

lvextend -L+70G /dev/VolGroup00/LogVol00
resize_reiserfs -f /dev/VolGroup00/LogVol00

Shrink ext2/3 partition.

resize2fs /dev/volGroup00/LogVol00 150000
lvreduce -L150M /dev/VolGroup00/LogVol00
e2fsck -f /dev/VolGroup00/LogVol00

Shrink reizerfs volume.

resize_reiserfs -s-150M /dev/VolGroup/LogVol00
lvreduce -L-150M /dev/VolGroup00/LogVol00