I need to be able to move data around a disk that has mounted partitions. I am not touching the data on the mounted partition, the MBR or any other disk metadata, only the freespace and unmounted partitions. At the moment I am using libparted but it causes data corruption sometimes although there are no reported errors.
I am experimenting now with open() on, for example, /dev/sdc while /dev/sdc2 is mounted. That also sometimes seems to have problems with busy partitions on the disk. No errors are reported.
Any suggestions?
Thank you.