Jump to content

Accidentally cleared 2 disks in dispart


Recommended Posts

Hi fellow forum members,

 

I made a mistake and I only realized my error a minute too late.

 

I have 4 8TB disks in my array and an additional 8TB disk that was mounted to a VM.

 

I was replacing the disk mounted to the VM (both old and replacement disk was present) but in the process somehow two disks from the array got mounted to the VM. I can't think of how it happened.

 

While I was working on the VM I noticed there was some issue with the disks and I cleared them with diskpart in windows.

 

This of course made all the data disappear on the two disks in the array.

 

The parity seems to be ok. I started a parity check. The disks seems to be indicating the old data still being present as they seems to be half full on the dashboard.

 

I busted the partition table on the 2 disks from the array for sure but there was no formatting took place in diskpart. I think all it did was deleting the partition tables.

 

How can I restore the original partition table so the data is visible to the array again?

 

Please help as I'm in a bit of a panic...

 

Thanks,

 

Flamingo

Edited by Flamingo
typo/clarification
Link to comment

Just a quick update.

 

I seems that only 1 disk was impacted from the array (sdf). I think when I removed on of the replacement disks physically from the server one of the disks from the array jumped in it's place. And when I reconnected the physical disk the disk from the array remained amounted with the VM.

 

Parity check is running. I'm not sure if it will be able to replace my missing files given the partition table is messed up on sdf.

 

Please let me know if you have any suggestions on this.

Link to comment
34 minutes ago, Flamingo said:

Most of my family pics and old scanned documents are on that drive...🙁

 

If the emulated disk is readable, I would copy everything off of it first. (Even if I had to buy another disk to do it!!!)

 

Now, for another thought...  One should always have three copies of any data that can not be replaced by googling. 

Link to comment

Sooo I messed this up big time. My initial assessment was correct.

 

Steps I took in the past hour

 

- I stopped the parity check.

- turned off the server

- disconnected disk3

- powered on the server

- unraid started, the array didn't start. I found it strange it didn't try to emulate Disk3. I opted for the array to be started as I tough emulation might kick in after...at hat point I realized that my original assessment was correct. When I was working with the 2 disks connected to the VM and I removed and reconnected one the disk allocations must have changed without me realizing it. And when the VM started for the second time not the two unassigned disks were connected but the parity disk and Disk3.

- I turned off the server again

- reconnected Disk 3

The array didn't pick the disk up automatically after the reboot. Probably because the partition table was missing.

- I added Disk 3 as a new config. The disk is now in the array sort of but not mounted.

 

image.thumb.png.0fc18794dbbc2a2cf16e8ca7d0b85d28.pngI have n

 

I have no idea how the parity disk is is green?!? I have a feeling I have deleted the partition table from that accidentally as Disk3 was never emulated.

 

Data should still be present on Disk3 but now thinking back I might have reformatted as a quick format to ntfs.

 

Is there a way to restore this?

image.png

Link to comment

Thanks JorgeB,

 

I stopped the array and restarted it in maintenance mode.

 

I run the check -nv command and this is what I got back.

 

Phase 1 - find and verify superblock... bad primary superblock - bad magic number !!! attempting to find secondary superblock...

 

..........................................

 

verified secondary superblock... would write modified primary superblock Primary superblock would have been modified. Cannot proceed further in no_modify mode. Exiting now.

 

What attribute should I run the check command to allow it to write a modified primary superblock?

 

I think I should use check -d

 

Does anyone have experience with this command in a similar situation?

Link to comment

This is the result of the second check:

 

Phase 1 - find and verify superblock... bad primary superblock - bad magic number !!! attempting to find secondary superblock...

 

verified secondary superblock... writing modified primary superblock - block cache size set to 6116280 entries

 

Phase 2 - using internal log - zero log... zero_log: head block 1429578 tail block 1429576

 

ERROR: The filesystem has valuable metadata changes in a log which needs to be replayed. Mount the filesystem to replay the log, and unmount it before re-running xfs_repair. If you are unable to mount the filesystem, then use the -L option to destroy the log and attempt a repair. Note that destroying the log may cause corruption -- please attempt a mount of the filesystem before doing this.

 

Could someone please advice what would be the next step?

Link to comment

That report indicates major corruption was found. 

 

It is likely that not all files have been recovered, and even for those that have the filename information was not found and the files have been placed into a lost-found folder so you can (if you want to) inspect them manually to determine their original names (using the Linux 'file' command to help by determining their type).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...