nix-community / disko

Declarative disk partitioning and formatting using nix [maintainers=@Lassulus @Enzime @iFreilicht]
MIT License
1.86k stars 198 forks source link

Always cleaning parttion table then run #798

Closed Sk7Str1pe closed 4 weeks ago

Sk7Str1pe commented 1 month ago

Disko is always formating disks even if configuration not changed, id (not only me I hope) would like to change partitions without actual formatting, like resizing or changing LUKS password, adding new subvols for btrfs/bcachefs, etc.

iFreilicht commented 1 month ago

If you use --mode format, disko will not delete old partitions. This feature was added in #568.

It is true that not all kinds of changes are currently supported, but we're working on it. We recommend running with --dry-run first, then check the output script to make sure it won't delete anything, then run without --dry-run. See https://github.com/nix-community/disko/pull/568#issuecomment-2304986389 for more details.

Please try this out and report any missing features or bugs in this functionality.

iFreilicht commented 4 weeks ago

I'm considering this question to be answered. If my answer was not sufficient, feel free to re-open.