8

I have a server that I rebooted without using the f option in my shutdown command, and it started doing a fsck of a very large filesystem... which will take a very long time, as you can imagine. Is it safe to reboot while this is in progress to get around it?

snk
  • 372
  • 3
  • 4
  • 10

3 Answers3

7

Depends on the filesystem and the actual checking. E.g. it is usually not a good idea to interrupt a reiserfsck --rebuild-tree but nothing can happen when interrupting a read-only fsck of an ext3 filesystem.

DaDaDom
  • 532
  • 6
  • 16
  • Is there any way to tell exactly what it's doing during boot? `Alt-F` keys don't give me other consoles... – snk Feb 22 '10 at 15:43
  • What exactly do you see? If you see this blue bubble thingy, try hitting ESC. – DaDaDom Feb 22 '10 at 16:02
  • I just see a CLI progress bar... it's a text bootup of a CentOS 5.2 installation. In any case, it's finished now -- thank you for your input. – snk Feb 22 '10 at 16:20
4

The filesystem check on boot is usually read-only until it finds a problem then it will prompt you before making any changes so it is probably safe to intereupt.

But is is quite possible (and not uncommon for servers that need to come back up after a power-out) for it to be set to auto-fix, so unless you know for sure that your system is not configured this way let it run to completion for safety.

Most fsck programs are written in such a way that any changes that make are as atomic as possible and they will clean-up (completing or rolling back any current change) before responding to a TERM or INT signal (SIGINT is what is sent to the active process when ctrl+c is pressed) so even an actively writing fsck should be safe to interrupt, but I woudl not recommend taking the risk - better safe than sorry!

David Spillett
  • 22,534
  • 42
  • 66
1

I wouldn't stop it. Yeah, there probably isn't a problem with an auto fsck triggered byt it being the 37th or what ever mount with out needing one, but probably a good thing to do.

Get a journaled or better file system. Get btrfs (and back up :-D ) .

Ronald Pottol
  • 1,683
  • 1
  • 11
  • 19