Difference between revisions of "How to run xfs repair on root filesystem"

From DevOps Notebook
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
# Reboot linux
+
1. Reboot linux <br
# On boot menu, select to edit grub (usually e)
+
2. On boot menu, select to edit grub (usually e) <br>
# Into line that loads kernel, at the and add word ''single''. This will get us into single user mode
+
3. Into line that loads kernel, at the and add word ''single''. This will get us into single user mode <br>
 
   <pre>
 
   <pre>
 
   linux16 /vmlinuz-3.10.0-693.11.6.el7.x86_64 root=UUID=3bdc876d-248e-48e2-ac07-4ff532f6b999 ro\
 
   linux16 /vmlinuz-3.10.0-693.11.6.el7.x86_64 root=UUID=3bdc876d-248e-48e2-ac07-4ff532f6b999 ro\
 
   crashkernel=auto rhgb quiet LANG=en_US.UTF-8 single
 
   crashkernel=auto rhgb quiet LANG=en_US.UTF-8 single
 
   </pre>
 
   </pre>
# After entering password, make sure partition is in read-only mode
+
4. After entering password, make sure partition is in read-only mode
 
   <pre>
 
   <pre>
  mount -oremount,ro /
+
# mount -oremount,ro /
 
   </pre>
 
   </pre>
# Then run
+
5. Then run
 
   <pre>
 
   <pre>
  # xfs_repair -d /dev/<your_root_device>
+
# xfs_repair -d /dev/<your_root_device>
 
   </pre>
 
   </pre>
# Reboot
+
6. Reboot

Latest revision as of 21:36, 21 November 2019

1. Reboot linux <br 2. On boot menu, select to edit grub (usually e)
3. Into line that loads kernel, at the and add word single. This will get us into single user mode

  linux16 /vmlinuz-3.10.0-693.11.6.el7.x86_64 root=UUID=3bdc876d-248e-48e2-ac07-4ff532f6b999 ro\
  crashkernel=auto rhgb quiet LANG=en_US.UTF-8 single
  

4. After entering password, make sure partition is in read-only mode

# mount -oremount,ro /
  

5. Then run

# xfs_repair -d /dev/<your_root_device>
  

6. Reboot