From 06c9c79d31f8903f3e99abc4cdaa28a505436a48 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Mon, 22 Jan 2018 14:44:41 +0800 Subject: 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 --- tools/daisy-img-modify.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit 1.2.3-korg