pavement

Fsck

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
[[fsck]] acronymic for file system check. Typically run with the -y switch to check the filesystem in question and fix any errors it finds. FreeBSD, like most unixes, doesn't immediately write to disk. It first stores any writes to temporary memory -- RAM or [[swap]] -- and then later writes the changes to disk. This is handy because it's fast. The tradeoff is that if you have a pending write and your system shuts down before it gets done -- say a power outage happens -- your system may suddenly have a corrupted filesystem or partition.
 
[[fsck]] acronymic for file system check. Typically run with the -y switch to check the filesystem in question and fix any errors it finds. FreeBSD, like most unixes, doesn't immediately write to disk. It first stores any writes to temporary memory -- RAM or [[swap]] -- and then later writes the changes to disk. This is handy because it's fast. The tradeoff is that if you have a pending write and your system shuts down before it gets done -- say a power outage happens -- your system may suddenly have a corrupted filesystem or partition.
 +
 +
Note that a filesystem has to be un[[mount]]ed before you can actually make repairs to it, although you can check it over and see if it NEEDS repairs while it's mounted.  If one of the basic system mounts like / or /usr or /var needs checking, it's highly recommended that you drop to [[single-user mode]] rather than forcibly unmounting the filesystem in question.
 +
 +
[[Category:System Commands]]

Revision as of 08:59, 18 October 2004

fsck acronymic for file system check. Typically run with the -y switch to check the filesystem in question and fix any errors it finds. FreeBSD, like most unixes, doesn't immediately write to disk. It first stores any writes to temporary memory -- RAM or swap -- and then later writes the changes to disk. This is handy because it's fast. The tradeoff is that if you have a pending write and your system shuts down before it gets done -- say a power outage happens -- your system may suddenly have a corrupted filesystem or partition.

Note that a filesystem has to be unmounted before you can actually make repairs to it, although you can check it over and see if it NEEDS repairs while it's mounted. If one of the basic system mounts like / or /usr or /var needs checking, it's highly recommended that you drop to single-user mode rather than forcibly unmounting the filesystem in question.

Personal tools