You are not logged in.

#1 2021-03-12 07:29:03

cmonty14
Member
Registered: 2019-10-05
Posts: 58

Data recovery after mkfs.ext4 /dev/mapper/<vg>-data

Hello,

I have accidently executed

mkfs.ext4 /dev/mapper/<vg>-data

.

Can you please advise how to recover the deleted data?

The drive is good, the partitions are accessible, LVM shows no errors.

THX

Offline

#2 2021-03-12 10:03:47

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: Data recovery after mkfs.ext4 /dev/mapper/<vg>-data

I don't use LVM but this page could help you.
It's probably best to clone the drive first in case more data gets written to it so at least you have an exact copy of the drive.

Offline

#3 2021-03-12 11:21:14

cmonty14
Member
Registered: 2019-10-05
Posts: 58

Re: Data recovery after mkfs.ext4 /dev/mapper/<vg>-data

Any advice how to work with photorec with LVM partition?

Offline

#4 2021-03-12 11:41:22

frostschutz
Member
Registered: 2013-11-15
Posts: 1,651

Re: Data recovery after mkfs.ext4 /dev/mapper/<vg>-data

Is it SSD storage? Asking because mkfs.ext4 issues TRIM/discard and thus all data gone nothing to recover.

So recovery is only possible on HDD, or if the PV is LUKS encrypted without allow-discards.

Otherwise... which filesystem was on it before?

Any advice how to work with photorec with LVM partition?

You can use photorec on it directly like any other block device. But photorec can only recover unfragmented files with distinct file headers.

Offline

#5 2021-03-13 09:26:33

cmonty14
Member
Registered: 2019-10-05
Posts: 58

Re: Data recovery after mkfs.ext4 /dev/mapper/<vg>-data

The drive is a HDD.
And the filesystem was originally EXT4.

Offline

Board footer

Powered by FluxBB