You are not logged in.

#1 2014-01-08 15:11:09

HeiKu
Member
Registered: 2010-08-24
Posts: 7

Mounting non-root Btrfs subvolume fails on boot

I added a new SATA drive, to use for GRUB, and then created a second partition, encrypted it with dm-crypt and formatted it with Btrfs.

I set fstab to mount the new partition in /mnt/btrfs. Then, I created a subvolume, and added it to fstab to mount it in /mnt/git.

On boot, the partition asks for the encryption key and mounts the btrfs partition, but it fails to mount the subvolume.

The error message is "Failed to mount /mnt/git" and then it stops booting, with a systemd message to run "journalctl -xb", but I get no console prompt.

This is the relevant part of fstab. I also added btrfs to hooks in mkinitcpio.conf, just in case.

/dev/sda3 none swap defaults 0 0
/dev/sdd2 / ext4 defaults,noatime 0 1
/dev/sdd3 /home ext4 defaults,noatime 0 2
/dev/sdd4 /srv ext4 defaults,noatime 0 2
/dev/sda4 /ftp ext4 defaults,noatime 0 2
/dev/sdc1 /mnt/backup ext4 defaults,noatime 0 2
/dev/mapper/sdb2Btrfs /mnt/btrfs btrfs rw,relatime,compress-force=zlib,autodefrag 0 0
/dev/mapper/sdb2Btrfs /mnt/git btrfs rw,relatime,compress-force=zlib,autodefrag,subvol="git" 0 0

If I comment the subvolume, the system boots without issues. I'm thinking of just creating a symbolic link and be done with it, but everything I've read suggests it should be possible to mount it with fstab.

Offline

#2 2014-01-08 16:40:23

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,636

Re: Mounting non-root Btrfs subvolume fails on boot

Where is the git subvol? You have to give it a path relative to the top level subvol.

Have you tried it without the quotes? I've mounted subvols in fstab, but never tried it with quotes.

Disclaimer: I've never tried this encrypted. Don't know if that will make a difference.

Last edited by Scimmia (2014-01-08 16:41:45)

Online

#3 2014-01-08 17:02:16

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Mounting non-root Btrfs subvolume fails on boot

Why are you quoting the subvol name? This isn't a shell script, you're likely passing the literal quotes to the mount syscall.

Offline

#4 2014-01-08 18:24:03

HeiKu
Member
Registered: 2010-08-24
Posts: 7

Re: Mounting non-root Btrfs subvolume fails on boot

My bad, the quotes are probably the problem.

Thanks a lot for the help!

Offline

Board footer

Powered by FluxBB