[pve-devel] [PATCH pve-container 5/7] vzdump: exclude lost+found with unprivilged containers
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Nov 25 15:25:15 CET 2015
The lost+found directory is created by mkfs and fsck with
the absolute numeric owner of 0:0 which causes tar on an
unprivileged container to error when trying to read it, so
it needs to be excluded un-anchored.
This doesn't need to be done for rsync as rsync runs as
privileged root.
---
src/PVE/VZDump/LXC.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 6142dc8..cd42361 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -309,6 +309,7 @@ sub archive {
# the second parameter gives the structure in the tar.
push @$tar, "--directory=$tmpdir", './etc/vzdump/pct.conf';
push @$tar, "--directory=$snapdir";
+ push @$tar, '--no-anchored', '--exclude=lost+found' if $userns_cmd;
push @$tar, '--anchored';
push @$tar, map { "--exclude=.$_" } @{$self->{vzdump}->{findexcl}};
--
2.1.4
More information about the pve-devel
mailing list