Score:0

What happens to the disk data if the disk is made RAID ready?

us flag

I have a PERC H730P mini RAID controller. I have a single physical (non-raid) disk with important data which I falsely executed as "Convert to RAID capable". Apart from this, I haven't done anything else to the disk. My question is that if the controller destroys data on the disk to be part of a RAID group or the RAID controller sets a flag only to include it in Virtual Disk (RAID) group. Since I have an option to convert to non-raid on the disk, can I rollback using it without losing data?

djdomi avatar
za flag
restore the backup and everything is fine.
Score:0
za flag

Power off the server, connect a disk to another computer which won't recognize it as RAID (in particular, don't connect to LSI RAID cards and HBAs). Make a dump (dd if=/dev/sdX of=/path/to/an/image.img).

Now, you have virtually unlimited recovery attempts. You can:

  • explore a dump contents with a hex editor and see if it still contains data
  • experiment with the disk, including the rollback you mentioned; if you ever wash data from it, you can always rewrite disk from the dump (the dd command with if and of reversed), or
  • experiment with the dump; for example, you can make it read-only, make read-write overlay image over it (which will contain changes) and do any forensics you are able to: scan for partitions and file systems, etc.

I want to point out again. If you have any valuable data you still hope to recover, always do dump first, before any other action takes place. Don't try running any recovery operations if you aren't absolutely sure you know what you doing until you have a clone lying in safe place. If you recover some kind of RAID, it is often required to have a clone of each component device to be able to retry after bad recovery attempt.

UPD: That's true, regular automatic backup, monitored and tested, often saves many hours and some hair.

Nimrod avatar
us flag
Thanks. You made a good point about taking a backup of the current situation. I totally forgot about it. And I know enough to explore the first two options you suggested, but can you put a pointer on the third suggestion?
Nikita Kipriyanov avatar
za flag
You already have a raw image of your virtual disk made with `dd`. Use `qemu-img` to create an overlay qcow2 using that backup as the base, and then use `qemu-nbd` to make that qcow2 image available to the O.S. as the block device. You can do whatever you want with data on nbd, the changes will go into overlay, the base image will stay unmodified. For that to work reliably, make sure you have enough free space on the filesystem where you create your qcow2 overlay image. To have another try, disconnect the nbd device (with `qemu-nbd` again), remove overlay image and repeat everything again.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.