Mount Btrfs snapshot or overlay lowerdir on different partition map

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I want to use the root directory as the base of a couple of containers which I wanted to keep in my /home.



But the problem is, I chose Guided Partitioning with the Separate /home partition option on the Debian installer, then formatted both of the partitions to Btrfs.



$ lsblk 
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 28G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 11G 0 part [SWAP]
└─sda6 8:6 0 892.6G 0 part /home


My root and /home aren't subvols in the same partition, but separate Btrfs partitions.



Now, I tried to snapshot root into my /home and of course it didn't work as I Googled around and figured out why.



$ sudo btrfs subvolume snapshot / Downloads/test
Create a snapshot of '/' in 'Downloads/test'
ERROR: cannot snapshot '/': Invalid cross-device link


I also tried to use overlay to get a virtual copy of the root, but that didn't work out so well, either:



$ sudo mount -t overlay -o lowerdir=/ overlay Downloads/test
mount: /home/ontoki/Downloads/test: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.


How do I mount btrfs volumes across different partitions, and is it possible to make merged directory like overlay allows?










share|improve this question























  • It seems to be an xyproblem. What's your goal?
    – Ipor Sircer
    yesterday











  • @Ipor, the last line. I want an overlayfs-like upperdir on top of RO root, in my /home if possible.
    – Oxwivi
    yesterday















up vote
0
down vote

favorite












I want to use the root directory as the base of a couple of containers which I wanted to keep in my /home.



But the problem is, I chose Guided Partitioning with the Separate /home partition option on the Debian installer, then formatted both of the partitions to Btrfs.



$ lsblk 
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 28G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 11G 0 part [SWAP]
└─sda6 8:6 0 892.6G 0 part /home


My root and /home aren't subvols in the same partition, but separate Btrfs partitions.



Now, I tried to snapshot root into my /home and of course it didn't work as I Googled around and figured out why.



$ sudo btrfs subvolume snapshot / Downloads/test
Create a snapshot of '/' in 'Downloads/test'
ERROR: cannot snapshot '/': Invalid cross-device link


I also tried to use overlay to get a virtual copy of the root, but that didn't work out so well, either:



$ sudo mount -t overlay -o lowerdir=/ overlay Downloads/test
mount: /home/ontoki/Downloads/test: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.


How do I mount btrfs volumes across different partitions, and is it possible to make merged directory like overlay allows?










share|improve this question























  • It seems to be an xyproblem. What's your goal?
    – Ipor Sircer
    yesterday











  • @Ipor, the last line. I want an overlayfs-like upperdir on top of RO root, in my /home if possible.
    – Oxwivi
    yesterday













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to use the root directory as the base of a couple of containers which I wanted to keep in my /home.



But the problem is, I chose Guided Partitioning with the Separate /home partition option on the Debian installer, then formatted both of the partitions to Btrfs.



$ lsblk 
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 28G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 11G 0 part [SWAP]
└─sda6 8:6 0 892.6G 0 part /home


My root and /home aren't subvols in the same partition, but separate Btrfs partitions.



Now, I tried to snapshot root into my /home and of course it didn't work as I Googled around and figured out why.



$ sudo btrfs subvolume snapshot / Downloads/test
Create a snapshot of '/' in 'Downloads/test'
ERROR: cannot snapshot '/': Invalid cross-device link


I also tried to use overlay to get a virtual copy of the root, but that didn't work out so well, either:



$ sudo mount -t overlay -o lowerdir=/ overlay Downloads/test
mount: /home/ontoki/Downloads/test: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.


How do I mount btrfs volumes across different partitions, and is it possible to make merged directory like overlay allows?










share|improve this question















I want to use the root directory as the base of a couple of containers which I wanted to keep in my /home.



But the problem is, I chose Guided Partitioning with the Separate /home partition option on the Debian installer, then formatted both of the partitions to Btrfs.



$ lsblk 
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 28G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 11G 0 part [SWAP]
└─sda6 8:6 0 892.6G 0 part /home


My root and /home aren't subvols in the same partition, but separate Btrfs partitions.



Now, I tried to snapshot root into my /home and of course it didn't work as I Googled around and figured out why.



$ sudo btrfs subvolume snapshot / Downloads/test
Create a snapshot of '/' in 'Downloads/test'
ERROR: cannot snapshot '/': Invalid cross-device link


I also tried to use overlay to get a virtual copy of the root, but that didn't work out so well, either:



$ sudo mount -t overlay -o lowerdir=/ overlay Downloads/test
mount: /home/ontoki/Downloads/test: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.


How do I mount btrfs volumes across different partitions, and is it possible to make merged directory like overlay allows?







partition btrfs overlayfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday

























asked yesterday









Oxwivi

64821123




64821123











  • It seems to be an xyproblem. What's your goal?
    – Ipor Sircer
    yesterday











  • @Ipor, the last line. I want an overlayfs-like upperdir on top of RO root, in my /home if possible.
    – Oxwivi
    yesterday

















  • It seems to be an xyproblem. What's your goal?
    – Ipor Sircer
    yesterday











  • @Ipor, the last line. I want an overlayfs-like upperdir on top of RO root, in my /home if possible.
    – Oxwivi
    yesterday
















It seems to be an xyproblem. What's your goal?
– Ipor Sircer
yesterday





It seems to be an xyproblem. What's your goal?
– Ipor Sircer
yesterday













@Ipor, the last line. I want an overlayfs-like upperdir on top of RO root, in my /home if possible.
– Oxwivi
yesterday





@Ipor, the last line. I want an overlayfs-like upperdir on top of RO root, in my /home if possible.
– Oxwivi
yesterday
















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481748%2fmount-btrfs-snapshot-or-overlay-lowerdir-on-different-partition-map%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481748%2fmount-btrfs-snapshot-or-overlay-lowerdir-on-different-partition-map%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay