LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-06-2022, 05:34 AM   #1
davidmillar
LQ Newbie
 
Registered: Jul 2022
Posts: 2

Rep: Reputation: 0
Trouble With btrfs storage post transfer to new host (LXD)


Greetings:

I recently moved all my LXD containers to a new host. The old host was running Debian 11 and was using LXD with a btrfs storage pool (the host was also using btrfs as the underlying filesystem). The new host is running Debian 11 also using btrfs as the underlying file system and the new LXD installation using a btrfs storage pool for storage.

I transferred the containers via the rather ham-fisted approach of tar.bz’ing the /var/snap/lxd folder and subfolders on the old host. I then deleted the same /var/snap/lxd folder and subfolders on the new host and replaced them with the same from the old host. Everything spun up wonderfully until I noticed that snapshots were not being taken. I then attempted to copy a container and received the following error:

Quote:
Error: Create instance from copy: Failed to run: btrfs subvolume snapshot /var/snap/lxd/common/lxd/storage-pools/dauntless/containers/graylog /var/snap/lxd/common/lxd/storage-pools/dauntless/containers/graylog-broken: ERROR: Not a Btrfs subvolume: Invalid argument
"Dauntless" is the name of the btrfs storage pool:https://omegle.site

Quote:
root@debianserver:/var/snap/lxd/common/lxd/storage-pools# ls -lh
total 0https://ometvs.com
drwxr-xr-x 1 root root 200 Apr 13 09:49 dauntless
root@debianserver:/var/snap/lxd/common/lxd/storage-pools# lsattr dauntless/
---------------------- dauntless/custom
---------------------- dauntless/custom-snapshots
---------------------- dauntless/images
---------------------- dauntless/containers
---------------------- dauntless/containers-snapshots
---------------------- dauntless/virtual-machines
---------------------- dauntless/virtual-machines-snapshots

I suspect this is because I was rather inelegant in moving containers over to the new host. Any suggestions on how to fix this issue so that I can regain full container functionality (i.e. snapshots, creating copies, and presumably other storage-related features I have not yet discovered to be not working)?

So why am I not posting this in the Containers forum? Well, I am not sure this is a LXD issue but, rather, a btrfs issue. I think there must be a permissions issue (flag issue? I don't know much about btrfs) that is cause the "Not a Btrfs subvolume" error.

Any help is appreciated. Thank you!

Last edited by davidmillar; 07-19-2022 at 01:45 AM.
 
Old 07-06-2022, 10:57 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,664

Rep: Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710Reputation: 2710
You did not migrate the volumes (subvolumes) you migrated the contents. On the target you now have file and folder structures (possibly ON a single BTRFS volume) but do not have them as BTRFS structure.

Not, BTW, a bad thing in itself as long as you do not require BTRFS snapshots to work properly. The same process on EXT4, XFS, or JFS2 might have been just fine.

I have only been really using BTRFS for a year, and have researched some local migration issues. (I get faster performance for my applications using EXT4/RAID-5. BTRFS is catching up, but is not as performant. Yet.) None of them involved cloning subvolums to a different server. It would be easier to clone a discrete BTRFS device, but I am not finding a clear and obvious solution to clone a single or small group of subvolumes.

If someone has solved that, I hope they pipe up, I would like to see how that would work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with btrfs storage post transfer to new host (LXD) 1in14MM605 Linux - Software 1 12-21-2022 03:51 PM
LXer: LXD, Snap Packages and Cloud Storage Headline Ubuntu Linux 16.04 LTS LXer Syndicated Linux News 0 04-21-2016 04:50 AM
LXer: Rollback To A Working State With btrfs + apt-btrfs-snapshot On Ubuntu 12.10 LXer Syndicated Linux News 0 11-25-2012 10:42 AM
ext4 vs btrfs, and with btrfs do I still need to use LVM? blue_k Linux - Software 4 08-17-2012 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration