Zapping data
The zap subcommand removes all data and file systems from a logical
volume or partition. Use the zap subcommand to zap logical volumes, partitions, or
raw devices that are used by Ceph OSDs for reuse. Any file system present on the given logical
volume or partition are removed and all data is purged.
Optionally, you can use the --destroy flag for complete removal of a logical
volume, partition, or the physical device.
Prerequisites
-
A running IBM Storage Ceph cluster.
-
Root-level access to the Ceph OSD node.
Procedure
-
Zap the logical volume:
Syntax
ceph-volume lvm zap VOLUME_GROUP_NAME/LOGICAL_VOLUME_NAME [--destroy]Example
[ceph: root@host01 /]# ceph-volume lvm zap osd-vg/data-lv -
Zap the partition:
Syntax
ceph-volume lvm zap DEVICE_PATH_PARTITION [--destroy]Example
[ceph: root@host01 /]# ceph-volume lvm zap /dev/sdc1 -
Zap the raw device:
Syntax
ceph-volume lvm zap DEVICE_PATH --destroyExample
[ceph: root@host01 /]# ceph-volume lvm zap /dev/sdc --destroy -
Purge multiple devices with the OSD ID:
Syntax
ceph-volume lvm zap --destroy --osd-id OSD_IDExample
[ceph: root@host01 /]# ceph-volume lvm zap --destroy --osd-id 16Note: All the relative devices are zapped. -
Purge OSDs with the FSID:
Syntax
ceph-volume lvm zap --destroy --osd-fsid OSD_FSIDExample
[ceph: root@host01 /]# ceph-volume lvm zap --destroy --osd-fsid 65d7b6b1-e41a-4a3c-b363-83ade63cb32bNote: All the relative devices are zapped.