1

I have a problem starting CentOS 7 x64 server, couple of days ago i've changed /home partition size using tutorial from accepted answer on this topic: tutorial from accepted answer Yesterday I reboot server and get Emergency mode after restart, in journalctl -xb after searching "/mount", I find this errors: error mounting /home

I search some threads on google and apply some solutions but with no effect, I try edit /etc/fstab and edit /home entry, replacing mount source with uuid.

What should i do now? Server started after adding "nofail" in fstab to /home entry, but /home is empty. and I can't login through GUI.

This is /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Jan 23 07:03:49 2017
#
# 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,nofail        0 0
UUID=ec2e72a0-ee18-4f74-b6ae-28a069e86eae /boot                   xfs         defaults,nofail        0 0
/dev/mapper/cl-home     /home                   xfs     defaults,nofail        0 0
/dev/mapper/cl-swap     swap                    swap    defaults        0 0

This is ls /dev/disk/

ata-VMware_Virtual_SATA_CDRW_Drive_00000000000000000001  dm-uuid-LVM-ykmL92MnSfoIxN9erpXWjZ2Zcbf13MF2aFWeRvasqQDqfA3TazaogQcp3goFX692
dm-name-cl-home                                          dm-uuid-LVM-ykmL92MnSfoIxN9erpXWjZ2Zcbf13MF2GFrVUO6PlU5xI9oKerfe2S0W3VxDpxbz
dm-name-cl-root                                          dm-uuid-LVM-ykmL92MnSfoIxN9erpXWjZ2Zcbf13MF2LmuSV8WvCGLkNZlK5cPPiaL2I0LrlMNr
dm-name-cl-swap                                          lvm-pv-uuid-m9QT39-K17C-dVA3-bFOf-vGly-Olgu-pT1BYB

this is fdisk -l

Dysk /dev/sda: 536.9 GB, bajtów: 536870912000, sektorów: 1048576000
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Typ etykiety dysku: dos
Identyfikator dysku: 0x000dc7fb

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200  1048575999   523238400   8e  Linux LVM

Dysk /dev/mapper/cl-root: 107.4 GB, bajtów: 107374182400, sektorów: 209715200
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512


Dysk /dev/mapper/cl-swap: 8455 MB, bajtów: 8455716864, sektorów: 16515072
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512


Dysk /dev/mapper/cl-home: 420.0 GB, bajtów: 419958882304, sektorów: 820232192
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512

if I want to manually mount /home I get:

mount /dev/mapper/cl-home /home
mount: /dev/mapper/cl-home: can't read superblock 

when i try fsck /dev/mapper/cl-home I get:

 If you wish to check the consistency of an XFS filesystem or
repair a damaged filesystem, see xfs_repair(8).

when i try xfs_repair -L /dev/mapper/cl-home it says:

Phase 1 - find and verify superblock... 
xfs_repair: error - read only 0 of 512 bytes 
  • Ok, so to solve this problem I deleted cl-home, recreated it, and copied user data from backup, I find out that xfs file system don't allow to shrink logical volumes. – MrPingus Mar 22 '17 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.