Nicolas Graves <ngra...@ngraves.fr> writes:

> On 2025-04-08 11:05, ruthert...@ditigal.xyz wrote:
>
>> Hello Nicolas,
>>
>> As for your original question 'how can that even happen?', it's quite
>> common for this to happen if disk is not unmounted cleanly, especially
>> right after reconfigure. It's actually quite easy to 'reproduce' this is
>> a VM by issuing reconfigure and then forcefully shutting it down. Since
>> people usually reboot after reconfigure, it's a problem when the
>> disks aren't unmounting cleanly... (ie the issue linked 77086)
>
> I thought that because we were using copy-on-write, the files only
> were actually saved on the filesystem when they were properly produced,
> and thus properly recorded in the gc.

Yes, that is exactly what happens. But it's not relevant to this. You
even have them properly recorded as you can find them with guix gc
--verify. (meaning the database knows about them)
But on the other hand it's not responsibility of Guix to actually make
sure the files are written to the disk itself. It just makes sure what
currently is on the filesystem is fine. If filesystem -> disk sync fails
somewhere, that's an issue.

>
> So it's not possible to have stronger guarantees on that issue?

No, it's never possible to have guarantees on file corruption. Ie. for
disk problems or when file system is not unmounted before halting. This
can cause all sorts of issues, one of them being only the inode is
saved, but the contents actually not.

>
>> So you are using luks, typed in your password, got a black screen so
>> forced shutdown?
>
> I don't even have the screen to type my password on LUKS ; it's just
> plain blank when I hit `reboot --kexec` and it hangs indefinitely, no
> message or nothing.

As was said in the issue, the screen will remain blank, but you type
your password anyway. You don't see the prompt, but it's there, just not
visible. I actually did try this myself yesterday and it was working.

>
>>
>> I am thinking that your system might not have actually shutdowned
>> properly, because otherwise it doesn't make sense to me your store files
>> would get corrupted.
>
> When I reboot without kexec, my system usually complains about unmounted
> /run/user/1000, but I don't know if that might have something to do with
> it.

Yes, that could be the issue, it doesn't sound good. The unmounting
should finish without errors.

Regards,
Rutherther

Reply via email to