Hello, Am Samstag, 27. April 2019, 21:35:18 CEST schrieb Dave Howorth:
On Sat, 27 Apr 2019 20:06:38 +0200 Christian Boltz wrote:
Am Samstag, 27. April 2019, 09:40:03 CEST schrieb Axel Braun:
I updated TW this morning, and now it looks like this (shortened): # | Typ | before# | Date | Space |
Descript. -----+--------+---------+--------------------+------------+------- ---- -- 0 | single | | | | current 549* | single | | Sa 30 Mär 21:17:16 | 21,11 MiB [...] That gives some insghts: - Still 549 is mounted!
Yes, of course.
When using the "usual"/"traditional" setup, you can think of the additional snapshots as "backups" that are done before and after installing packages etc. As every good backup, they are hopefully superfluous and get thrown away sooner or later ;-)
The snapshot that gets used will only change if you use "snapper rollback". (And I guess you used "snapper rollback" in the past, because otherwise you'd have #1 instead of #549 mounted at /.)
This confuses me. Surely if any snapshot is in use it will be the latest one after the last zypper action? Otherwise, it doesn't correspond to my idea of what yast or zypper do. How can the running system precede the latest changes?
The "current" snapshots is always the newest, even if the other snapshots have a higher number.
What would happen if I rolled back to snapshot 549? Shouldn't that be an older, different state?
Nothing, because you would rollback from 549 to 549. I'll try to explain it with traditional filesystems. Let's say you have an ext4 on /dev/sda1 as your / partition. Before running zypper, you do a backup/snapshot: dd if=/dev/sda1 of=/dev/sda2 (Of course dd isn't the usual way to do backups, but it's close to what taking a snapshot does, at least as long as you ignore the required disk space.) Now you run zypper dup and reboot. Your system still boots from /dev/sda1, and that partition has all the new packages you just installed. Does that make it clear? Now translate that back to btrfs: /dev/sda1 -> snapshot 549 (current, including the updated packages) /dev/sda2 -> one of the 573..583 snapshots (with the old packages)
The longer version of this is on https://www.susecon.com/doc/2015/sessions/HO20031.pdf (which I abused ;-) for a btrfs talk in my LUG recently - thanks Thorsten!)
TL;DR
Maybe you should, it helps to understand btrfs and snapshots ;-)
There's also the option to use transactional updates
But IIRC, using Tx updates is not a good idea?
It depends on your usecase. IMHO the biggest problem with transactional updates is that you need to reboot after installing a package, which can be very annoying if you need an additional program quickly. Actually that's the only reason why I decided against using transactional updates on my laptop. ["superfluous" snapshots when YaST doesn't do any changes]
I agree that the pre-snapshot has to be taken 'pre' otherwise there's no point. But if the yast session is abandoned surely the correct action to take is to remove the pre snapshot, not create an essentially unchanged after snapshot as well?
That would also be an option, but probably [1] isn't much easier than not creating the pre snapshot at all - my guess is that every YaST module would have to be touched to implement this.
That said - if you want to get rid of these superfluous snapshots, feel free to open a bugreport - I'd say it's a valid bug ;-)
Does that mean you agree with me?
Yes. I'm "just" saying that it's not the most critical bug we have, and that fixing it will need quite some time. Nevertheless, feel free to open a bugreport ;-) Regards, Christian Boltz [1] I don't know the YaST code, therefore I can only guess -- Die Liste ist kein bezahltes Ticket System mit psychologischer Betreuung, die Erwartungshaltung gegenüber diesen Diensten erstaunt mich immer wieder. [Alexander Stoll in postfixbuch-users] -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org