Linux partition lost

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
JoeMcK
Posts: 2
Joined: 20 Mar 2018, 08:21

Linux partition lost

#1 Post by JoeMcK »

We had a partition that had this structure

Disk /dev/sdn: 32.8 TiB, 36002026487808 bytes, 70316457984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5DBAF6BE-3A6E-45F8-AA4A-B759B9A56976

Device Start End Sectors Size Type
/dev/sdn1 2048 70316455935 70316453888 32.8T Microsoft basic data

Testdisk sees it, it can see the data, and in fact we are recovering the data via testdisk.

However the Lun was extended to 48TB, from 32.8T. When we try to recover the partition table Testdisk seems to struggle with the start and end blocks.

Can you suggest how we work around this?

thanks

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Linux partition lost

#2 Post by cgrenier »

To resize your filesystem, you had to resize the lun, resize the partition and resize the filesystem itself. Resizing the partition usually requires umounting the filesystem.
It's easier to avoid using a partition table, you only have to resize the lun and resize the filesystem. Both can be done online.

You are using a gpt partition table. Because you have resized the lun, the backup gpt (at the end of the disk) is now missing and need to be recreated.
What problem do you have with testdisk ? Do you have it with version 7.1-WIP ?

JoeMcK
Posts: 2
Joined: 20 Mar 2018, 08:21

Re: Linux partition lost

#3 Post by JoeMcK »

Thanks all good with the new version for my situation.

We recovered the lun and all is happy. We did take a while to do it, as when we could see the data, we decided to copy it off before doing any more changes to partition tables, just in case something went wrong. In the end it worked perfectly, no loss of data.....just a few more grey hairs for me and my peers.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Linux partition lost

#4 Post by cgrenier »

Perfect! I hope the downtime has been limited.

Locked