-
Add the disk to the machine that needs to be mounted
-
lsblk
Check the hard disk mounting situation, sdb, sdc are my newly mounted disks
-
fdisk -l
View the partition status before mounting
-
Create a partition for a new hard disk.
fdisk /dev/sdb
The terminal will prompt:
Command (m for help): Input: n
and then enter p and 1 in turn,
and then the volume’s start address and end address will be prompted, keep the default and press Enter (meaning only Divide into one area)
Enter "w" to save and launch
-
Use
fdisk -l
the view again, and /dev/sdb1 appears, indicating that the partition work is completed
-
mkfs -t ext3 /dev/sdb1
Format the new area
-
lsblk
List all available device block information
-
vgdisplay -v
View volume groups
-
pvcreate /dev/sdb1
create physical volume
-
pvdisplay
View creation results
-
vgextend centos /dev/sdb1
Extended volume group, wherecentos
is the VG Name in step 8
-
lvextend -L +256G /dev/centos/root
Extend Logical Volume
-
df -h
Check the mounts, don't panic, haha
-
xfs_growfs /dev/centos/root
sync file system
-
df -h
Check the mounting status again, it has been OK
Linux mounts the new disk to the root directory
Guess you like
Origin blog.csdn.net/github_36665118/article/details/130529448
Recommended
Ranking