下面的操作是通过实际操作完成的。
下面的例子尝试吧home空间的20G中的5G分出来给root空间
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-lv_root
75G 50G 22G 70% /
tmpfs 3.9G 88K 3.9G 1% /dev/shm
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/VolGroup-lv_home
20G 174M 19G 1% /home
[root@localhost ~]# umount /home
[root@localhost ~]# e2fsck -f/dev/mapper/VolGroup-lv_home
e2fsck 1.41.12 (17-May-2010)
第1步: 检查inode,块,和大小
第2步: 检查目录结构
第3步: 检查目录连接性
Pass 4: Checking reference counts
第5步: 检查簇概要信息
/dev/mapper/VolGroup-lv_home: 158/1310720files (0.0% non-contiguous), 126581/5242880 blocks
[root@localhost ~]# resize2fs -p/dev/mapper/VolGroup-lv_home 15G
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on/dev/mapper/VolGroup-lv_home to 3932160 (4k) blocks.
Begin pass 3 (max = 160)
正在扫描inode表 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on/dev/mapper/VolGroup-lv_home is now 3932160 blocks long.
[root@localhost ~]# mount /home
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-lv_root
75G 50G 22G 70% /
tmpfs 3.9G 88K 3.9G 1% /dev/shm
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/VolGroup-lv_home
15G 170M 14G 2% /home
[root@localhost ~]# lvreduce -L 15G /dev/mapper/VolGroup-lv_home
WARNING: Reducing active and open logical volume to 15.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv_home?[y/n]: y
Reducing logical volume lv_home to 15.00 GiB
Logical volume lv_home successfully resized
[root@localhost ~]# vgdisplay
---Volume group ---
VGName VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VGAccess read/write
VGStatus resizable
MAXLV 0
CurLV 3
Open LV 3
MaxPV 0
CurPV 1
ActPV 1
VGSize 99.51 GiB
PESize 4.00 MiB
Total PE 25474
Alloc PE / Size 24194 /94.51 GiB
Free PE / Size 1280 / 5.00 GiB
VGUUID cxzV5u-cG1f-HvPd-pE8c-eKrR-dBjN-H07k3I
[root@localhost ~]# lvextend -L +5.00G/dev/mapper/VolGroup-lv_root
Extending logical volume lv_root to 80.57 GiB
Logical volume lv_root successfully resized
[root@localhost ~]# resize2fs -p/dev/mapper/VolGroup-lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup-lv_rootis mounted on /; on-line resizing required
old desc_blocks = 5, new_desc_blocks = 6
Performing an on-line resize of/dev/mapper/VolGroup-lv_root to 21121024 (4k) blocks.
The filesystem on/dev/mapper/VolGroup-lv_root is now 21121024 blocks long.
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-lv_root
80G 50G 27G 66% /
tmpfs 3.9G 88K 3.9G 1% /dev/shm
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/VolGroup-lv_home
15G 170M 14G 2% /home
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
更新日志
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]