I'll assume we have two disks we're going to use, /dev/sde and /dev/sdf.
All of this has to be done as root.
- Create partitions on both disks using fdisk. Set the type to 8e (Linux LVM). These may be the full disk, or not. I'll assume these are now /dev/sde1 and /dev/sdf1
- Create physical volumes:
# pvcreate /dev/sde1
# pvcreate /dev/sdf1 - Check our work:
# pvdisplay - Create a volume group:
# vgcreate NameOfGroup /dev/sde1 /dev/sdf1 - Check our work:
# vgdisplay - Create the logical volume, which is what Linux will see as if it were a partition:
# lvcreate -l 100%VG -n NameOfVolume NameOfGroup
Note that the -l option can be provided in many forms. This one says to assign 100% of the space in the volume group to this logical volume. - Check our work:
# lvdisplay - Create the filesystem:
# mke2fs -j -L VolumeLabel /dev/NameOfGroup/NameOfVolume - Now the new filesystem can be mounted in the usual ways.
No comments:
Post a Comment
Comments welcome, but they are expected to be civil.
Please don't bother spamming me. I'm only going to delete it.