English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Successfully moved the root directory from2扩容到0G47Record the steps below:
The format is lvm2
$ df -lh
Filesystem Size Used Avail Use% Mounted on
devtmpfs 5.7G 0 5.7G 0% /dev
tmpfs 5.7G 26M 5.7G 1% /dev/shm
tmpfs 5.7G 1.5M 5.7G 1% /run
tmpfs 5.7G 0 5.7G 0% /sys/fs/cgroup
/dev/mapper/fedora-root <span style="color:#ff0000;">47</span>G 15G 30G 34% /
tmpfs 5.7G 68K 5.7G 1% /tmp
/dev/sda5 488M 236M 218M 52% /boot
tmpfs 1.2G 4.0K 1.2G 1% /run/user/971
/dev/mapper/fedora-home <span style="color:#ff0000;">197</span>G 47G 141G 25% /home
tmpfs 1.2G 16K 1.2G 1% /run/user/1000
$ vgdisplay
--- Volume group ---
VG Name fedora
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 318.77 GiB
PE Size 4.00 MiB
Total PE 81606
Alloc PE / Size 81605 / 318.77 GiB
Free PE / Size 1 / 4.00 MiB
VG UUID XckxJ7-6CfX-zxJi-zoUq-xBOK-epVz-BQk1Ss
1. Cut a piece of space from other directories, I am cutting from/home cut out27G
umount -v /home #Unmount, must
e2fsck -ff /dev/mapper/fedora-home #Here is to check the disk5steps must all pass
resize2fs /dev/mapper/fedora-home 197G #Here197G refers to the remaining space size
lvreduce -L -27G /dev/mapper/fedora-home #Here27G refers to the size of the cut space
mount -v /home # Remount
2Add the space cut from elsewhere to the root directory
lvextend -L+27G /dev/mapper/fedora-root #27G added to the root directory
resize2fs /dev/mapper/fedora-root # Take effect
The above article on fedora 23 lvm2The expansion method of the root directory disk space is insufficient is all the content shared by the editor, hoping to provide a reference for everyone, and also hope that everyone will support the Shouting Tutorial more.