On 07/21/2015 12:28 PM, Martin Skjöldebrand wrote:

Quoting Erick Ocrospoma <zipper1...@gmail.com>:

On 21 July 2015 at 10:32, Martin Skjöldebrand <mar...@skjoldebrand.eu>
wrote:

Hi,

Mail from desperate user here:

OS: Debian 8.1 Jessie

Scenario: Mail/web server with file corruption. I have I/O errors on a few
blocks which results in regular (daily) server crashes (including kernel
panic) at random times during the day, usually afternoon CET. I need to run
fsck on the disks. I have grub2 installed on the server.

Catch: For some reason there is only one partition - yes I know this is
retarded.
Catch2: This is on virtual hosting provider so I can access the server
through ssh or vnc but not physically

How can I run fsck at boot time while the disks are umounted. Adding
single to the grub linux kernel line fails to actually run fsck as the disk
is mounted when server goes into rescue mode.
I've Googled and (among other suggestions) read about the systemd fsck
service but am not sure this will help or really how to invoke the thing
properly
Adding init=/bin/systemd fsck.mode=force fsck.repair=yes didn't seem to do
much.


Well, common fsck at boot procedure I ever used was:

touch /forcefsck


Thanks for suggestion.
I've tried this but the server is back up in a few seconds, so I am
fairly certain it isn't running a fsck at boot time after issuing
"reboot".

And the only half helpful suggestion from the hosting was running in
single mode from grub, but the disk is mounted at that time. Else to
rollback a snapshot of the server which would mean hours of
reconfiguration which I am hoping to avoid.

/Martin S

Not sure this will be at all helpful considering that the consensus seems to be that fsck is probably not what you need right now. I just wanted to be sure that you got some sort of answer regarding the running of systemd-fsck.

You should be able to see the result of an fsck run with

$ cat /run/initramfs/fsck.log

I use

# tune2fs -c -1 /dev/sda1

to set the system to prevent a full fsck from running at boot time

and

# tune2fs -c 1 /dev/sda1

to cause the system to force a full fsck during the next boot.

HTH,
Jape


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55aec915.5050...@comcast.net

Reply via email to