From: Alex Yang Date: Mon, 22 Jan 2018 06:44:41 +0000 (+0800) Subject: Mount xfs image with -o nouuid X-Git-Tag: opnfv-6.0.0~13^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F50901%2F1;p=daisy.git Mount xfs image with -o nouuid In [1], an error occured: "XFS (dm-6): Filesystem has duplicate UUID ... - can't mount". [1]: https://build.opnfv.org/ci/job/daisy-deploy-zte-pod9-daily-master/11/console Change-Id: I84052f481662e370ef8d41d62d356ad9a5e6e3c2 Signed-off-by: Alex Yang --- diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh index 43fd186b..8b3a21f3 100755 --- a/tools/daisy-img-modify.sh +++ b/tools/daisy-img-modify.sh @@ -177,7 +177,13 @@ setup() { sleep 2 dmsetup ls fdisk -l /dev/${loopdevice:0:5} || true - mount /dev/mapper/$loopdevice $mountdir + + if [ "xfs" = "$(blkid -o value -s TYPE /dev/mapper/$loopdevice)" ]; then + mountopts="-o nouuid" + else + mountopts="" + fi + mount $mountopts /dev/mapper/$loopdevice $mountdir mount -t proc none ${mountdir}/proc if [[ -n $img_size ]]; then