lvremove /dev/mapper/centos-home error systemd

re-sizing-partitions-in-centos7-_-tips-and-tricks-from-a-mac-admin
WARNING ALWAYS CREATE BACKUPS OF THE SYSTEM PRIOR WORKING WITH FILESYSTEMS AND PARTITIONS!
So,
you still have a home.
1) Make a backup of the «/home»
2) Unmount and Remove home (currently its still there)
umount /dev/centos/home && lvremove /dev/centos/home

3) Recreate home
CODE: SELECT ALL
lvcreate -L 105 GiB -n home centos

4) Make a filesystem
CODE: SELECT ALL
mkfs.ext4 -L /dev/centos/home
or
CODE: SELECT ALL
mkfs.xfs -L /dev/centos/home

5) Mount the new partition manually
CODE: SELECT ALL
mount -t /dev/centos/home /home

6) Check new home is ok.
CODE: SELECT ALL
lsblk
or
CODE: SELECT ALL
mount | grep home

7) Edit fstab
CODE: SELECT ALL
cp -a /etc/fstab /etc/fstab_bkp && vi /etc/fstab

Add the home entry (if previous exists — care with UUID and LABEL , as they are different than before):
CODE: SELECT ALL
/dev/fedora/home /home defaults 1 2
or
CODE: SELECT ALL
UUID=»» /home defaults 1 2

8)Umount the home again
CODE: SELECT ALL
cd / && umount /dev/centos/home

8) Check if fstab is ok
CODE: SELECT ALL
mount -a && mount | grep home

If the home is mounted again — then the fstab is also ok.
Then just restore your backup over the home and issue the following if you use selinux:
CODE: SELECT ALL
restorecon -Rv /home

  1. Пока комментариев нет.

  1. Пока что обратных ссылок нет.