From: Nikos Skalkotos Date: Wed, 29 Jan 2014 16:04:11 +0000 (+0200) Subject: Remount every UFS partition rw just to be sure X-Git-Tag: 0.13~1^2~3^2~7 X-Git-Url: https://code.grnet.gr/git/snf-image/commitdiff_plain/922c1513216b286e6b731ee82628d109f6793814 Remount every UFS partition rw just to be sure In many cases although rw flags is passed to mount, the command returns SUCCESS with a warning that the fs seems to be mounted ro. Remounting rw does work. --- diff --git a/snf-image-helper/tasks/30MountImage.in b/snf-image-helper/tasks/30MountImage.in index 4e45151..508194b 100644 --- a/snf-image-helper/tasks/30MountImage.in +++ b/snf-image-helper/tasks/30MountImage.in @@ -55,6 +55,14 @@ if [[ "$SNF_IMAGE_PROPERTY_OSFAMILY" == *bsd ]]; then exit 1 fi $MOUNT -t ufs -o ufstype="$ufstype,rw" "$rootdev" "$SNF_IMAGE_TARGET" + + # In many cases when you try to mount a UFS file system read-write, + # the mount command returns SUCCESS and a message like this gets printed: + # + # mount: warning: /mnt seems to be mounted read-only. + # + # remounting does the trick + $MOUNT -o remount,rw "$SNF_IMAGE_TARGET" else $MOUNT -o rw "$rootdev" "$SNF_IMAGE_TARGET" fi