Hi,
I use LVM as backend storage and try to restore a backup of an unprivileged container but I get a permission problem: "tar: ./bin: Cannot mkdir: Permission denied".
I think that I need to mount/create the LVM storage with some extra option to allow write access for the mapped user but don't know what is missing. I was unable to get "pct restore" to create the LVM device itself, so I created it from the Shell (the lvm is backed from a fibrechannel SAN which causes a slight delay till the device appears, perhaps this is a problem?):
lvcreate -n slow/vm-2106-disk-1 -L25G
lvchange -ay slow/vm-2106-disk-1
mkfs.ext4 /dev/mapper/slow-vm--2106--disk--1
After this, I use pct restore with the expected machine options:
pct restore 2106 vzdump-lxc-2106-2018_03_18-13_59_25.tar.lzo --arch amd64 --cores 4 --hostname testme --memory 2048 --net0 name=eth0,bridge=vmbr0,gw=192.168.200.1,hwaddr=96:3EF:29:AD:5E,ip=192.168.200.199/24,type=veth --ostype debian --swap 2048 -ignore-unpack-errors 1 --unprivileged 1
The command spits out a line like "tar: ./bin: Cannot mkdir: Permission denied" for any item in the archive and finally terminates with an error.
Can anybody please point me to the right way to restore this container?
best regards
Oliver
I use LVM as backend storage and try to restore a backup of an unprivileged container but I get a permission problem: "tar: ./bin: Cannot mkdir: Permission denied".
I think that I need to mount/create the LVM storage with some extra option to allow write access for the mapped user but don't know what is missing. I was unable to get "pct restore" to create the LVM device itself, so I created it from the Shell (the lvm is backed from a fibrechannel SAN which causes a slight delay till the device appears, perhaps this is a problem?):
lvcreate -n slow/vm-2106-disk-1 -L25G
lvchange -ay slow/vm-2106-disk-1
mkfs.ext4 /dev/mapper/slow-vm--2106--disk--1
After this, I use pct restore with the expected machine options:
pct restore 2106 vzdump-lxc-2106-2018_03_18-13_59_25.tar.lzo --arch amd64 --cores 4 --hostname testme --memory 2048 --net0 name=eth0,bridge=vmbr0,gw=192.168.200.1,hwaddr=96:3EF:29:AD:5E,ip=192.168.200.199/24,type=veth --ostype debian --swap 2048 -ignore-unpack-errors 1 --unprivileged 1
The command spits out a line like "tar: ./bin: Cannot mkdir: Permission denied" for any item in the archive and finally terminates with an error.
Can anybody please point me to the right way to restore this container?
best regards
Oliver