Question :
I have deployed MongoDB Sharding Cluster(os-centos) on Azure with 2 disks each VM. But default file system is ext4
and I want xfs
file system because of performance. I want to convert that file system.
Is there any way of converting file system without any configuration changes in mongo?
I tried below steps:
- detach disk
- unmount dir
- attach disk
- create partition with xfs file system
- changes on fstab file
- mount dir
Answer :
- create partition where enough space, format it to xfs
- mount that partition to some directory
- stop mongod process
rsync -aP src dst
files from original mongod dbpath to this xfs mount- unmount original dbpath partition mount AND this xfs partition
- mount xfs partition to path where mongod dbpath points
- start mongod process
So, basically when mongod process is stopped, copy all dbpath files to new location/partition and then point mongod process to use that location…