I have a 2TB RAID5 of which 700GB is used and a 1TB empty hard drive. I'd like to image the RAID onto the drive (so I can later rebuild it using a different set of drives).

Looks like dd images the entire array, which won't fit. Is there a way to only image the used part?

dd on entire disk, but do not want empty portion lists a few ways, but there are some concerns about scalability and writing back using the image, and whether the approach works for RAID.


Do you really need an image? rsync will let you copy the contents of the filesystem to a filesystem on the empty hard drive, or to a filesystem on a loopback device if you need the data to be packaged up into a single file.

Imaging is nice if you need to preserve data that sits outside the filesystem (eg. boot sectors or partition tables), but that's not a common situation if you're using RAID 5. It's overkill if you just need to clone the file tree.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.