You are not logged in.

#1 2015-06-24 08:43:41

syntonym
Member
Registered: 2015-06-24
Posts: 3

[SOLVED] BTRFS filesystem is changed to ro if user tries to login

I have two different users I use to login into my system, one "main" and one "guest" user. If the guest user logs in (before anything interestinig happens, on the standard terminal before using startx) systemd-journald complains that it cannot write, mount shows that / and /home are suddenly mounted as ro. This does not happen if I login with my main user.

I've the following partioning scheme:
sda1: btrfs bootpartition (later mounted on /boot)
sda2: crypto_LUKS
sda3: btrfs (not used)

the encrypted sda2 is a btrfs filesystem with two subvolumes, root and home. root is mounted on / and home on /home .

This is my syslinux entry I use to boot:

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    APPEND cryptdevice=/dev/sda2:cryptroot root=/dev/disk/by-label/main rw
    INITRD ../initramfs-linux.img

This is my fstab:

# /dev/mapper/cryptroot LABEL=main
UUID=03433ebf-091b-40ee-81c7-39af59b425cf	/         	btrfs     	rw,relatime,ssd,space_cache	0 0

# /dev/mapper/cryptroot LABEL=main
UUID=03433ebf-091b-40ee-81c7-39af59b425cf	/home     	btrfs     	rw,relatime,ssd,space_cache,subvol=home	0 0

# /dev/sda1 LABEL=boot
UUID=0f61e371-68f9-473e-8856-a01babaeffc3	/boot     	btrfs     	rw,relatime,ssd,space_cache	0 0

The guest user is in two groups my main user is not part of: floppy and power (probably because I used the adduser script and forgot to remove these two groups..)

How can this happen? Only root does have the permission to mount things, so how can a regular user mess things up? I guess I have some faulty config somewhere? I've got no clue how I should start to debug this, so any hint is appreciated.

Last edited by syntonym (2015-06-24 18:00:49)

Offline

#2 2015-06-24 09:15:54

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,896
Website

Re: [SOLVED] BTRFS filesystem is changed to ro if user tries to login

Hi syntonym, welcome to the Arch Linux forums.

A good place to start debugging this would be looking at the journal. What messages are recorded aroudn the time of the user logging in? Specifically, are there any kernel messages?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-06-24 18:16:07

syntonym
Member
Registered: 2015-06-24
Posts: 3

Re: [SOLVED] BTRFS filesystem is changed to ro if user tries to login

I feel like a complete moron not to think of inspecting the journal. Turns out the btrfs has hicked up and a mount with recovery bootflag fixed the problem. In the journal that showed up as

parent transid verify failed on 109973766144 wanted 1823 found 1821

More information for anyone encountering a similiar situation can find additional information in this blogpost.

Thanks WorMzy!

Last edited by syntonym (2015-06-24 18:16:33)

Offline

Board footer

Powered by FluxBB