From: Aurelien Degremont Date: Fri, 26 Apr 2019 09:58:37 +0000 (+0000) Subject: LU-12227 scripts: check for mounted ZFS devices too X-Git-Tag: 2.12.54~90 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=34bc379f7425f364535e608d03f424a64bd1a04e LU-12227 scripts: check for mounted ZFS devices too lustre init script skips several checks if the device type is ZFS. If some ZFS devices are already mounted, the script will return a non-zero exit code. The label and mount point check is valid for ZFS devices, so let's do it and avoid this error case. With this patch, when starting ZFS devices the script will only start the not already started ones and if it succeeds, return 0. Test-Parameters: trivial Signed-off-by: Aurelien Degremont Change-Id: I152ca4d62d444193cc66896173873587f0761493 Reviewed-on: https://review.whamcloud.com/34766 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Minh Diep Reviewed-by: Nathaniel Clark Reviewed-by: Oleg Drokin --- diff --git a/lustre/scripts/lustre b/lustre/scripts/lustre index f258cb4..cf5403e 100644 --- a/lustre/scripts/lustre +++ b/lustre/scripts/lustre @@ -455,13 +455,14 @@ start_services () assemble_md_device $journal $raidtab 2>/dev/null fi + if mountpt_is_active $label || \ + device_is_active $label; then + echo "$label is already mounted" + # no error + continue + fi + if [ "x$devtype" != "xzfs" ] ; then - if mountpt_is_active $label || \ - device_is_active $label; then - echo "$label is already mounted" - # no error - continue - fi if ! mmp_test $dev; then result=2 continue