summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-09 18:02:32 -0700
committerSage Weil <sage@inktank.com>2013-08-12 22:38:23 -0700
commit0964d53ef3e8e386e0a1635d2240aefad7b8e2c1 (patch)
treec0ba63cfcd02d4952d69e14eae9abfcad301293c
parentd6be5ed2601b8cf45570afe7ca75ce5aba3f8b4f (diff)
downloadceph-0964d53ef3e8e386e0a1635d2240aefad7b8e2c1.tar.gz
ceph-disk: fix mount options passed to move_mount
Commit 6cbe0f021f62b3ebd5f68fcc01a12fde6f08cff5 added a mount_options but in certain cases it may be blank. Fill in with the defaults, just as we do in mount(). Backport: cuttlefish Reviewed-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit cb50b5a7f1ab2d4e7fdad623a0e7769000755a70)
-rwxr-xr-xsrc/ceph-disk6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 683553ae467..d2638eb4315 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -1326,6 +1326,7 @@ def move_mount(
path,
cluster,
osd_id,
+ fstype,
mount_options,
):
LOG.debug('Moving mount to final location...')
@@ -1336,6 +1337,10 @@ def move_mount(
)
maybe_mkdir(osd_data)
+ # pick best-of-breed mount options based on fs type
+ if mount_options is None:
+ mount_options = MOUNT_OPTIONS.get(fstype, '')
+
# we really want to mount --move, but that is not supported when
# the parent mount is shared, as it is by default on RH, Fedora,
# and probably others. Also, --bind doesn't properly manipulate
@@ -1509,6 +1514,7 @@ def mount_activate(
path=path,
cluster=cluster,
osd_id=osd_id,
+ fstype=fstype,
mount_options=mount_options,
)
return (cluster, osd_id)