My problem is I don't know what my problem is

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
Post Reply
Message
Author
lorax1284
Posts: 4
Joined: 12 May 2019, 04:48

My problem is I don't know what my problem is

#1 Post by lorax1284 » 12 May 2019, 05:12

Thanks in advance for any help you might be able to provide.

I set up an Open Media Server about a year ago.

Populated it with 4 physical drives: 3 x 2 terabyte, and 1 x 4 terabyte. Used the built-in OMV tools to configure the file system etc., which was (using the default settings without making a lot of informed choices) the disks having the ext4 file system with a single logical volume (called "Fantasia") with folders to contain different types of data (music, video, documents, PC backups, software installers). The server boots off 32 gig USB key.

Everything working fine. I add an external 4 bay eSATA enclosure, into which I installed another 4 terabyte drive. Got that set up. At the time I didn't know it but I had only installed the physical disk, hadn't, um, 'extended the logical volume'? I think? It wasn't showing ~14 terabytes. So I did something and got the partition "Fantasia" to "extend" to include the new 4 terabyte drive in the external drive enclosure. Only days later I got my hands on another 4 terabyte drive, so I thought I'd insert it as the second disk in the enclosure, but it wasn't working, so I powered down the external enclosure and put the new 4 terabyte drive in the 1st bay and left the original single drive out of the enclosure.

Long story short, for some reason the file system was no longer accessible.

