You are not logged in.

#1 2019-02-07 09:06:52

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Corrupted filesystem doing sync while kernel upgrade

I issued a sync command while performing a system upgrade. The system was updating the kernel. (more exactly it was performing the hooks after the kernel upgrade: updating modules dependencies, etc.). This led to a deeply corrupted system while the root filesystem was reported as read only by the kernel; after having hanged for some time. After a reboot, I was forced to issue a "fsck -y" to repair the errors (I had a message saying that "please run fsck manually").  After that, some of the files, including the kernel, that the system was updating appeared to be empty and the corresponding pacman  database was corrupted (invalid mtree). I eventually reinstall them with the "--force" option from a boot disk. Now everything seems to work again...

Is that expected? Normal? I thought sync should be pretty innocent. I certainly didn't expect that it could corrupt the system.

I have a new SSD that otherwise seems to work reliably. I use the lts kernel.

Last edited by olive (2019-02-07 10:16:02)

Offline

#2 2019-02-07 10:51:06

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Corrupted filesystem doing sync while kernel upgrade

sync - Synchronize cached writes to persistent storage

sounds like the sync operation interfered with the upgrade writing changed data.

What was the exact command you used and what type of filesystem where you running it on ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-02-07 11:42:32

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Corrupted filesystem doing sync while kernel upgrade

I use an ext4 filesystem. The exact command was just "sync" during "pacman -Syu".

I usually issue a sync command after an upgrade and before rebooting after a system upgrade, to be sure the files are OK in case of a problem while rebooting (that can append if we update systemd). This time I issued the sync command too early, before pacman finished. Anyway, I thought 'sync' should be innocent. Look like a bug of some sort.

Offline

#4 2019-02-07 14:22:55

seth
Member
Registered: 2012-09-03
Posts: 51,165

Re: Corrupted filesystem doing sync while kernel upgrade

Wild guess, output of "mount"?

Offline

Board footer

Powered by FluxBB