Readonly mount

I did jump on the openHAB3 with openHABian and M2, and upgraded since then.
From that vanilla installation I only added stuff via GUI, but now I got the problem, that some things are not available for me, like for instance I’d like to add a binding manually in dropping the JAR in /srv/openhab-addons/, but if I try to put a file in there or change permissions:

chmod: changing permissions of '/srv/openhab-addons/': Read-only file system

Do I need to do it all over again and start fresh with and restoring the config then? or is there something I can do, I’m afraid there’s a bit more pitfalls in my installation…?

The linux kernel remounted the filesystem in read-only mode. This usually happens when an error occurs when it tries to write something to disk.
If you have a backup of your system (stored on a different computer) then you can try to give it a reboot. If you don’t have a backup, then try copying the files you would like to keep to another system before doing the reboot because there is always a chance that it won’t boot up anymore depending on how severe the issue is.

not all directories are read-only, I can add stuff via GUI and I can use openhab-cli export in standard (var/lib/openhab/backups/). So I just flash a fresh vanilla openHABian and restore my config. Probably some weird stuff happening right now.

1 Like

Your post was off-topic so I moved it.

Try to reinstall Samba from the openhabian menu.

1 Like

I just picked a complete vanilla openHABian installation, restored my configuration and got the same error while trying to drop a JAR in /srv/openhab-addons/
I didn’t install samba in the first place, but did it now. still no effect…?

mtab shows this:

[15:22:44] openhabian@openHAB3:~$ cat /etc/mtab
/dev/root / ext4 rw,noatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=331040k,nr_inodes=82760,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
/dev/root /srv/openhab-sys ext4 ro,relatime 0 0
/dev/root /srv/openhab-addons ext4 ro,relatime 0 0
/dev/root /srv/openhab-userdata ext4 ro,relatime 0 0
sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
/dev/root /srv/openhab-conf ext4 ro,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mmcblk0p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=92624k,mode=700,uid=1000,gid=115 0 0

I don’t know, what this means, but /dev/root /srv/openhab-addons ext4 ro,relatime 0 0 sounds to me like “readonly”? Can I change something without breaking my installation?

I see the same behavior on a debian x64 system.
Filed an issue report for this behavior:

The mounts are initially rw but while systemd runs they are remounted ro.
When I change the mount template to bind these mounts at a different state the mounts are mounted rw as intended.

check /etc/systemd/system/*.mount - it should contain rw rather than ro
eventually systemctl restart <mount>

1 Like

there are no /etc/systemd/system/*.mount in my installation…? should there be ones?

how can I change the mount templates?

On a fresh install yes so your system is outdated. Try option 13.

hmm… it is a fresh install - and I alredy did 13 (as I thought…?). but now it did work! Thank you!

In my case rw is already in. I think you refer to this line:


Nevertheless after a reboot it is mounted ro.