[SOLVED] New drive /var

aavar

New Member
Nov 25, 2020
2
0
1
38
Hi
I have set up a simple proxmox setup with one physical drive in my server.
It's getting full, so I have added a second ssd that I was planning to mount in /var.
When I try to copy the files from /var to the new drive i get permission errors.
How can I do what I am trying to do?

The errors:
# cp -r /var/* .
cp: cannot open '/var/lib/lxcfs/cgroup/memory/user.slice/user-0.slice/session-22.scope/memory.force_empty' for reading: Permission denied
cp: cannot open '/var/lib/lxcfs/cgroup/memory/user.slice/user-0.slice/session-22.scope/memory.pressure_level' for reading: Permission denied
cp: cannot open '/var/lib/lxcfs/cgroup/memory/user.slice/user-0.slice/session-22.scope/cgroup.event_control' for reading: Permission denied
cp: error reading '/var/lib/lxcfs/cgroup/blkio/user.slice/blkio.throttle.read_iops_device': Invalid argument
cp: error reading '/var/lib/lxcfs/cgroup/blkio/user.slice/blkio.throttle.write_iops_device': Invalid argument
cp: cannot open '/var/lib/lxcfs/cgroup/blkio/user.slice/blkio.reset_stats' for reading: Permission denied
cp: error reading '/var/lib/lxcfs/cgroup/blkio/user.slice/blkio.throttle.read_bps_device': Invalid argument
cp: error reading '/var/lib/lxcfs/cgroup/blkio/user.slice/blkio.throttle.write_bps_device': Invalid argument
cp: cannot open '/var/lib/lxcfs/cgroup/devices/user.slice/devices.deny' for reading: Permission denied
cp: cannot open '/var/lib/lxcfs/cgroup/devices/user.slice/devices.allow' for reading: Permission denied
 

matrix

Active Member
Jan 24, 2020
230
27
33
29
do ls -la on /var/lib/lxcfs/cgroup/memory/user.slice/user-0.slice/session-22.scope/memory.force_empty to see your permissions.
but it told you for reading
 

fiona

Proxmox Staff Member
Staff member
Aug 1, 2019
2,676
560
118
Hi,
the lxcfs (see man lxcfs) is a virtual filesystem used for containers. You cannot simply copy it over by hand. Do the following:
  1. First, shut down all of your containers.
  2. Then use systemctl stop lxcfs.service.
  3. Now it should be possible to copy the data below /var and then mount the new drive there.
  4. Start the service systemctl start lxcfs.service again.
  5. Finally restart your containers.
 

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 your own in 60 seconds.

Buy now!