[sles-beta] SLES12 x86_64 Beta6 snapper not working after autoyast installation, no it works if you know how

Matthias G. Eckermann mge at suse.com
Fri May 16 03:40:01 MDT 2014


Hello Urs,

please open two SRs and ask our team to include
mge at suse.com in the internal bugzillas (as you all
know, Snapshot/Rollback with btrfs and snapper is
the topic I am driving with extra energy:-).

On 2014-05-16 T 09:21 +0000 urs.frey at post.ch wrote:
> Hi
> 
> Don't know how many of you are tinkering on btrfs and autoyast.
> Btrfs is something really good. On the other hand, the need for automated deployment is a basic need.
> So let me share some experience here (those who already know the stuff may smile and exit here ;-)
> 
> When using yast clone_system, the resulting autoinst.xml is far too much.
> Reporting tags, sysvinit runlevel tags containing service definitions and systemd services-manager tags get mixed up and do bite each other, so at first try your installation does get stuck and autoyast configurations are somewhat corrupted.
> In the generated autoinst.xml one finds also many entries called
>    <listentry>.snapshots</listentry>
>    <listentry>.snapshots/1/snapshot</listentry>
>    <listentry>.snapshots/2/snapshot</listentry>
>    <listentry>.snapshots/3/snapshot</listentry>

> These entries are not needed, when setting up from scratch and doing a complete new initialization .
> Yast clone_system does register too much here.

First SR: exclude Snapshots

> Best way is to reduce and try using ext4 or xfs first.
> When the installation with xfs works, introduce btrfs partitioning, btrfs related packages, snapper related package and suse_btrfs tag in bootloader in the autoinst.xml profile.
> 
>       <package>grub2-snapper-plugin</package>
>       <package>libbtrfs0</package>
>       <package>libsnapper2</package>
>       <package>snapper</package>
>       <package>snapper-zypp-plugin</package>
>       <package>yast2-snapper</package>
> 
>   <bootloader>
>     <global>
>       <suse_btrfs>true</suse_btrfs>
>     </global>
>     <loader_type>grub2</loader_type>
> 
> NEVER do a sysconfig entry in autoyast filling out the parameter SNAPPER_CONFIGS=root in /etc/sysconfig/snapper.
> This will result in snapper thinking root config is already done and refusing to work properly.
> 
> So after completion of the autoyast process at first login when you enter snapper list, you will get "unknown config"
> # snapper list
> Unknown config.
> 
> The magic behind is, that one has to create the first root configuration
> # snapper -c root create-config /
> - this will create the /.snapshots subvolume
> - and create the entry SNAPPER_CONFIGS=root in /etc/sysconfig/snapper
> - and also the file /etc/snapper/configs/root which will be used by cron.hourly and cron.daily to create snapshots.
> 
> Finally snapper list will show a short table with the first single snapshot.
> v03er9:~ # snapper list
> Type   | # | Pre # | Date | User | Cleanup | Description | Userdata
> -------+---+-------+------+------+---------+-------------+---------
> single | 0 |       |      | root |         | current     |
> v03er9:~ #
> 
> This snapper -c root create-config / can be placed in autoyast init-script
> 
> Unfortunately this initial configuration of snapper is not documented.
> At least I could not find a trace in the latest release of  book.sle.admin_en.pdf coming with Beta6.
> Source for the final click in my brain was this here http://superuser.com/questions/584245/how-do-i-reinstall-enable-snapper

Second SR: the configuration for btrfs root should be
cloned easily.

Thanks for finding!

so logn -
	MgE


> Best regards
> 
> 
> Urs Frey
> Post CH AG
> Informationstechnologie
> IT Betrieb
> Webergutstrasse 12
> 3030 Bern (Zollikofen)
> Telefon : ++41 (0)58 338 58 70
> FAX     : ++41 (0)58 667 30 07
> E-Mail:   urs.frey at post.ch<mailto:urs.frey at post.ch>
> 
> 
> 

> _______________________________________________
> sles-beta mailing list
> sles-beta at lists.suse.com
> http://lists.suse.com/mailman/listinfo/sles-beta


-- 
Matthias G. Eckermann     Senior Product Manager   SUSE® Linux Enterprise
Phone: +49 30 44315731    Mobile: +49 179 2949448    E-Mail: mge at suse.com
SUSE LINUX Products GmbH  Maxfeldstraße 5          90409 Nürnberg Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)


More information about the sles-beta mailing list