Scenario
- Product:
ZCF - Component:
ZCE-X - Version:
4.2.x - Storage media: Hybrid disks / all-
SSD/ all-HDD - Deployment: Dual management nodes
- Trigger: An existing Ceph storage pool must be scaled in and its disks replaced before a new storage pool is created according to the new plan.
Symptoms
- The existing storage pool must be scaled in.
- The procedure removes OSDs and their corresponding cache disks.
- After all legacy resources are removed, a new storage pool must be created and initialized.
Assessment
- Before the change, verify that Ceph, database replication, ES, and ETCD are healthy.
- Process only one data node at a time, and do not continue with the next node until recovery is complete.
- After the new storage pool is created, verify that
ceph -sand platform resources have returned to normal.
Cause
This is a combined change involving storage-pool scale-in, OSD removal, cache-disk removal, and new-pool reconstruction. Only one node can be processed at a time; otherwise, data loss or excessive rebalancing can occur.
Resolution
- Preparation
- Risk level: Medium.
- Disable global VM high availability.
- Back up the database on both management nodes.
- Verify the status of Ceph, PostgreSQL, Elasticsearch, and ETCD.
- Health check and database backup
- Back up the database on each management node:
zstack-ctl dump_mysql node1
zstack-ctl dump_mysql node2
- Expected result: A rollback baseline is available.
- Check database replication:
xms-manage db show-replication-info
- Expected result: Primary-standby replication is normal.
- Check Elasticsearch health:
/opt/sds/installer/bin/sds-util es_curl localhost:9200/_cluster/health?pretty
- Expected result: The status is
green.
- Check ETCD health:
/opt/sds/bin/etcdctl cluster-health
- Expected result: The command returns
cluster is healthy.
- Confirm that Ceph is
OK.
- Expected result: The environment can enter the scale-in phase.
- Remove OSDs from one node
- In the storage UI, enable Disable Data Recovery.
- Expected result: Automatic recovery does not introduce fluctuations during scale-in.
- Log in to the target node and mark the OSD to be removed:
echo xstore3 > /var/lib/ceph/osd/ceph-{osd_id}/type
cat /var/lib/ceph/osd/ceph-{osd_id}/type
- Expected result: The target OSD type is changed correctly.
- Stop the OSD:
systemctl stop ceph-osd@{osd_id}
systemctl status ceph-osd@{osd_id}
- Expected result: The service status is
inactive.
- Confirm that
ceph -scontains none of the following:
inactivepeeringunknownunfound- Expected result: The cluster can continue with storage-pool removal.
- Remove the corresponding OSD disk from the storage pool in the UI.
- Delete the removed data disk.
- Delete the corresponding cache disk.
- Expected result: The target disks are fully removed from the legacy storage pool.
- Recover one node before processing the next node
- Remove disks from only one data node at a time.
- Expected result: Data risks from concurrent multi-node scale-in are avoided.
- After completing the current node:
- Enable data recovery.
- Enable global platform high availability.
- Set the storage-pool recovery
QoSto low speed. - Expected result: The cluster enters a controlled recovery state.
- Wait for recovery to complete and for the cluster to become healthy before processing the next node.
- Expected result: Scale-in is completed in stages.
- Rebuild the storage pool after all legacy nodes are processed
- Select the storage pool and create a new pool based on the required capacity and performance.
- Expected result: New storage-pool metadata is created.
- Select and add cache partitions according to the storage plan.
- Expected result: The cache structure of the new pool is created.
- Select disks and create data disks.
- Expected result: New-pool data disks are ready.
- Initialize the newly created storage pool and select all nodes that must join it.
- Expected result: The new storage pool is initialized.
Verification
- Verify that
ceph -sreturns to normal after each scale-in operation. - Verify that each scale-in operation processes only one node.
- Verify that the new storage pool is created and initialized successfully.
- Verify that global high availability and baseline health return to normal.
Risks and Notes
- Risk: Removing disks from multiple data nodes at the same time can cause data loss.
- Risk: If recovery
QoSis not set to low speed, recovery can increase front-end workload bandwidth impact. - Risk level: Medium.
Rollback
If a replacement disk is abnormal after the change:
- Return the replacement disk to its original slot.
- Add the disk again with its original partitioning.
- Add the OSD.
- Add the storage pool.
- Set the storage-pool recovery
QoSto low speed. - Monitor recovery until
ceph -sreturnsOK. - Enable global high availability and complete baseline health checks.
