比如,我想把/dev/centos/home下的50G变为8G

1.增加

1.1 去掉挂载 

umount /home

1.2 减小home,

lvreduce -L 8G /dev/centos/home    或 -42G

1.3 扩容/dev/centos/root

lvextend -L 42G /dev/centos/root

xfs_growfs /dev/centos/root

 

2.减小

xfs是不支持减少的,无法使用lvreduce,但无法使用resize2fs,会报错:Couldn't find valid filesystem superblock。意思就是减少后的逻辑分区需要通过mkfs.xfs命令重新格式化一下,如果这个逻辑分区上有重要的文件就歇菜了~

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-03-01
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2021-07-23
  • 2021-06-21
  • 2022-01-07
相关资源
相似解决方案