aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-04-28 11:39:12 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-05-03 13:36:00 -0400
commite5d6b6b0a2cfdbb21506b8f5e741cf719c149cb4 (patch)
tree25b5d7c4451f702c7c7162116139ac6297888744 /pkg/domain
parent77f147468c4bf514dd5a2951a29128f226d1186c (diff)
downloadpodman-e5d6b6b0a2cfdbb21506b8f5e741cf719c149cb4.tar.gz
podman-e5d6b6b0a2cfdbb21506b8f5e741cf719c149cb4.tar.bz2
podman-e5d6b6b0a2cfdbb21506b8f5e741cf719c149cb4.zip
volume: add new option -o o=noquota
add a new option to completely disable xfs quota usage for a volume. xfs quota set on a volume, even just for tracking disk usage, can cause weird errors if the volume is later re-used by a container with a different quota projid. More specifically, link(2) and rename(2) might fail with EXDEV if the source file has a projid that is different from the parent directory. To prevent such kind of issues, the volume should be created beforehand with `podman volume create -o o=noquota $ID` Closes: https://github.com/containers/podman/issues/14049 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/parse/parse.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/parse/parse.go b/pkg/domain/infra/abi/parse/parse.go
index 2d1adab74..3bac2ef99 100644
--- a/pkg/domain/infra/abi/parse/parse.go
+++ b/pkg/domain/infra/abi/parse/parse.go
@@ -73,6 +73,11 @@ func VolumeOptions(opts map[string]string) ([]libpod.VolumeCreateOption, error)
finalVal = append(finalVal, o)
// set option "GID": "$gid"
volumeOptions["GID"] = splitO[1]
+ case "noquota":
+ logrus.Debugf("Removing noquota from options and adding WithVolumeDisableQuota")
+ libpodOptions = append(libpodOptions, libpod.WithVolumeDisableQuota())
+ // set option "NOQUOTA": "true"
+ volumeOptions["NOQUOTA"] = "true"
default:
finalVal = append(finalVal, o)
}