I have volumes currently being used in an lxd 3.0 container. They’re zfs datasets, and the issue is about uid/gid mapping. The files in the dataset all have uid/gids like 1011001, 101002, and so on. The newer version of lxd uses 1000000 for a uid/gid offset instead of 100000 like in lxd 3. Using the migration tools are not really an option because of the number of files involved; one of the datasets has somewhere between 150 and 200 million files, and the migration process pretty much always breaks while it’s (I think?) rewriting the UID/GIDs to match the new offset. I have considered a few things, including trying to tell the new containers to use a different offset, but they seem to end up trying to traverse the file system and changing them all, which experience and estimates tell us will take between a week or two, which is not acceptable for the live service that these datasets are used for.
Is there a way for me to use say shiftfs to fix this? I’ve tried enabling shiftfs, but it doesn’t seem to result in leaving the actual filesystem alone; eventually I see “remapping filesystem” and then it just grinds to a halt on the rock of trying to change so many files.
Thoughts?
Cheers,
Jack