Remount every UFS partition rw just to be sure
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 29 Jan 2014 16:04:11 +0000 (18:04 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 29 Jan 2014 16:04:11 +0000 (18:04 +0200)
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.

snf-image-helper/tasks/30MountImage.in

index 4e45151..508194b 100644 (file)
@@ -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