diff options
author | Guillaume Abrioux <gabrioux@redhat.com> | 2022-02-23 09:36:29 +0100 |
---|---|---|
committer | Guillaume Abrioux <gabrioux@redhat.com> | 2022-02-23 12:02:09 +0100 |
commit | 75c91a8c6f37a38d69d5da8b1e7d49d9c636230b (patch) | |
tree | b55f84526f2dbe47a52451529d452d6f39f50cc1 /src/ceph-volume/ceph_volume/devices | |
parent | Merge pull request #45117 from idryomov/wip-rbd-trash-purge-error-typo (diff) | |
download | ceph-75c91a8c6f37a38d69d5da8b1e7d49d9c636230b.tar.xz ceph-75c91a8c6f37a38d69d5da8b1e7d49d9c636230b.zip |
ceph-volume: abort when passed devices have partitions
ceph-volume doesn't prevent from using db and/or wal devices
with existing partitions on them.
This can lead to a data loss situation.
Fixes: https://tracker.ceph.com/issues/54376
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Diffstat (limited to 'src/ceph-volume/ceph_volume/devices')
-rw-r--r-- | src/ceph-volume/ceph_volume/devices/lvm/common.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ceph-volume/ceph_volume/devices/lvm/common.py b/src/ceph-volume/ceph_volume/devices/lvm/common.py index e09f7f0db91..614be0af6ad 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/common.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/common.py @@ -92,6 +92,7 @@ bluestore_args = { '--block.db': { 'dest': 'block_db', 'help': 'Path to bluestore block.db logical volume or device', + 'type': arg_validators.ValidDevice(as_string=True), }, '--block.db-size': { 'dest': 'block_db_size', @@ -109,6 +110,7 @@ bluestore_args = { '--block.wal': { 'dest': 'block_wal', 'help': 'Path to bluestore block.wal logical volume or device', + 'type': arg_validators.ValidDevice(as_string=True), }, '--block.wal-size': { 'dest': 'block_wal_size', @@ -132,6 +134,7 @@ filestore_args = { }, '--journal': { 'help': 'A logical volume (vg_name/lv_name), or path to a device', + 'type': arg_validators.ValidDevice(as_string=True), }, '--journal-size': { 'help': 'Size of journal LV in case a raw block device was passed in --journal', |