summaryrefslogtreecommitdiffstats
path: root/tools/daisy-img-modify.sh
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2018-01-22 14:44:41 +0800
committerAlex Yang <yangyang1@zte.com.cn>2018-01-22 14:44:41 +0800
commit06c9c79d31f8903f3e99abc4cdaa28a505436a48 (patch)
treefd7308ab488edec19faf9f60f70f6fc0ec17c4df /tools/daisy-img-modify.sh
parent1591bb64f538e0a51ee2e80995d94443711edb99 (diff)
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 <yangyang1@zte.com.cn>
Diffstat (limited to 'tools/daisy-img-modify.sh')
-rwxr-xr-xtools/daisy-img-modify.sh8
1 files changed, 7 insertions, 1 deletions
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