example:
mp0: volume=/dev/sda,mp=/home/
Fix this request:
http://forum.proxmox.com/threads/23256-LXC-Cannot-assign-a-block-device-to-container
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
my ($ms, $mountpoint) = @_;
my $volid = $mountpoint->{volume};
my ($ms, $mountpoint) = @_;
my $volid = $mountpoint->{volume};
+ return if !$volid || $volid =~ m|^/dev/.+|;
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);
my $volid = $mountpoint->{volume};
return if !$volid;
my $volid = $mountpoint->{volume};
return if !$volid;
+ if ($volid =~ m|^/dev/.+| && $mountpoint->{mp} && $ms ne 'rootfs') {
+ PVE::Tools::run_command(['mount', $volid, "$rootdir$mountpoint->{mp}"]);
+ return;
+ }
+
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);
my $scfg = PVE::Storage::storage_config($storage_cfg, $storage);
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);
my $scfg = PVE::Storage::storage_config($storage_cfg, $storage);
my ($ms, $mountpoint) = @_;
my $volid = $mountpoint->{volume};
my ($ms, $mountpoint) = @_;
my $volid = $mountpoint->{volume};
+ return if !$volid || $volid =~ m|^/dev/.+|;
+
PVE::Storage::activate_volumes($storage_cfg, [$volid]);
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);
PVE::Storage::activate_volumes($storage_cfg, [$volid]);
my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);