[SOLVED] Problem with USB HDD in read only mode at LXC after upgrade 5.x to 7.x

wojtekk

New Member
Sep 10, 2021
2
0
1
46
I did in place upgrade from 5.x to 7 and after that my HDD on LXC bind as mp became suddenly read only.

On host I can access mounted UBS drive and write to it as root.
On LXCs (priviliged) mp setup did not changed from 5.x, they have no "extra" options added from my end but they suddenly became read only for normal user. I can write on LXC to those mounted USB as root but that's not good approach.

LXC binding:
mp0: /media/disk1,mp=/home/abc/USB

host mounting in fstab:
/dev/sda1 /media/disk1 exfat defaults 0 1

Any idea what has changed 5.x to 7 ? What to check ?
 
Last edited:
I did in place upgrade from 5.x to 7 and after that my HDD on LXC bind as mp became suddenly read only.
Did you skipped 6.4 entirely? If not, how did you execute the upgrade, closely followed the upgrade how-to inclusive running the pve5to6 and pve6to7 checker scripts?

On LXCs (priviliged) mp setup did not changed from 5.x, they have no "extra" options added from my end but they suddenly became read only for normal user. I can write on LXC to those mounted USB as root but that's not good approach.

Hmm, it rather seems weird to me that they were writeable for non-root users in the CT in the first place, but I have a hunch...

Any idea what has changed 5.x to 7 ? What to check ?
/dev/sda1 /media/disk1 exfat defaults 0 1

You use ExFAT and that got a kernel driver since Linux 5.7, Proxmox VE use 5.11 and Debian 11 (which PVE 7.0 bases off) is also defaulting to that now:
https://www.debian.org/releases/bul...es/ch-whats-new.en.html#exfat-in-linux-kernel

So it previously worked because the drive was mounted as user with the FUSE user-space tool, and the CT user ID matched with the one on the host (both probably 1000) by luck.
Now the kernel mounts it via fstab and that means it is mounted with the root user id of 0 as owner by default.

See if you can either mount it with an uid of 1000 (or whatever the CT user is running as) or switch back to FUSE (lower performance but correct UID) again using the mount.exfat-fuse tool.

The setup seems generally a bit brittle, but well, above would explain the effect you observe and if it worked ok before the workarounds proposed would be fine IMO.
 
Thanks @t.lamprecht you were right. Changing mounting in fstab on pve node solved that one.

updated fstab works now correctly also on LXCs via binding
/dev/sda1 /media/disk1 exfat uid=1000,gid=1000,defaults 0 1

Thanks for quick support !
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!