Skip to contentSkip to conversation

How to format a new hard disk using in LVM2 ?

linux-lvm Thomas 1 participant 1 message Jun 10, 2006

lore
Share & tools
lore

Thomas

author
#0 lore raw

Given:
hdc is a 80G hard disk.
Only use 20G and mount as backup
===============================
Steps:
# Phyical Volume creation of hdc
pvcreate /dev/hdc

# Volume group creation as name VolGroup01
vgcreate VolGroup01 /dev/hdc

# Logical Volume Group creation as name LogVol00
lvcreate -n LogVol00 --size 20G VolGroup01

# Format as EXT3
mke2fs -j /dev/VolGroup01/LogVol00

# Mount as backup
mkdir /backup
mount /dev/VolGroup01/LogVol00 /backup

# Check result with
df -h
pvdisplay
vgdisplay
lvdisplay

Just my two cents.