The folder where the mount point is on my boot drive is empty. I don't recall ever looking there for a virtual file system but there's nothing there now. So I recreated the folders manually (hopefully that didn't actually do anything to the data on the physical disks) but they show up empty.

the output of PVDisplay:

--- Physical volume ---
PV Name /dev/sda
VG Name Fantasia
PV Size 1.82 TiB / not usable 936.00 KiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476932
Free PE 476932
Allocated PE 0
PV UUID Nl0vqx-Dggu-4d2I-h5MB-NuoV-CIoM-9Lk7Ye

--- Physical volume ---
PV Name /dev/sdc
VG Name Fantasia
PV Size 1.82 TiB / not usable 1.09 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476932
Free PE 476932
Allocated PE 0
PV UUID VDTFqS-vjAB-kBdf-LI5i-310v-Hs2c-KX9jYs

--- Physical volume ---
PV Name /dev/sdd
VG Name Fantasia
PV Size 1.82 TiB / not usable 1.09 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476932
Free PE 476932
Allocated PE 0
PV UUID hYlB6v-Vkrn-hUNa-JVRK-zbOf-9Lca-Ps1JDL

--- Physical volume ---
PV Name /dev/sde
VG Name Fantasia
PV Size 3.64 TiB / not usable 3.84 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 953861
Free PE 953861
Allocated PE 0
PV UUID 2d5MB9-J6xH-B80B-lVoQ-Nde9-9CQ1-jxIusp

--- Physical volume ---
PV Name /dev/sdf
VG Name Fantasia
PV Size 3.64 TiB / not usable 2.84 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 953861
Free PE 953861
Allocated PE 0
PV UUID YKOqsg-Wkx7-f0f3-ko2J-UeX3-YgFO-6ow0QL


The output of 'lvdisplay' is nothing.

I really don't know what to do at this point: I believe the files are still there, but I don't know if I can just mount the entire logical volume again or if I have to get another blank disk to recover files to or what not.

Using TestDisk, looks like this:

Select a media (use Arrow keys, then press Enter):
>Disk /dev/sda - 2000 GB / 1863 GiB - ST2000DL003-9VT166
Disk /dev/sdb - 15 GB / 14 GiB - Generic- SD/MMC
Disk /dev/sdc - 2000 GB / 1863 GiB - ST2000DM006-2DM164
Disk /dev/sdd - 2000 GB / 1863 GiB - ST2000DM001-1ER164
Disk /dev/sde - 4000 GB / 3726 GiB - ST4000DM000-2AE166
Disk /dev/sdf - 4000 GB / 3726 GiB - WDC WD40EFRX-68N32N0

>[Proceed ] [ Quit ]

select the first disk for example:

Disk /dev/sda - 2000 GB / 1863 GiB - ST2000DL003-9VT166

Please select the partition table type, press Enter when done.
[Intel ] Intel/PC partition
[EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)
[Humax ] Humax partition table
[Mac ] Apple partition map
>[None ] Non partitioned media
[Sun ] Sun Solaris partition
[XBox ] XBox partition
[Return ] Return to disk selection

Hint: None partition table type has been detected.
Note: Do NOT select 'None' for media with only a single partition. It's very
rare for a disk to be 'Non-partitioned'.

Do an "analyze" and Quick Search and get to this:

Disk /dev/sda - 2000 GB / 1863 GiB - CHS 243201 255 63
Partition Start End Size in sectors
>P Linux LVM2 0 0 1 243201 80 63 390702916

Structure: Ok.

Keys T: change type,
Enter: to continue

so I'm a bit wary of doing much more. I honestly think I may only have to fix something in fstab or what not, but I'm nervous about trying to do that and breaking something or reinstating it as a "blank file system" that will get overwritten.

I've tried googling lots of things about ext4 partiions, 'reconnect logical volume', 'recover files from missing lvm2' etc., etc., etc., and I'm not sure which which cases apply and which things I can do non-destructively.

Any help or direction would be appreciated, and thanks in advance.

Sponsored links

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

Re: My problem is I don't know what my problem is

#2 Post by cgrenier » 12 May 2019, 20:10

Each disk is directly used as a LVM PV (physicalvolume)
What are
- the output of vgdisplay to know the VolumeGroup (VG) ?
- the output of lvdisplay to know the LogicalVolumes (LV) ?

lorax1284
Posts: 4
Joined: 12 May 2019, 04:48

Re: My problem is I don't know what my problem is

#3 Post by lorax1284 » 12 May 2019, 21:37

Thanks for replying: the output of vgdisplay

--- Volume group ---
VG Name Fantasia
System ID
Format lvm2
Metadata Areas 5
Metadata Sequence No 14
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 5
Act PV 5
VG Size 12.74 TiB
PE Size 4.00 MiB
Total PE 3338518
Alloc PE / Size 0 / 0
Free PE / Size 3338518 / 12.74 TiB
VG UUID TPmx5a-MY9Y-gtTS-RwTU-wNFG-EXwU-4PhQDt

the output of "lvdisplay" and of "lvdisplay --all" is null. it returns with a command prompt and no output.

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

Re: My problem is I don't know what my problem is

#4 Post by cgrenier » 15 May 2019, 06:19

It looks like all logical volume are gone, nothing is allocated in the volume group.
Try vgcfgrestore, see https://www.thegeekdiary.com/how-to-rec ... fgrestore/

lorax1284
Posts: 4
Joined: 12 May 2019, 04:48

Re: My problem is I don't know what my problem is

#5 Post by lorax1284 » 19 May 2019, 15:11

Thanks for this: I'm trying it out but it's taking longer than I thought to figure it out (I get partway through then get interrupted and can't finish, and kind-of have to start over).

... I didn't want you to think I didn't appreciate your time and help :-) Thanks.

lorax1284
Posts: 4
Joined: 12 May 2019, 04:48

Re: My problem is I don't know what my problem is

#6 Post by lorax1284 » 23 May 2019, 13:56

I tried various techniques using vgconfig and vgcfgrestore but I end up with that "0 logical volume(s)..." error from vgconfig -ay

How would I find a tutorial that is effectively:

"Take three disks that comprise a single volume group and are a single logical volume, and just stick it in another computer, and mount it."

All the tutorials I can find talk about recovering RAID or creating the LV from scratch, and all I want to do is "make my system aware" of the data: from what I can tell, the system is aware of the Physical volumes, and I've been able to make it aware of the Volume Group, but it doesn't see the logical volume no matter what I do. Again, I believe the fact that testdisk sees the drives as partition type "none" isn't a problem, as certain that I didn't issue any commands to wipe the drives: they are configured as the Open Media Vault setup configured them from brand new drives... but with data on them of course.

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

Re: My problem is I don't know what my problem is

#7 Post by cgrenier » 23 May 2019, 20:03

It's possible to run photorec to recover data from the volume group, but the result will be inferior to the recovery from a logical volume...

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests