force => {
type => 'boolean',
description => "Force migration despite local bind / device" .
- " mounts. WARNING: identical bind / device mounts need to ".
- " be available on the target node.",
+ " mounts. NOTE: deprecated, use 'shared' property of mount point instead.",
optional => 1,
},
},
description => 'Enable user quotas inside the container (not supported with zfs subvolumes)',
optional => 1,
},
+ shared => {
+ type => 'boolean',
+ description => 'Mark this non-volume mount point as available on multiple nodes (see \'nodes\')',
+ verbose_description => "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!",
+ optional => 1,
+ default => 0,
+ },
};
PVE::JSONSchema::register_standard_option('pve-ct-rootfs', {
my ($ms, $mountpoint) = @_;
my $volid = $mountpoint->{volume};
+ my $type = $mountpoint->{type};
- # skip dev/bind mps when forced
- if ($mountpoint->{type} ne 'volume' && $force) {
- return;
+ # skip dev/bind mps when forced / shared
+ if ($type ne 'volume') {
+ if ($force) {
+ warn "-force is deprecated, please use the 'shared' property on individual non-volume mount points instead!\n";
+ return;
+ }
+ if ($mountpoint->{shared}) {
+ return;
+ } else {
+ die "cannot migrate local $type mount point '$ms'\n";
+ }
}
+
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid, 1) if $volid;
die "can't determine assigned storage for mountpoint '$ms'\n" if !$storage;
my $volid = $mountpoint->{volume};
# already checked in prepare
if ($mountpoint->{type} ne 'volume') {
- $self->log('info', "ignoring mountpoint '$ms' ('$volid') of type " .
- "'$mountpoint->{type}', migration is forced.")
+ $self->log('info', "ignoring shared '$mountpoint->{type}' mount point '$ms' ('$volid')")
if !$snapname;
return;
}