[Ocfs2-tools-devel] [PATCH 09/10] Trigger udev rescan to get volume label that mkfs made remotely.
Junxiao Bi
junxiao.bi at oracle.com
Fri Sep 11 01:22:24 PDT 2015
Hi Eric,
On 09/10/2015 02:54 PM, zren at suse.com wrote:
> From: Eric Ren <zren at suse.com>
>
> Volume label used to mount disk remotely is not visible on remote
> node. So before mounting, trigger udevadm rescan to get volume label.
Is this needed? mount can detect the new label.
I "mkfs.ocfs2 -L xxx /dev/sda" one one node, and can "mount -L xxx /mnt"
on another node.
Thanks,
Junxiao.
>
> Signed-off-by: Eric Ren <zren at suse.com>
> Reviewed-by: Gang He <ghe at suse.com>
> ---
> programs/python_common/remote_mount.py | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/programs/python_common/remote_mount.py b/programs/python_common/remote_mount.py
> index 7520405..088ba46 100755
> --- a/programs/python_common/remote_mount.py
> +++ b/programs/python_common/remote_mount.py
> @@ -126,8 +126,20 @@ command = str('%s -l %s -m %s %s' % (buildcmd,
> mt_options))
> #
> o2tf.OpenMPIInit(DEBUGON, options.nodelist, logfile, 'ssh')
> -#
> -#
> +
> +# tigger udev rescan
> +ret = o2tf.openmpi_run(DEBUGON,
> + nproc,
> + 'udevadm trigger',
> + options.nodelist,
> + remote_method,
> + options.interface,
> + logfile,
> + 'WAIT')
> +
> +#wait for completing udev rescan.10s is only tested on 3-nodes.
> +time.sleep(10)
> +
> ret = o2tf.openmpi_run(DEBUGON,
> nproc,
> str('%s' % command),
>
More information about the Ocfs2-tools-devel
mailing list