|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
欢迎大家来到仓酷云论坛!上面的操纵是经由过程实践操纵完成的。
上面的例子实验吧home空间的20G中的5G分出来给root空间
[root@localhost~]#df-h
文件体系容量已用可用已用%%挂载点
/dev/mapper/VolGroup-lv_root
75G50G22G70%/
tmpfs3.9G88K3.9G1%/dev/shm
/dev/sda1485M30M430M7%/boot
/dev/mapper/VolGroup-lv_home
20G174M19G1%/home
[root@localhost~]#umount/home
[root@localhost~]#e2fsck-f/dev/mapper/VolGroup-lv_home
e2fsck1.41.12(17-May-2010)
第一步:反省inode,块,和巨细
第二步:反省目次布局
第3步:反省目次毗连性
Pass4:Checkingreferencecounts
第5步:反省簇提要信息
/dev/mapper/VolGroup-lv_home:158/1310720files(0.0%non-contiguous),126581/5242880blocks
[root@localhost~]#resize2fs-p/dev/mapper/VolGroup-lv_home15G
resize2fs1.41.12(17-May-2010)
Resizingthefilesystemon/dev/mapper/VolGroup-lv_hometo3932160(4k)blocks.
Beginpass3(max=160)
正在扫描inode表XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thefilesystemon/dev/mapper/VolGroup-lv_homeisnow3932160blockslong.
[root@localhost~]#mount/home
[root@localhost~]#df-h
文件体系容量已用可用已用%%挂载点
/dev/mapper/VolGroup-lv_root
75G50G22G70%/
tmpfs3.9G88K3.9G1%/dev/shm
/dev/sda1485M30M430M7%/boot
/dev/mapper/VolGroup-lv_home
15G170M14G2%/home
[root@localhost~]#lvreduce-L15G/dev/mapper/VolGroup-lv_home
WARNING:Reducingactiveandopenlogicalvolumeto15.00GiB
THISMAYDESTROYYOURDATA(filesystemetc.)
Doyoureallywanttoreducelv_home?[y/n]:y
Reducinglogicalvolumelv_hometo15.00GiB
Logicalvolumelv_homesuccessfullyresized
[root@localhost~]#vgdisplay
---Volumegroup---
VGNameVolGroup
SystemID
Formatlvm2
MetadataAreas1
MetadataSequenceNo7
VGAccessread/write
VGStatusresizable
MAXLV0
CurLV3
OpenLV3
MaxPV0
CurPV1
ActPV1
VGSize99.51GiB
PESize4.00MiB
TotalPE25474
AllocPE/Size24194/94.51GiB
FreePE/Size1280/5.00GiB
VGUUIDcxzV5u-cG1f-HvPd-pE8c-eKrR-dBjN-H07k3I
[root@localhost~]#lvextend-L+5.00G/dev/mapper/VolGroup-lv_root
Extendinglogicalvolumelv_rootto80.57GiB
Logicalvolumelv_rootsuccessfullyresized
[root@localhost~]#resize2fs-p/dev/mapper/VolGroup-lv_root
resize2fs1.41.12(17-May-2010)
Filesystemat/dev/mapper/VolGroup-lv_rootismountedon/;on-lineresizingrequired
olddesc_blocks=5,new_desc_blocks=6
Performinganon-lineresizeof/dev/mapper/VolGroup-lv_rootto21121024(4k)blocks.
Thefilesystemon/dev/mapper/VolGroup-lv_rootisnow21121024blockslong.
[root@localhost~]#df-h
文件体系容量已用可用已用%%挂载点
/dev/mapper/VolGroup-lv_root
80G50G27G66%/
tmpfs3.9G88K3.9G1%/dev/shm
/dev/sda1485M30M430M7%/boot
/dev/mapper/VolGroup-lv_home
15G170M14G2%/home
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们! |
|