[Nix-dev] How to fix corrupt .drv files in nix store?

Domen Kožar domen at dev.si
Thu Jul 7 10:41:11 CEST 2016


Can you open an issue to document them?

On Wed, Jul 6, 2016 at 1:21 PM, Bjørn Forsman <bjorn.forsman at gmail.com>
wrote:

> On 5 July 2016 at 17:57, Eelco Dolstra <eelco.dolstra at logicblox.com>
> wrote:
> > Hi,
> >
> > On 07/05/2016 05:18 PM, Bjørn Forsman wrote:
> >> Long version:
> >> I wanted to see how atomic and safe a NixOS update process really is,
> >> so I abused one of my systems by pulling the rootfs disk from it a
> >> number of times duing "nixos-rebuild switch" (trying to simulate a
> >> power cut-off at the worst possible time).
> >
> > This is only safe if you set "sync-before-registering = true" in
> nix.conf.
> > However, that flag is disabled by default because it causes a significant
> > slowdown during evaluation (since every file written to the store needs
> to be
> > fsynced separately).
> >
> >> $ sudo nixos-rebuild -I nixpkgs=. -Q build
> >
> > Try passing the "--repair" flag to nixos-rebuild.
>
> Both "sync-before-registering" and "--repair" are undocumented :-)
>
> Thanks for the info.
>
> - Bjørn
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160707/2eb8c7c6/attachment.html>


More information about the nix-dev mailing list