Discussion:
Anaconda snapshot KS command
Jiří Konečný
2016-06-23 15:36:38 UTC
Permalink
Hello guys,

I'm doing this bug https://bugzilla.redhat.com/show_bug.cgi?id=1113207 
and because of it I need to create new KS command for snapshot
creation. Because kickstart is something with really stable API, I want
to ask everyone before I'll implement something badly.

Possible solutions:


Adding --snapshot parameter to existing KS command
--------------------------------------------------
 * It should be easier to implement.
 * Could be easier to find in documentation.
 * It's logically part of that storage type.
 * logvol command have big number of parameters now.

Adding standalone snapshot command
----------------------------------
 * Harder to implement but it's more general.
 * Easier to extend.
 * Easier to just add support for btrfs with additional required
parameters and anything else in future and syntax will not change so
much.

Personally I see the snapshot command as better choice but want to hear
your idea.

Thank you for your feedback,
Jirka
Brian C. Lane
2016-06-23 15:56:49 UTC
Permalink
Post by Jiří Konečný
Hello guys,
I'm doing this bug https://bugzilla.redhat.com/show_bug.cgi?id=1113207 
and because of it I need to create new KS command for snapshot
creation. Because kickstart is something with really stable API, I want
to ask everyone before I'll implement something badly.
Adding --snapshot parameter to existing KS command
--------------------------------------------------
 * It should be easier to implement.
 * Could be easier to find in documentation.
 * It's logically part of that storage type.
 * logvol command have big number of parameters now.
Adding standalone snapshot command
----------------------------------
 * Harder to implement but it's more general.
 * Easier to extend.
 * Easier to just add support for btrfs with additional required
parameters and anything else in future and syntax will not change so
much.
Personally I see the snapshot command as better choice but want to hear
your idea.
I like the standalone snapshot command. The user doesn't need to know
what's underneath it and could possibly do:

autopart --type=thinp
snapshot --name=initial_install

And then switching to btrfs would be as simple as using a different
autopart type.

If used with non-autopart it will also need to sanity check their
storage setup to make sure they are using something that supports
snapshots.

I also agree with your comment in the bug, minimize changes to Anaconda
and keep using /.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
Jiří Konečný
2016-06-24 06:23:42 UTC
Permalink
Post by Brian C. Lane
Post by Jiří Konečný
Hello guys,
I'm doing this bug https://bugzilla.redhat.com/show_bug.cgi?id=1113
207 
and because of it I need to create new KS command for snapshot
creation. Because kickstart is something with really stable API, I want
to ask everyone before I'll implement something badly.
Adding --snapshot parameter to existing KS command
--------------------------------------------------
 * It should be easier to implement.
 * Could be easier to find in documentation.
 * It's logically part of that storage type.
 * logvol command have big number of parameters now.
Adding standalone snapshot command
----------------------------------
 * Harder to implement but it's more general.
 * Easier to extend.
 * Easier to just add support for btrfs with additional required
parameters and anything else in future and syntax will not change so
much.
Personally I see the snapshot command as better choice but want to hear
your idea.
I like the standalone snapshot command. The user doesn't need to know
autopart --type=thinp
snapshot --name=initial_install
And then switching to btrfs would be as simple as using a different
autopart type.
If used with non-autopart it will also need to sanity check their
storage setup to make sure they are using something that supports
snapshots.
Good point, I totally forgot about autopart. Requirement for sanity
check is main reason why I wrote that it will be harder to implement.

Thank you for pointing this out.
Post by Brian C. Lane
I also agree with your comment in the bug, minimize changes to
Anaconda
and keep using /.
Martin Kolman
2016-06-24 08:46:14 UTC
Permalink
Post by Brian C. Lane
Post by Jiří Konečný
Hello guys,
I'm doing this bug https://bugzilla.redhat.com/show_bug.cgi?id=1113
207 
and because of it I need to create new KS command for snapshot
creation. Because kickstart is something with really stable API, I want
to ask everyone before I'll implement something badly.
Adding --snapshot parameter to existing KS command
--------------------------------------------------
 * It should be easier to implement.
 * Could be easier to find in documentation.
 * It's logically part of that storage type.
 * logvol command have big number of parameters now.
Adding standalone snapshot command
----------------------------------
 * Harder to implement but it's more general.
 * Easier to extend.
 * Easier to just add support for btrfs with additional required
parameters and anything else in future and syntax will not change so
much.
Personally I see the snapshot command as better choice but want to hear
your idea.
I like the standalone snapshot command. The user doesn't need to know
autopart --type=thinp
snapshot --name=initial_install
Yeah - and also by having a separate command, we also get a namespace
"for free", unlike if the snapshot functionality was piggybacking on an
existing command, where all commands would need to be accordingly
prefixed (--snapshot-foo, --snapshot--bar, etc.).
Post by Brian C. Lane
And then switching to btrfs would be as simple as using a different
autopart type.
If used with non-autopart it will also need to sanity check their
storage setup to make sure they are using something that supports
snapshots.
I also agree with your comment in the bug, minimize changes to
Anaconda
and keep using /.
Chris Lumens
2016-06-23 18:23:43 UTC
Permalink
Post by Jiří Konečný
Adding standalone snapshot command
----------------------------------
 * Harder to implement but it's more general.
 * Easier to extend.
 * Easier to just add support for btrfs with additional required
parameters and anything else in future and syntax will not change so
much.
Personally I see the snapshot command as better choice but want to hear
your idea.
What do you imagine the snapshot command will do? What arguments will
it need to take?

- Chris
Jiří Konečný
2016-06-24 06:46:02 UTC
Permalink
Post by Jiří Konečný
Adding standalone snapshot command
----------------------------------
 * Harder to implement but it's more general.
 * Easier to extend.
 * Easier to just add support for btrfs with additional required
parameters and anything else in future and syntax will not change so
much.
Personally I see the snapshot command as better choice but want to hear
your idea.
What do you imagine the snapshot command will do?  What arguments
will
it need to take?
Now it won't do much, it only takes name of the thin-LVM and name of
the future snapshot. When you use this command, it creates snapshot
before the system will restart at the end of the installation.
Main reason for this is testing if everything is fine after an
installation and factory reset for a running system.

For future I think it should have:
* before/after (or even before post/pre section) installation do a
snapshot to existing LV
* required parameters for other storage (like size of a snapshot for
normal LVM) and who knows what for btrfs or anything else in the future
* mountpoint where you want to mount this snapshot (you can do backup
of whole system before install and automatically mount it to some place
in installed system)
  * mount it as ro/rw should be another parameter

I think there could be even more of similar features.
Loading...