Hi,
Just tried a
So looks like doing a TRIM inside a unprivileged LXC isn't working. So do I need to setup discard/fstrim at all inside my LXC guestx or will PVE do a fstrim for all LXCs datasets on host level?
All my LXCs are ZFS datasets on a thin-provisioned ZFS SSD pool or LVs on a thin-provisioned LVM-thin so some kind of TRIM/discard should be required.
Edit:
Looks like a
Edit:
The LXC that isn't working is using a LVM-thin, the one where its working is stored on a ZFS pool.
Edit:
config of the LXC where fstrim won't work:
config of the LXC where fstrim works:
Just tried a
fstrim -a
as root inside my LXC with this result:
Code:
fstrim: /: FITRIM ioctl failed: Operation not permitted
So looks like doing a TRIM inside a unprivileged LXC isn't working. So do I need to setup discard/fstrim at all inside my LXC guestx or will PVE do a fstrim for all LXCs datasets on host level?
All my LXCs are ZFS datasets on a thin-provisioned ZFS SSD pool or LVs on a thin-provisioned LVM-thin so some kind of TRIM/discard should be required.
Edit:
Looks like a
fstrim -a
is working on another unprivileged LXC. So can someone point me in the right direction why it isn't working with my other LXC?Edit:
The LXC that isn't working is using a LVM-thin, the one where its working is stored on a ZFS pool.
Edit:
config of the LXC where fstrim won't work:
Code:
root@Hypervisor:~# pct config 121
arch: amd64
cores: 2
features: nesting=1
hostname: GraylogLXC
memory: 4096
nameserver: 192.168.42.1
net0: name=eth0,bridge=vmbr42,firewall=1,gw=192.168.42.1,hwaddr=XX:XX:XX:XX:XX:XX,ip=192.168.42.72/24,type=veth
ostype: debian
rootfs: LVMthin:vm-121-disk-0,mountoptions=noatime,size=100G
swap: 1024
unprivileged: 1
config of the LXC where fstrim works:
Code:
root@Hypervisor:~# pct config 126
arch: amd64
cores: 1
features: nesting=1
hostname: YoutubeDL
memory: 256
mp0: /media/YoutubeDL,mp=/mnt/YoutubeDL
nameserver: 192.168.42.1
net0: name=eth0,bridge=vmbr42,firewall=1,gw=192.168.42.1,hwaddr=XX:XX:XX:XX:XX:XX4,ip=192.168.42.75/24,type=veth
net1: name=eth1,bridge=vmbr45,firewall=1,hwaddr=XX:XX:XX:XX:XX:XX,ip=192.168.45.15/24,type=veth
ostype: debian
rootfs: VMpool_VLT_VM:subvol-126-disk-0,mountoptions=noatime,size=8G
swap: 128
unprivileged: 1
lxc.idmap: u 0 100000 1103
lxc.idmap: g 0 100000 1103
lxc.idmap: u 1103 1103 1
lxc.idmap: g 1103 1103 1
lxc.idmap: u 1104 101104 64432
lxc.idmap: g 1104 101104 64432
Last edited: