LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   FSCK Question (https://www.linuxquestions.org/questions/linux-general-1/fsck-question-517007/)

carlosinfl 01-06-2007 06:35 PM

FSCK Question
 
I was reading that running "fsck" will scan the disk for errors and possible repair them so I attempted to try this on my box and received the following message...

Code:

cwilliams:~# fsck
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
/dev/mapper/cwilliams-root is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? no

check aborted.

What is the normal process to do something like this?

jschiwal 01-06-2007 07:03 PM

When your computer boots, the root file system is in ram and the partitions are initially mounted read only. Then, every so many boots, fsck is run and the system is checked.

To do it manually, on your root file system, since everything is mounted there, you need to do the same thing and boot up using a rescue disk and perform repairs with the disk off-line. You don't have the option of unmounting the the root filesystem because you need it to run normally.

dv502 01-06-2007 07:03 PM

It means if the device is mounted, you or someone might
write onto the device as it it scanning or repairing. That's why it suggests you umount the device before using
fsck. For example, when fsck starts to scan or repair your /home directory and you are surfing the net, cookies and cache are writing to the disk. And this will cause problems. So umount to be safe.


All times are GMT -5. The time now is 11:53 AM.