How to mount btrfs subvolume, it isn't working / mounting
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I just did:
# btrfs subvolume create /@srv
then:
# btrfs subvolume list /
ID 257 gen 73 top level 5 path @
ID 258 gen 71 top level 5 path @home
ID 260 gen 65 top level 257 path @srv
And added to /etc/fstab, like this:
/dev/mapper/fs--1--vg-root /home btrfs defaults,compress=zlib,subvol=@home 0 2
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvol=@srv 0 2
...where /home is the default that come from Ubuntu's installation and /srv is the one that I manually added, based on what I'm seeing "as an example (i.e., /home)".
But it does not mount, look:
# mount /srv
mount: mount(2) failed: No such file or directory
Subdir /srv
exists:
# file /srv
/srv: directory
What am I missing?
BTW, the subvolumes @ and @home are okay. But I am unable to create more subvolumes and mount it, side by side with, for example, @home.
mount btrfs
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 3 more comments
I just did:
# btrfs subvolume create /@srv
then:
# btrfs subvolume list /
ID 257 gen 73 top level 5 path @
ID 258 gen 71 top level 5 path @home
ID 260 gen 65 top level 257 path @srv
And added to /etc/fstab, like this:
/dev/mapper/fs--1--vg-root /home btrfs defaults,compress=zlib,subvol=@home 0 2
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvol=@srv 0 2
...where /home is the default that come from Ubuntu's installation and /srv is the one that I manually added, based on what I'm seeing "as an example (i.e., /home)".
But it does not mount, look:
# mount /srv
mount: mount(2) failed: No such file or directory
Subdir /srv
exists:
# file /srv
/srv: directory
What am I missing?
BTW, the subvolumes @ and @home are okay. But I am unable to create more subvolumes and mount it, side by side with, for example, @home.
mount btrfs
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Does the subdirectory/srv
exists? mount needs the target directory to already exist before the partition/subvolume can be mounted there.
– Lie Ryan
Feb 15 '15 at 1:27
Yes,/srv
is somehow a "default" directory that always exists in a fresh install.
– ThiagoCMC
Feb 15 '15 at 2:07
So, this might be a BUG. But against which package should I register it at Launchpad.net?
– ThiagoCMC
Feb 19 '15 at 15:36
Why do you seem to be mounting an LVM VG (volume group)? Shouldn't you be mounting an LV (logical volume)? I'm currently not at my workstation that has LVM and BTRFS right now, so I can't check whether the mapper name should look like (/dev/mapper/fs--1--vg-root), but they look odd. If I recall correctly, in my workstation the BTRFS is mounted with the LV's UUID. I believe you can also mount with the/dev/vgblah/lvbleh
, but I've never tried mounting it with /dev/mapper. From a quick search, the naming convention used by device mapper for an LV seems to be/dev/mapper/vgblah-lvbleh
.
– Lie Ryan
Feb 19 '15 at 16:46
Hey Ryan! I've updated the question, I added the /home partition that come from installation, I've used it as an example, and it mounts using /dev/mapper, so, I tried to copy it as an example. Still doesn't work... I'm wondering here... Are you able to mount a BTRFS subvolume created by you after the installation?
– ThiagoCMC
Feb 20 '15 at 0:58
|
show 3 more comments
I just did:
# btrfs subvolume create /@srv
then:
# btrfs subvolume list /
ID 257 gen 73 top level 5 path @
ID 258 gen 71 top level 5 path @home
ID 260 gen 65 top level 257 path @srv
And added to /etc/fstab, like this:
/dev/mapper/fs--1--vg-root /home btrfs defaults,compress=zlib,subvol=@home 0 2
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvol=@srv 0 2
...where /home is the default that come from Ubuntu's installation and /srv is the one that I manually added, based on what I'm seeing "as an example (i.e., /home)".
But it does not mount, look:
# mount /srv
mount: mount(2) failed: No such file or directory
Subdir /srv
exists:
# file /srv
/srv: directory
What am I missing?
BTW, the subvolumes @ and @home are okay. But I am unable to create more subvolumes and mount it, side by side with, for example, @home.
mount btrfs
I just did:
# btrfs subvolume create /@srv
then:
# btrfs subvolume list /
ID 257 gen 73 top level 5 path @
ID 258 gen 71 top level 5 path @home
ID 260 gen 65 top level 257 path @srv
And added to /etc/fstab, like this:
/dev/mapper/fs--1--vg-root /home btrfs defaults,compress=zlib,subvol=@home 0 2
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvol=@srv 0 2
...where /home is the default that come from Ubuntu's installation and /srv is the one that I manually added, based on what I'm seeing "as an example (i.e., /home)".
But it does not mount, look:
# mount /srv
mount: mount(2) failed: No such file or directory
Subdir /srv
exists:
# file /srv
/srv: directory
What am I missing?
BTW, the subvolumes @ and @home are okay. But I am unable to create more subvolumes and mount it, side by side with, for example, @home.
mount btrfs
mount btrfs
edited Feb 20 '15 at 0:55
ThiagoCMC
asked Feb 15 '15 at 0:23
ThiagoCMCThiagoCMC
3843922
3843922
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 19 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Does the subdirectory/srv
exists? mount needs the target directory to already exist before the partition/subvolume can be mounted there.
– Lie Ryan
Feb 15 '15 at 1:27
Yes,/srv
is somehow a "default" directory that always exists in a fresh install.
– ThiagoCMC
Feb 15 '15 at 2:07
So, this might be a BUG. But against which package should I register it at Launchpad.net?
– ThiagoCMC
Feb 19 '15 at 15:36
Why do you seem to be mounting an LVM VG (volume group)? Shouldn't you be mounting an LV (logical volume)? I'm currently not at my workstation that has LVM and BTRFS right now, so I can't check whether the mapper name should look like (/dev/mapper/fs--1--vg-root), but they look odd. If I recall correctly, in my workstation the BTRFS is mounted with the LV's UUID. I believe you can also mount with the/dev/vgblah/lvbleh
, but I've never tried mounting it with /dev/mapper. From a quick search, the naming convention used by device mapper for an LV seems to be/dev/mapper/vgblah-lvbleh
.
– Lie Ryan
Feb 19 '15 at 16:46
Hey Ryan! I've updated the question, I added the /home partition that come from installation, I've used it as an example, and it mounts using /dev/mapper, so, I tried to copy it as an example. Still doesn't work... I'm wondering here... Are you able to mount a BTRFS subvolume created by you after the installation?
– ThiagoCMC
Feb 20 '15 at 0:58
|
show 3 more comments
Does the subdirectory/srv
exists? mount needs the target directory to already exist before the partition/subvolume can be mounted there.
– Lie Ryan
Feb 15 '15 at 1:27
Yes,/srv
is somehow a "default" directory that always exists in a fresh install.
– ThiagoCMC
Feb 15 '15 at 2:07
So, this might be a BUG. But against which package should I register it at Launchpad.net?
– ThiagoCMC
Feb 19 '15 at 15:36
Why do you seem to be mounting an LVM VG (volume group)? Shouldn't you be mounting an LV (logical volume)? I'm currently not at my workstation that has LVM and BTRFS right now, so I can't check whether the mapper name should look like (/dev/mapper/fs--1--vg-root), but they look odd. If I recall correctly, in my workstation the BTRFS is mounted with the LV's UUID. I believe you can also mount with the/dev/vgblah/lvbleh
, but I've never tried mounting it with /dev/mapper. From a quick search, the naming convention used by device mapper for an LV seems to be/dev/mapper/vgblah-lvbleh
.
– Lie Ryan
Feb 19 '15 at 16:46
Hey Ryan! I've updated the question, I added the /home partition that come from installation, I've used it as an example, and it mounts using /dev/mapper, so, I tried to copy it as an example. Still doesn't work... I'm wondering here... Are you able to mount a BTRFS subvolume created by you after the installation?
– ThiagoCMC
Feb 20 '15 at 0:58
Does the subdirectory
/srv
exists? mount needs the target directory to already exist before the partition/subvolume can be mounted there.– Lie Ryan
Feb 15 '15 at 1:27
Does the subdirectory
/srv
exists? mount needs the target directory to already exist before the partition/subvolume can be mounted there.– Lie Ryan
Feb 15 '15 at 1:27
Yes,
/srv
is somehow a "default" directory that always exists in a fresh install.– ThiagoCMC
Feb 15 '15 at 2:07
Yes,
/srv
is somehow a "default" directory that always exists in a fresh install.– ThiagoCMC
Feb 15 '15 at 2:07
So, this might be a BUG. But against which package should I register it at Launchpad.net?
– ThiagoCMC
Feb 19 '15 at 15:36
So, this might be a BUG. But against which package should I register it at Launchpad.net?
– ThiagoCMC
Feb 19 '15 at 15:36
Why do you seem to be mounting an LVM VG (volume group)? Shouldn't you be mounting an LV (logical volume)? I'm currently not at my workstation that has LVM and BTRFS right now, so I can't check whether the mapper name should look like (/dev/mapper/fs--1--vg-root), but they look odd. If I recall correctly, in my workstation the BTRFS is mounted with the LV's UUID. I believe you can also mount with the
/dev/vgblah/lvbleh
, but I've never tried mounting it with /dev/mapper. From a quick search, the naming convention used by device mapper for an LV seems to be /dev/mapper/vgblah-lvbleh
.– Lie Ryan
Feb 19 '15 at 16:46
Why do you seem to be mounting an LVM VG (volume group)? Shouldn't you be mounting an LV (logical volume)? I'm currently not at my workstation that has LVM and BTRFS right now, so I can't check whether the mapper name should look like (/dev/mapper/fs--1--vg-root), but they look odd. If I recall correctly, in my workstation the BTRFS is mounted with the LV's UUID. I believe you can also mount with the
/dev/vgblah/lvbleh
, but I've never tried mounting it with /dev/mapper. From a quick search, the naming convention used by device mapper for an LV seems to be /dev/mapper/vgblah-lvbleh
.– Lie Ryan
Feb 19 '15 at 16:46
Hey Ryan! I've updated the question, I added the /home partition that come from installation, I've used it as an example, and it mounts using /dev/mapper, so, I tried to copy it as an example. Still doesn't work... I'm wondering here... Are you able to mount a BTRFS subvolume created by you after the installation?
– ThiagoCMC
Feb 20 '15 at 0:58
Hey Ryan! I've updated the question, I added the /home partition that come from installation, I've used it as an example, and it mounts using /dev/mapper, so, I tried to copy it as an example. Still doesn't work... I'm wondering here... Are you able to mount a BTRFS subvolume created by you after the installation?
– ThiagoCMC
Feb 20 '15 at 0:58
|
show 3 more comments
2 Answers
2
active
oldest
votes
Looks like bug - I've stumbled across a similiar problem: https://unix.stackexchange.com/q/190698/34801
Mounting with subvolid=
works.
This should work:
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvolid=260 0 2
add a comment |
Just tried it and found out, that you should specify subvol=/@
or subvol=/@home
– with a leading slash.
So, my working /etc/fstab with one automount and one manually mountable subvolume now looks like this:
/dev/sdb /backup btrfs noatime,nodiratime,subvol=/@ 0 0
/dev/sdb /snapshots btrfs noauto,noatime,nodiratime,subvol=/@snapshots 0 0
Before, I didn't use leading slashes and mount /snapshots
failed. Now mount /snapshot
works.
System:
# uname -a
Linux debian-9 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
# btrfs --version
btrfs-progs v4.7.3
# btrfs subvolume list -up /backup
ID 258 gen 10 parent 5 top level 5 uuid b2740892-9b17-9147-b930-83de797d20df path @
ID 259 gen 8 parent 5 top level 5 uuid 10560ce1-b6f5-1248-94a0-c0a7734b804f path @snapshots
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f585603%2fhow-to-mount-btrfs-subvolume-it-isnt-working-mounting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looks like bug - I've stumbled across a similiar problem: https://unix.stackexchange.com/q/190698/34801
Mounting with subvolid=
works.
This should work:
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvolid=260 0 2
add a comment |
Looks like bug - I've stumbled across a similiar problem: https://unix.stackexchange.com/q/190698/34801
Mounting with subvolid=
works.
This should work:
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvolid=260 0 2
add a comment |
Looks like bug - I've stumbled across a similiar problem: https://unix.stackexchange.com/q/190698/34801
Mounting with subvolid=
works.
This should work:
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvolid=260 0 2
Looks like bug - I've stumbled across a similiar problem: https://unix.stackexchange.com/q/190698/34801
Mounting with subvolid=
works.
This should work:
/dev/mapper/fs--1--vg-root /srv btrfs defaults,compress=zlib,subvolid=260 0 2
edited Apr 13 '17 at 12:37
Community♦
1
1
answered Mar 17 '15 at 12:15
mt_mt_
1162
1162
add a comment |
add a comment |
Just tried it and found out, that you should specify subvol=/@
or subvol=/@home
– with a leading slash.
So, my working /etc/fstab with one automount and one manually mountable subvolume now looks like this:
/dev/sdb /backup btrfs noatime,nodiratime,subvol=/@ 0 0
/dev/sdb /snapshots btrfs noauto,noatime,nodiratime,subvol=/@snapshots 0 0
Before, I didn't use leading slashes and mount /snapshots
failed. Now mount /snapshot
works.
System:
# uname -a
Linux debian-9 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
# btrfs --version
btrfs-progs v4.7.3
# btrfs subvolume list -up /backup
ID 258 gen 10 parent 5 top level 5 uuid b2740892-9b17-9147-b930-83de797d20df path @
ID 259 gen 8 parent 5 top level 5 uuid 10560ce1-b6f5-1248-94a0-c0a7734b804f path @snapshots
add a comment |
Just tried it and found out, that you should specify subvol=/@
or subvol=/@home
– with a leading slash.
So, my working /etc/fstab with one automount and one manually mountable subvolume now looks like this:
/dev/sdb /backup btrfs noatime,nodiratime,subvol=/@ 0 0
/dev/sdb /snapshots btrfs noauto,noatime,nodiratime,subvol=/@snapshots 0 0
Before, I didn't use leading slashes and mount /snapshots
failed. Now mount /snapshot
works.
System:
# uname -a
Linux debian-9 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
# btrfs --version
btrfs-progs v4.7.3
# btrfs subvolume list -up /backup
ID 258 gen 10 parent 5 top level 5 uuid b2740892-9b17-9147-b930-83de797d20df path @
ID 259 gen 8 parent 5 top level 5 uuid 10560ce1-b6f5-1248-94a0-c0a7734b804f path @snapshots
add a comment |
Just tried it and found out, that you should specify subvol=/@
or subvol=/@home
– with a leading slash.
So, my working /etc/fstab with one automount and one manually mountable subvolume now looks like this:
/dev/sdb /backup btrfs noatime,nodiratime,subvol=/@ 0 0
/dev/sdb /snapshots btrfs noauto,noatime,nodiratime,subvol=/@snapshots 0 0
Before, I didn't use leading slashes and mount /snapshots
failed. Now mount /snapshot
works.
System:
# uname -a
Linux debian-9 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
# btrfs --version
btrfs-progs v4.7.3
# btrfs subvolume list -up /backup
ID 258 gen 10 parent 5 top level 5 uuid b2740892-9b17-9147-b930-83de797d20df path @
ID 259 gen 8 parent 5 top level 5 uuid 10560ce1-b6f5-1248-94a0-c0a7734b804f path @snapshots
Just tried it and found out, that you should specify subvol=/@
or subvol=/@home
– with a leading slash.
So, my working /etc/fstab with one automount and one manually mountable subvolume now looks like this:
/dev/sdb /backup btrfs noatime,nodiratime,subvol=/@ 0 0
/dev/sdb /snapshots btrfs noauto,noatime,nodiratime,subvol=/@snapshots 0 0
Before, I didn't use leading slashes and mount /snapshots
failed. Now mount /snapshot
works.
System:
# uname -a
Linux debian-9 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
# btrfs --version
btrfs-progs v4.7.3
# btrfs subvolume list -up /backup
ID 258 gen 10 parent 5 top level 5 uuid b2740892-9b17-9147-b930-83de797d20df path @
ID 259 gen 8 parent 5 top level 5 uuid 10560ce1-b6f5-1248-94a0-c0a7734b804f path @snapshots
answered Oct 2 '18 at 21:37
Thomas PraxlThomas Praxl
1363
1363
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f585603%2fhow-to-mount-btrfs-subvolume-it-isnt-working-mounting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Does the subdirectory
/srv
exists? mount needs the target directory to already exist before the partition/subvolume can be mounted there.– Lie Ryan
Feb 15 '15 at 1:27
Yes,
/srv
is somehow a "default" directory that always exists in a fresh install.– ThiagoCMC
Feb 15 '15 at 2:07
So, this might be a BUG. But against which package should I register it at Launchpad.net?
– ThiagoCMC
Feb 19 '15 at 15:36
Why do you seem to be mounting an LVM VG (volume group)? Shouldn't you be mounting an LV (logical volume)? I'm currently not at my workstation that has LVM and BTRFS right now, so I can't check whether the mapper name should look like (/dev/mapper/fs--1--vg-root), but they look odd. If I recall correctly, in my workstation the BTRFS is mounted with the LV's UUID. I believe you can also mount with the
/dev/vgblah/lvbleh
, but I've never tried mounting it with /dev/mapper. From a quick search, the naming convention used by device mapper for an LV seems to be/dev/mapper/vgblah-lvbleh
.– Lie Ryan
Feb 19 '15 at 16:46
Hey Ryan! I've updated the question, I added the /home partition that come from installation, I've used it as an example, and it mounts using /dev/mapper, so, I tried to copy it as an example. Still doesn't work... I'm wondering here... Are you able to mount a BTRFS subvolume created by you after the installation?
– ThiagoCMC
Feb 20 '15 at 0:58