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 <degremoa@amazon.com>
Change-Id: I152ca4d62d444193cc66896173873587f0761493
Reviewed-on: https://review.whamcloud.com/34766
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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