Recovering dd > gz partition backup
Recovering dd > gz partition backup
Hi all, the first my system is a CentOS_5.2 X64 with the Xen kernell.
I maked a gz backup with dd from the two partitions of a raid1 with ext3, then i'am trying to recover any of it into a lvm logic vol (bigger than the original partition size).
I did a dd if=theGzFile | gunzip | dd of=/dev/volGroup/name and later ... and later... when i try to mount it as ext3 i received:
incorrect file system type, incorrect option, incorrect superblok on /dev/VolGroup/name missing code page, or any other error BLA BLA BLA ... (Translated from spanish)
Then i try fsck.ext3 /dev/VolGroup/name receiving:
Couldn't find ext2 superblock, trying backup blocks...
/sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/VolGroupRaid5/ubuntu
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
And using mdadm -E /dev/VolGroup/name gives me:
mdadm: No md superblock detected on /dev/VolGroupRaid5/ubuntu.
Not idea on where is my mistake/s, ?needs to be same partition size for recovering it? ?or worst, need to be the same partition? ?i cant recover it on a lvm logic volume?
thx for your help.
I maked a gz backup with dd from the two partitions of a raid1 with ext3, then i'am trying to recover any of it into a lvm logic vol (bigger than the original partition size).
I did a dd if=theGzFile | gunzip | dd of=/dev/volGroup/name and later ... and later... when i try to mount it as ext3 i received:
incorrect file system type, incorrect option, incorrect superblok on /dev/VolGroup/name missing code page, or any other error BLA BLA BLA ... (Translated from spanish)
Then i try fsck.ext3 /dev/VolGroup/name receiving:
Couldn't find ext2 superblock, trying backup blocks...
/sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/VolGroupRaid5/ubuntu
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
And using mdadm -E /dev/VolGroup/name gives me:
mdadm: No md superblock detected on /dev/VolGroupRaid5/ubuntu.
Not idea on where is my mistake/s, ?needs to be same partition size for recovering it? ?or worst, need to be the same partition? ?i cant recover it on a lvm logic volume?
thx for your help.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Recovering dd > gz partition backup
[quote]
I maked a gz backup with dd from the two partitions of a raid1 with ext3, then i'am trying to recover any of it into a lvm logic vol (bigger than the original partition size).
[/quote]
Backup the md device, not the component devices.
I maked a gz backup with dd from the two partitions of a raid1 with ext3, then i'am trying to recover any of it into a lvm logic vol (bigger than the original partition size).
[/quote]
Backup the md device, not the component devices.
Re: Recovering dd > gz partition backup
Any chance of recovering it if i did it the wrong way?
i made the backup from the two fisical partitions sda and sdb.
:O(
i made the backup from the two fisical partitions sda and sdb.
:O(
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Recovering dd > gz partition backup
Not that I am aware of.
You compressed while you copied, so you can't just copy half of the backup.
If you have a big enough temp storage, you may be able to uncompress the archive, and cut it in half.
This all assumes there was a file system on the RAID device, and not a PV/VG/LV. You may not have
duplicate Logical Volume names or filesystem labels on a machine.
You compressed while you copied, so you can't just copy half of the backup.
If you have a big enough temp storage, you may be able to uncompress the archive, and cut it in half.
This all assumes there was a file system on the RAID device, and not a PV/VG/LV. You may not have
duplicate Logical Volume names or filesystem labels on a machine.
Re: Recovering dd > gz partition backup
Thank u Gerald.
Probably i dont tell my problem so well. I have 2 .gz backup files one from sda1 and the other one from sdb1, the original configuration is :
ext3
-----
md1 (raid1)
--------------
sda2 sdb2
And when i recover any of the partitions on a logical volume (bigger than the original partition, created by the LVM GUI and without any kind format), then i cant get any usefull information from mount, fsck.ext3 or mdadm system commands.
I have enougth space on the LVM for recovering the 2 partitions if its needed.
?any idea?
Thx.
Probably i dont tell my problem so well. I have 2 .gz backup files one from sda1 and the other one from sdb1, the original configuration is :
ext3
-----
md1 (raid1)
--------------
sda2 sdb2
And when i recover any of the partitions on a logical volume (bigger than the original partition, created by the LVM GUI and without any kind format), then i cant get any usefull information from mount, fsck.ext3 or mdadm system commands.
I have enougth space on the LVM for recovering the 2 partitions if its needed.
?any idea?
Thx.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Recovering dd > gz partition backup
Uncompress a copy of one of your backups, and loop mount it.
Then you can make a filesystem on your new LV and rsync the files to it
from the loop mounted filesystem.
Then you can make a filesystem on your new LV and rsync the files to it
from the loop mounted filesystem.
Re: Recovering dd > gz partition backup
Same results.
I decompresed the two images and mounted at /dev/loop3 and /dev/loop4 with losetup:
losetup -r /dev/loop3 /opt/sdc1 /opt/sdd1.gz
dd if=/dev/sdc1 | gzip > /opt/sdc1.gz
i am going to try system rescue cd live distro.
I decompresed the two images and mounted at /dev/loop3 and /dev/loop4 with losetup:
losetup -r /dev/loop3 /opt/sdc1 /opt/sdd1.gz
dd if=/dev/sdc1 | gzip > /opt/sdc1.gz
i am going to try system rescue cd live distro.
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Recovering dd > gz partition backup
[quote]i found it after a lot of arrow up pressing :O) [/quote]
The inbuilt shell command [i]history[/i] would have assisted you.
Try [b]history | more[/b] . . .
The inbuilt shell command [i]history[/i] would have assisted you.
Try [b]history | more[/b] . . .
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Recovering dd > gz partition backup
You stated before that you made the backups from sda1 and sdb1.
Now you say you made them from sdc1 and scd1.
Instead of messing around with losetup, mount them as I told you before.
use the -o loop option to mount.
I suspect you never actually backed up a real filesystem, or it was a filesystem
not supported by the standard kernel.
Now you say you made them from sdc1 and scd1.
Instead of messing around with losetup, mount them as I told you before.
use the -o loop option to mount.
I suspect you never actually backed up a real filesystem, or it was a filesystem
not supported by the standard kernel.
Re: Recovering dd > gz partition backup
Gerald.
I made this backups some months ago, maybe a year. Initialy this two drives are sda and sdb and its what iam remembering when i write the first post. Later after puting two drives more in the system these unit becomes sdc and sdd.
The first thing that i tried is to loop mount these images and it shown me the same error about the filesystem or the superblock, i dont remember now, iam at the office and the machine is at my house. But i supouse that mount -o loop == losetup + normal mount, and i told you that the image ties with the loop but dont mount and cant be recognized as ext3 partition or a raid partition.
The filesystem was created by a ubuntu 6.06 LTS 32 bits server with a 2.6.15 kernell, y supouse that this is not a problem for CentOS 5.
Thx by your time.
I made this backups some months ago, maybe a year. Initialy this two drives are sda and sdb and its what iam remembering when i write the first post. Later after puting two drives more in the system these unit becomes sdc and sdd.
The first thing that i tried is to loop mount these images and it shown me the same error about the filesystem or the superblock, i dont remember now, iam at the office and the machine is at my house. But i supouse that mount -o loop == losetup + normal mount, and i told you that the image ties with the loop but dont mount and cant be recognized as ext3 partition or a raid partition.
The filesystem was created by a ubuntu 6.06 LTS 32 bits server with a 2.6.15 kernell, y supouse that this is not a problem for CentOS 5.
Thx by your time.