Detailed steps for creating a logical volume. -- Linux general technology-Linux technology and application information. For details, refer to the following section. 1. Create physical partitions: hdb1, hdb2, hdc1, and hdc2
Fdisk/dev/hdb ----> n --> t (type: 8e) ---> w: hdb1, hdb2
Fdisk/dev/hdc ---> n --> t (type: 8e) ---> w: hdc1, hdc2
2. Create physical volumes: hdb1, hdb2, hdc1, and hdc2
Pvcreate/dev/hdb1
Pvcreate/dev/hdb2
Pvcreate/dev/hdc1
Pvcreate/dev/hdc2
Displays the results of creating a physical volume.
Pvdisplay | less
3. Create a logical volume group: myvg
Vgcreate myvg/dev/hdb1
Vgextend myvg/dev/hdb2
Vgextend myvg/dev/hdc1
Vgextend myvg/dev/hdc2
Displays the result of creating a logical volume group.
Vgdisplay | less or vgdisplay/dev/myvg
4. Create a logical volume
Lvcreate-n lvOne-L 50 m myvg
Lvcreate-n lvTwo-L 60 m myvg
Displays the result of creating a logical volume.
Lvdisplay
5. format the logical volume
Mkfs-t ext3/dev/mapper/myvg-lvOne
Mkfs-t ext3/dev/mapper/myvg-lvTwo
6. Load and use logical volumes
Mount-t ext3/dev/myvg/lvOne
Mount-t ext3/dev/myvg/lvTwo
Cd/mnt
Touch f1
Touch f2
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service