Linux system logical volume management-Linux general technology-Linux technology and application information. The following is a detailed description. In linux. how to effectively use and manage buckets is a very important technology. yesterday afternoon, I was really sleepy. teacher Huang talked about logical volume Management (LVM). I took a nap below and listened to it. I came back and practiced it, the following shows how to create a logical volume (using sdb as an example ):
A. Partition (# fdisk/etc/sdb --- create partition by n --- press P --- enter Partition Number --- input partition size -- OK) to create two partitions: sdb1 and sdb2
B. Create a physical volume (# pvcreate/dev/sdb1/dev/sdb2)
C. Create a physical volume group (# vgcreate volume group logical name/dev/sdb1/dev/sdb2)
D. Activate the volume group (that is, create a logical volume group # vgchange-a y volume group logical name)
E. Create a logical volume (# lvcreate-L size-n logical volume name logical volume group name)
F. Format (# mkfs-t ext3/dev/volume group logical name/logical volume name)
G. Use it (mount it for use. To enable automatic mounting next time, you can add corresponding entries in/etc/fstab)
In this case, run the df-h command to check the mounting status (if you want to detach the instance, first use the # fuser-u/Mount path to check the usage, and then use the # fuser-k mount path, remove it, And then detach the mounted volume.
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