my $cmd_option = PVE::CephConfig::ceph_connect_option($scfg, $storeid);
my $configfile = $cmd_option->{ceph_conf};
- my $server = $cmd_option->{mon_host} // PVE::CephConfig::get_monaddr_list($configfile);
my $subdir = $scfg->{subdir} // '/';
my $mountpoint = $scfg->{path};
- my $source = "$server:$subdir";
$mountdata = PVE::ProcFSTools::parse_proc_mounts() if !$mountdata;
return $mountpoint if grep {
$_->[2] =~ m#^ceph|fuse\.ceph-fuse# &&
- $_->[0] =~ m#^\Q$source\E|ceph-fuse$# &&
+ $_->[0] =~ m#\Q:$subdir\E$|^ceph-fuse$# &&
$_->[1] eq $mountpoint
} @$mountdata;
my $source = "$server:$subdir";
$cmd = ['/bin/mount', '-t', 'ceph', $source, $mountpoint, '-o', "name=$cmd_option->{userid}"];
push @$cmd, '-o', "secretfile=$secretfile" if defined($secretfile);
+
+ # tell systemd that we're network dependent, else it umounts us to late
+ # on shutdown, when we couldn't connect to the active MDS and thus
+ # unmount hangs and delays shutdown/reboot (man systemd.mount).
+ push @$cmd, '-o', '_netdev';
}
- # tell systemd that we're network dependent, else it umounts us to late on
- # shutdown, when we couldn't connect to the active MDS and thus unmount
- # hangs and delays shutdown/reboot (man systemd.mount)
- push @$cmd, '-o', '_netdev';
if ($scfg->{options}) {
push @$cmd, '-o', $scfg->{options};