[pve-devel] applied: [PATCH storage v2] cephfs: Exclude _netdev when mounting with fuse

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jun 14 10:05:35 CEST 2019


On 6/12/19 12:32 PM, Alwin Antreich wrote:
> Since ceph-fuse is called directly in the CephFS storage plugin, which
> can not process the _netdev option, mounting the CephFS storage fails
> when fuse is set in the storage.cfg.
> 
> This patch moves the _netdev option into the else part of the if fuse is
> set statement. _netdev is only added if the CephFS kernel client mounts
> the storage.
> 
> It seems _netdev is not needed anyway for the fuse mount, as the
> connection is closed, once the fuse process gets killed on shutdown.
> 
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
> Changes v1 -> v2:
>     * moved push into if statement
>     * added hopefully more context to the commit message

way better, much thanks! applied.

> 
>  PVE/Storage/CephFSPlugin.pm | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/Storage/CephFSPlugin.pm b/PVE/Storage/CephFSPlugin.pm
> index 16fc316..53491ed 100644
> --- a/PVE/Storage/CephFSPlugin.pm
> +++ b/PVE/Storage/CephFSPlugin.pm
> @@ -65,11 +65,12 @@ sub cephfs_mount {
>  	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};
> 





More information about the pve-devel mailing list