Skip to contentSkip to conversation

is mounting subvolumes with a read-only root subvolume allowed?

DISCUSSION Zbigniew Jędrzejewski-Szmek 2 participants 3 messages Nov 14, 2013 – Nov 15, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,
I have a box with / and /home being subvolumes from the same btrfs filesystem.

/etc/fstab:

UUID=c0686...      /      btrfs subvol=root,x-systemd.device-timeout=0 1 1
UUID=c0686...      /home  btrfs subvol=home,x-systemd.device-timeout=0 1 1

...

/ is initially mounted readonly by the initramfs, and then after switching to the real system, /home is attempted to be mounted in parallel with / being remounted rw. If remounting rw happens first, boot proceeds. If mounting /home is attempted to realy, it fails.

$ /bin/mount /home
mount: /dev/mapper/luks-765... is already mounted or /home busy
       /dev/mapper/luks-765... is already mounted on /
$ /bin/mount -o remount,rw /
$ /bin/mount /home
$

So, is this expected that the other subvolume must be mounted rw?

Zbyszek

#1 lore raw
Quoted 13 lines · Zbigniew Jędrzejewski-Szmek

Hi,
I have a box with / and /home being subvolumes from the same btrfs filesystem.

/etc/fstab:

UUID=c0686...      /      btrfs subvol=root,x-systemd.device-timeout=0 1 1
UUID=c0686...      /home  btrfs subvol=home,x-systemd.device-timeout=0 1 1

...

/ is initially mounted readonly by the initramfs, and then after switching to the real system, /home is attempted to be mounted in parallel with / being remounted rw. If remounting rw happens first, boot proceeds. If mounting /home is attempted to realy, it fails.

Quoted 8 lines
$ /bin/mount /home
mount: /dev/mapper/luks-765... is already mounted or /home busy
       /dev/mapper/luks-765... is already mounted on /
$ /bin/mount -o remount,rw /
$ /bin/mount /home
$

So, is this expected that the other subvolume must be mounted rw?

This is known and pretty stupid issue:
http://www.spinics.net/lists/linux-btrfs/msg25502.html

... but it seems that btrfs guys are fine with this "feature".

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#2 lore raw
Quoted 21 lines · Karel Zak
Quoted 20 lines · Zbigniew Jędrzejewski-Szmek

Hi,
I have a box with / and /home being subvolumes from the same btrfs filesystem.

/etc/fstab:

UUID=c0686...      /      btrfs subvol=root,x-systemd.device-timeout=0 1 1
UUID=c0686...      /home  btrfs subvol=home,x-systemd.device-timeout=0 1 1

...

/ is initially mounted readonly by the initramfs, and then after switching to the real system, /home is attempted to be mounted in parallel with / being remounted rw. If remounting rw happens first, boot proceeds. If mounting /home is attempted to realy, it fails.

$ /bin/mount /home
mount: /dev/mapper/luks-765... is already mounted or /home busy
       /dev/mapper/luks-765... is already mounted on /
$ /bin/mount -o remount,rw /
$ /bin/mount /home
$
Quoted 6 lines
Quoted 1 line

So, is this expected that the other subvolume must be mounted rw?

This is known and pretty stupid issue:
http://www.spinics.net/lists/linux-btrfs/msg25502.html

... but it seems that btrfs guys are fine with this "feature".

5 months without a reply. Great.

Zbyszek