nixos-facter icon indicating copy to clipboard operation
nixos-facter copied to clipboard

Detect if LVM snapshots are being used

Open brianmcgee opened this issue 1 year ago • 2 comments

For reference https://github.com/NixOS/nixpkgs/blob/dac9cdf8c930c0af98a63cbfe8005546ba0125fb/nixos/modules/installer/tools/nixos-generate-config.pl#L265-L268

brianmcgee avatar Jun 12 '24 18:06 brianmcgee

Just because you use LVM doesn't necessarily mean you are using snapshots. This logic needs to be refined.

#9 might also provide the info necessary for this logic, tbd.

Here's some context as to where this logic came from: https://github.com/NixOS/nixpkgs/issues/33646

brianmcgee avatar Aug 01 '24 11:08 brianmcgee

On the other hand, just because a volume doesn't have snapshots at the time you run nixos-facter, doesn't mean that no snapshots could be created at a later point. So I think always adding the module when LVM is detected is actually the right thing to do.

r-vdp avatar Sep 20 '24 10:09 r-vdp