When attempting to recover Greenplum segments using gprecoverseg or gprecoverseg -F, the operation fails. Reviewing the system logs or attempting manual intervention reveals the following:
umount: /data/volX: target is busy when attempting to unmount the segment disk.dmesg or /var/log/syslog shows Input/output error or XFS (sdX): metadata I/O error for the specific partition.ls on the mount point hang or return I/O errors.All Linux OS versions
This issue typically occurs when the Linux kernel loses communication with the local disk partition (e.g., /dev/sda8) while processes are still attempting to access it.
Standard umount commands fail because background Greenplum processes or kernel threads are stuck in an 'Uninterruptible Sleep' (D state) while waiting for I/O that will never complete. Because these processes cannot be killed, the 'target is busy' error persists even after stopping Greenplum services.
Follow these steps to clear the hardware lock and recover the segments:
Identify the Faulty Device: Check which partition is failing by running:
Confirm if the mount point (e.g., /data/vol4) matches the segments that are down.
Attempt Service Termination: Try to stop the cluster and any remaining segment processes:
Perform a System Reboot: If the umount: target is busy error persists and lsof or fuser cannot clear the processes, a full system reboot of the affected segment host is required. This resets the hardware interface and clears stuck kernel processes.
Verify Mount and Hardware Health: After the reboot, ensure the disk has mounted correctly and is writable:
Recover Greenplum Segments: Once the disk is accessible, bring the cluster online and run the recovery:
Note: If data was corrupted during the I/O failure, a full recovery (gprecoverseg -F) may be required.