How can we remove the objects from a pool, without removing the pool.
We can be “rados -p cleanup –prefix ” to remove all the objects, with a specific prefix.
First check all the objects in that pool, use the below command:
$ rados -p ls
For example, If you wanted to clean up the ‘rados bench write’ testing objects, you can use the below command for the same:
$ rados -p --prefix cleanu benchmark’ $ rados -p rbdbench cleanup --prefix benchmark // will remove all objects prefixed with benchmake
You can also remove all the objects from a pool as below, but note that, the below command will delete all the objects in that pool, so be careful to use the below command.
$ for i in `rados -p ls; do echo $i; rados -p rm $i; done’