Need help. I'm concerned I'm about to lose my data

Okay, here’s what we do.

Step 1: Make a backup of that /dev/sdg label with

sudo sfdisk -d /dev/sdg > sdg.backup

Keep this file safe somewhere. It should be same as the one in your previous post but let’s be extra-safe here.

Step 2: Copy the codeblock below into a brand new file called sdg.fixed - use your favorite Unix-y text editor like vi or nano directly on your TrueNAS machine, to ensure you get the correct type of linebreak.

label: gpt
label-id: E8F82843-98C0-48B5-ADD6-CCDD218DEE22
device: /dev/sdg
unit: sectors
first-lba: 34
last-lba: 46875541470
sector-size: 512

/dev/sdg1 : start=        4096, size= 46875535361, type=6A898CC3-1DD2-11B2-99A6-080020736631, uuid=1B97BE74-19E9-48F5-9EAD-844B66857F35

Step 3: Push this file to your disk with sudo sfdisk /dev/sdg < sdg.fixed

Step 4: Reboot.

At this point, if we’ve done everything right, your pool should be back online - but you’ll still have it in a “three-legged” mode with a mirror of 2x10T + 1x24T. Use the webUI to Extend/Attach the single-drive vdev with the other 24T disk, and let it resilver. Scrub, and you should be good to go.

6 Likes

Success! Upon rebooting, Ocean was back online. I extended sdg by mirroring the other 24TB drive and it’s currently resilvering. I’ll scrub upon completion, likely sometime tomorrow.

Thank you so much @HoneyBadger for saving my data! And thanks to @winnielinnie for initially trying to help and @RetroG who pointed out the specific error. I sincerely appreciate all of your efforts!

5 Likes

Just as a final update, the scrub worked perfectly and I was able to get back to my original task which was to expand my pool onto larger disks. The links @RetroG provided worked perfectly for allowing me to manually expand my partitions instead of using the Expand button which is what resulted in my encountering the bug that kicked off this whole mess. In the end I expanded my 12TB (mirrored) + 10TB (mirrored) array to 24TB (mirrored) + 24 TB (mirrored). My next goal will be to back up my entire dataset to a separate machine in case I do something silly that risks my data again. Then I should be completely set just in time to upgrade TrueNAS versions.

Thanks again everyone for your help!

6 Likes