1.首先退出所有用户登陆,root直接登陆,
执行:
mkdir /data/home
mv /home/* /data/home/
umount /dev/mapper/cl-home
lvremove /dev/mapper/cl-home
lvextend -r -l +100%FREE /dev/mapper/cl-root
RM -rf home/
ln -s /data/home
2.如果umount 失败, fuser -m /home。一次不行再继续几次
3.如果重启系统,登陆不正常,并且连不上网,则需要以下修改
(1) root 登陆
(2)执行journalctl -xb
输入 /mount,查找错误的磁盘分区 ,应该是
(3)vim /etc/fstab 在对应错误磁盘分区的options下边加上nofail,用逗号分开
[root@T430-7 ]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Jan 11 16:52:19 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/cl-root / xfs defaults 0 0
UUID=a8af4f2e-7741-417e-820f-4804af153ac0 /boot xfs defaults 0 0
UUID=5B37-F9B8 /boot/efi vfat umask=0077,shortname=winnt 0 0
/dev/mapper/cl-data /data xfs defaults 0 0
/dev/mapper/cl-home /home xfs defaults,nofail 0 0
/dev/mapper/cl-swap swap swap defaults 0 0
(4)重启服务器