Restore LVM disk from image, made by dd
I hav LVM:
Code:
#lvs Code:
dd if=/dev/mapper/VolGroup01-LogVol00 bs=64K | gzip -c | > /mnt/usb/backup.img.gz Code:
gunzip -c /mnt/usb/mapper_VolGroup01-LogVol00.img.gz | dd of=/dev/mapper/VolGroup01-LogVol00 conv=sync,noerror bs=64K Code:
# mount /dev/mapper/VolGroup01-LogVol00 /mnt-user/00/ |
Did you find anything useful in syslog or check dmesg output as suggested when the mount failed?
When I tried this and checked dmesg output it reports: EXT3-fs: no journal found. (You did not specify what filesystem was on your .img.gz so I went with ext3.) Edit 1: UPDATE: FAILURE: Code:
dd if=/dev/VolGroup01/LogVol00 bs=64K | gzip -c > /mnt/usb/backup.img.gz Code:
dd if=/dev/VolGroup01/LogVol00 bs=64K | gzip -c > /mnt/usb/backup.img.gz Edit 2: OK, the bs=64K seems to be what is breaking it for me. When I use bs=512, while it takes substantially longer, I do not get 'No space left on device' and I am able to successfully mount the filesystem on it. |
That looks suspiciously like you are over-writing a lv on a running system ... :eek:
I'm thinking you'll need to rescan those (LVM) devices - search here on LQ for pvscan and vgscan (and vgchange). |
Try this first:
Code:
gunzip -c /mnt/usb/mapper_VolGroup01-LogVol00.img.gz | dd of=/dev/mapper/VolGroup01-LogVol00 conv=sync,noerror bs=512 |
A have a lot of place for decompress images on /mnt/usb. The problem should be in dd-ing worked system drive. I have to made a snapshot if i want to backup without freezing my server, but i did not.
|
All times are GMT -5. The time now is 11:45 AM. |