Re: [PATCH v1 0/4] setting uuid of online filesystems

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

 



On Sun, Mar 19, 2023 at 11:16:48AM +1100, Dave Chinner wrote:
> On Thu, Mar 16, 2023 at 08:41:14PM +0000, Catherine Hoang wrote:
> > > On Mar 13, 2023, at 11:28 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> > > 
> > > On Mon, Mar 13, 2023 at 09:21:05PM -0700, Catherine Hoang wrote:
> > >> Hi all,
> > >> 
> > >> This series of patches implements a new ioctl to set the uuid of mounted
> > >> filesystems. Eventually this will be used by the 'xfs_io fsuuid' command
> > >> to allow userspace to update the uuid.
> > >> 
> > >> Comments and feedback appreciated!
> > > 
> > > What's the use case for this?
> > 
> > We want to be able to change the uuid on newly mounted clone vm images
> > so that each deployed system has a different uuid. We need to do this the
> > first time the system boots, but after the root fs is mounted so that fsuuid
> > can run in parallel with other service startup to minimize deployment times.
> 
> Why can't you do it offline immediately after the offline clone of
> the golden image? I mean, cloning images and setting up their

That /is/ how they do it currently.  The goal here was to reduce the
number of scripts that then must be worked into every distro's bespoke
initrd generation system (update-initramfs, dracut, etc.).  Doing this
from systemd bypasses that, and it means it can get done in the
background during first boot, instead of rewriting superblocks in the
singlethreaded initramfs hot path during deployments.

They need the fsuuid to change after the VM starts up, but it doesn't
have to get done until just before we start handing out NFS leases.
Granted that was before we hit the wall of "lots of subsystems encode
the fs uuid into things and hand them out"...

> contents is something the external orchestration software does
> and will always have to do, so i don't really understand why UUID
> needs to be modified at first mount vs at clone time. Can you
> describe why it actually needs to be done after first mount?
> 
> > >>  xfs: add XFS_IOC_SETFSUUID ioctl
> > >>  xfs: export meta uuid via xfs_fsop_geom
> > > 
> > > For what purpose does userspace ever need to know the sb_meta_uuid?
> > 
> > Userspace would need to know the meta uuid if we want to restore
> > the original uuid after it has been changed.
> 
> I don't understand why you'd want to restore the original UUID given
> the use case you've describe. Can you explain the situation where
> you want to return a cloned image to the original golden image UUID?

I can't think of any, and was assuming that Catherine did that to
maintain parity with the offline fsuuid setting command...

--D

> 
> -Dave.
> -- 
> Dave Chinner
> david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux