Btrfs /home subvolume failed to mount at startup

,

After updating my system my /home subvolume failed to mount, I haven’t found the reason for this behaviour.

How is it possible?
Empty in the sense that it is like creating a new user? All the content of Documents, Videos, etc. is gone?
Or /home is empty?

1 Like

No idea how that happened, after rebooting to launch new kernel my home had only one folder in it. That folder was here only because i had it in my fstab. Beside this my home had 36 bytes.

Maybe the /home partition is not mounted for some reason.
Maybe /home is now a directory in the root partition and it is not empty so the /home partiton can’t be mounted.

Could you post the result of
lsblk
And the content of /etc/fstab

2 Likes

That would be a great suggestion, but i had home and root on the same partition.

Could you post what I asked please?
In addition you could look at the logs.

1 Like
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   1,8T  0 disk 
└─sda1        8:1    0   1,8T  0 part /home/einsel/Drives/2TB
sdb           8:16   0 232,9G  0 disk 
sdc           8:32   0 447,1G  0 disk 
├─sdc1        8:33   0   600M  0 part /boot/efi
├─sdc2        8:34   0     1G  0 part /boot
└─sdc3        8:35   0 445,5G  0 part /
sdd           8:48   0 931,5G  0 disk 
└─sdd1        8:49   0 931,5G  0 part /home/einsel/Drives/1TB
sde           8:64   1  57,7G  0 disk 
├─sde1        8:65   1  57,7G  0 part /run/media/test/Ventoy
└─sde2        8:66   1    32M  0 part 
zram0       252:0    0     8G  0 disk [SWAP]
nvme0n1     259:0    0 465,8G  0 disk 
├─nvme0n1p1 259:1    0    16M  0 part 
├─nvme0n1p2 259:2    0 465,3G  0 part 
└─nvme0n1p3 259:3    0   499M  0 part 

# /etc/fstab
# Created by anaconda on Wed Apr 28 10:08:39 2021
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=5caeffc5-4da8-49d8-8c78-a827df3659d9 /                       btrfs   subvol=root,compress=zstd:1 0 0
UUID=05b98326-b6b7-41b2-a922-3eabbd137607 /boot                   ext4    defaults        1 2
UUID=044E-C619          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
/dev/disk/by-uuid/8AF85221F8520C37 /home/einsel/Drives/2TB auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=2TB,uid=1000 0 0
//192.168.50.45/PrivateShare	/home/einsel/Drives/PrivateShare	cifs	username=user,password=password,uid=1000	0 0
/dev/disk/by-uuid/3730df3a-c412-4a3e-8db8-a0811c94a432	/home/einsel/Drives/1TB ext4 defaults 0 0

What logs are you interested in ?

DNF log, nothing suspicious.

And the output of
sudo btrfs subvolume list /

I’m not sure, but could you try to comment the lines related to /home/einsel/Drives and reboot?

1 Like
sudo btrfs subvolume list /

ID 256 gen 53723 top level 5 path home
ID 257 gen 54139 top level 5 path root
ID 262 gen 53975 top level 257 path var/lib/machines

Also after commenting out these three lines in fstab and rebooting nothing changed.

Now the result of this command?
mount

1 Like
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=8144452k,nr_inodes=2036113,mode=755,inode64)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,size=3280072k,nr_inodes=819200,mode=755,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
/dev/sdc3 on / type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache,subvolid=257,subvol=/root)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,nosuid,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19790)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime,seclabel)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdc2 on /boot type ext4 (rw,relatime,seclabel)
/dev/sdc1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,seclabel,nr_inodes=409600,inode64)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1640032k,nr_inodes=410008,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
tmpfs on /run/user/1001 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1640032k,nr_inodes=410008,mode=700,uid=1001,gid=1001,inode64)
gvfsd-fuse on /run/user/1001/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=1001)

I think I see what you mean

So it seems that /home BTRFS subvolume is not mounted.

Could you try to
sudo mount /dev/sdc3 -o subvol=home /mnt

Then look inside /mnt if your stuff is there?

2 Likes

And what about
systemctl status home.mount

2 Likes

You were right, i just added
UUID=5caeffc5-4da8-49d8-8c78-a827df3659d9 /home btrfs subvol=home,compress=zstd:1 0 0
to my fstab and the home folder is back, which begs the question, why did it work in the first place, because this fstab has been like this all the time.
Anyways thanks a lot for help.

1 Like

Indeed it shouldn’t be necessary this line in fstab.
There is something weird.
You should look at the logs (i.e. journalctl -xe), and systemctl --failed, systemctl status home.mount

3 Likes

After reproducing the problem systemctl status home.mount reports that the unit could not be found. Systemctl --failed States that there are no problemy while journalctl has just a lot od errors about everything crashing because there is no home directory.
Can it be because of this ?
[ 0.000000] Command line: BOOT_IMAGE=(hd2,gpt2)/vmlinuz-5.11.18-300.fc34.x86_64 root=UUID=5caeffc5-4da8-49d8-8c78-a827df3659d9 ro rootflags=subvol=root rhgb quiet amdgpu.ppfeaturemask=0xffffffff

How to find out if systemd-homed is involved or not?