[SOLVED] New drive /var

aavar

New Member
Nov 25, 2020
2
0
1
41
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
 
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
 
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.