Last Updated: 27 Jun 2023
|
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
server-tech:centos:running-fsck [Jul 20, 2009 10:21 PM] dordal |
server-tech:centos:running-fsck [Jun 24, 2023 04:35 AM] 110.249.202.201 removed |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | = Running fsck in CentOS 5= | ||
+ | It is apparently a very bad idea to run fsck on a mounted filesystem, even via single user mode. There are two good options for running it: | ||
+ | === Boot from a CD === | ||
+ | Boot from a CD with CentOS on it, and run it from the CD. Then none of your filesystems are mounted. | ||
+ | |||
+ | To do this, boot into Linux Rescue Mode: | ||
+ | < | ||
+ | boot: linux rescue | ||
+ | </ | ||
+ | |||
+ | **DO NOT mount your filesystems when it asks you if you want to.** As noted above, you can't run '' | ||
+ | |||
+ | Once you're in rescue mode, run '' | ||
+ | < | ||
+ | fsck -f /dev/sda1 | ||
+ | </ | ||
+ | |||
+ | If you've used the Linux LVM to create your partitions, you'll need to make those accessible before you run '' | ||
+ | < | ||
+ | lvm pvscan | ||
+ | lvm vgscan | ||
+ | lvm lvchange -ay VolGroup00 | ||
+ | lvm lvscan | ||
+ | </ | ||
+ | |||
+ | Then you can run '' | ||
+ | < | ||
+ | fsck -f / | ||
+ | </ | ||
+ | |||
+ | === Run on restart === | ||
+ | If you type< |