# CephFS, pool replacement without data loss

**URL:** <https://forums.suse.com/t/cephfs-pool-replacement-without-data-loss/29411>\
**Category:** SUSE Enterprise Storage\
**Created:** [February 24, 2017, 7:20pm UTC](https://forums.suse.com/t/cephfs-pool-replacement-without-data-loss/29411 "2017-02-24T19:20:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![polezhaevdmi](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@polezhaevdmi](https://forums.suse.com/u/polezhaevdmi)\
**Post date:** [February 24, 2017, 7:20pm UTC](https://forums.suse.com/t/cephfs-pool-replacement-without-data-loss/29411/1 "2017-02-24T19:20:43Z")

</div>

Goal: replace the active Ceph fileystem pool without loss of data and with the minimal loss of productivity time. This might be neccesary, for example, if ones have to reduce the number of placement groups being used for CephFS purpose.  
Is that goal achievable? If yes, how to achive it?

The clue to fast data movement is [here](https://www.sebastien-han.fr/blog/2013/03/12/ceph-change-pg-number-on-the-fly/), in the Sébastien’s article. Still, the preservation of data possibility is negative.

- The old pool removement/rename is blocked by CephFS.
- The ceph fs new command gives clean file system as a result.

To illustrate the fast, but wrong way:

```auto
systemctl stop ceph-mds\\*.service (Tried with Debian cluster)
ceph fs rm cephfs
ceph osd pool create cephfs_data_ 64 64 <-- Instead of 128
ceph osd pool create cephfs_metadata_ 64 64 <-- Instead of 128
rados cppool cephfs_data cephfs_data_
rados cppool cephfs_metadata cephfs_metadata_
ceph osd pool delete cephfs_data cephfs_data --yes-i-really-really-mean-it
ceph osd pool delete cephfs_data cephfs_metadata --yes-i-really-really-mean-it
ceph osd pool rename cephfs_data_ cephfs_data
ceph osd pool rename cephfs_metadata_ cephfs_metadata
ceph fs [COLOR="#FF0000"]new[/COLOR] cephfs metadata data <-- Data loss is here
systemctl start ceph-mds\\*.service
mount /mnt/cephfs/
mkdir /mnt/cephfs/NFS
```

There should be something better, instead of backup/restore or create another CephFS with full copy.

---

<div class="post-metadata">

**Author:** ![Automatic\_Reply](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Automatic\_Reply](https://forums.suse.com/u/Automatic_Reply)\
**Post date:** [March 1, 2017, 7:30am UTC](https://forums.suse.com/t/cephfs-pool-replacement-without-data-loss/29411/2 "2017-03-01T07:30:32Z")

</div>

polezhaevdmi,

It appears that in the past few days you have not received a response to your  
posting. That concerns us, and has triggered this automated reply.

These forums are peer-to-peer, best effort, volunteer run and that if your issue  
is urgent or not getting a response, you might try one of the following options:

- Visit [http://www.suse.com/support](http://www.suse.com/support) and search the knowledgebase and/or check all  
the other support options available.
- Open a service request: [https://www.suse.com/support](https://www.suse.com/support)
- You could also try posting your message again. Make sure it is posted in the  
correct newsgroup. ([http://forums.suse.com](http://forums.suse.com))

Be sure to read the forum FAQ about what to expect in the way of responses:  
[http://forums.suse.com/faq.php](http://forums.suse.com/faq.php)

If this is a reply to a duplicate posting or otherwise posted in error, please  
ignore and accept our apologies and rest assured we will issue a stern reprimand  
to our posting bot…

Good luck!

Your SUSE Forums Team  
[http://forums.suse.com](http://forums.suse.com)
