Last update at :2024-04-23,Edit by888u
My system is Centos 6.8 64-bit, 5 new hard drives have been added, and all space has been added to the root directory. All are operated under root user and ssh.
1. Check the hard disk status
fdisk -l2. Partition each hard disk into 1 area and set it to lvm format
fdisk /dev/sdbEnter n, p, 1, Enter, Enter, t, 8e, and w respectively to create the following partitions: /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, /dev/ sdf1
3. To create a physical volume (PV), first check the existing physical volume (PV)
pvdisplayCreate a physical volume (PV)
pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf14. Add PV to volume group (VG)
vgdisplayAdd the new PV to the vg group volume
vgextend vg /dev/sdb1Add all partitions to the vg group volume
5. Check the lv path name through lvdisplay because mkfs.ext4 will use this name later instead of the name of the created lv.
lvdisplay6. Format partition
mkfs.ext4 /dev/sdb17. Expand the root directory capacity
lvextend -L +1.8T /dev/vg/root7. Refresh the root directory capacity
resize2fs /dev/vg/rootRecommended site searches: cloud server, asp.net host, website ip query, telecommunications server rental, Beijing domain name registration application free space, how much does website registration cost, independent ip, ip query, php host space,
发表评论