[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: trixie update/upgrade strangeness



Hello,

On Thu, Oct 12, 2023 at 10:08:06AM -0500, David Wright wrote:
> It's not clear to me what's meant in this thread by snapshot.

Neither is it yet clear if the OP knows or if my description of a
snapshot is the same as what the OP is experiencing, so I can only
tell you what I meant.

> If you mean snapshot in the way it's been used in several recent
> threads here (something that takes up no room to start with, but
> gradually grows as the filesystem is modified, ie Copy-On-Write),
> then I don't see how you can mount such an object on rebooting.
> Is that possible?

Yes. An LVM snapshot LV is a new block device that can be used
in exactly the same way as an existing LVM LV. Since it is a copy
[on write] of the origin, if there is a filesystem on the origin
block device then the snapshot will have the same FS label and FS
UUID as the one on the origin device.

If your initramfs is set up to activate an LVM volume group then
every LV inside it will appear as an available block device to the
kernel. It is possible for the step which mounts things by label
or UUID to find the one on the snapshot before it finds the one on
the origin device.

This will mount and be writeable by default, at which point you have
a snapshot that diverges from the origin.

To avoid this sort of thing, many people prefer to refer to LVs by
their LVM path, e.g. /dev/vgname/lvname rather than label or UUID.

In the case of my customer, they took a snapshot while doing an
upgrade and then forgot about it. Nearly a year later they had cause
to reboot, and were confused as to why everything seemed about a
year old. By then they had forgotten that the snapshot even existed.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: