On 11/10/05, Jon Nelson <[EMAIL PROTECTED]> wrote: > On Thu, 10 Nov 2005, Yu Safin wrote: > > > On 11/10/05, Kyek, Andreas, VF-DE <[EMAIL PROTECTED]> wrote: > > > Yu Safin wrote: > > > > I have a problem doing a restore of an LVM. > > > > I have an LVM with one Logical Volume and three disks (physical) > > > > mounted on /original. > > > > I did a backup of the three disks (dd) and now I need to > > > > restore but instead > > > > of restoring to the original LVM mount point (/original), I want to > > > > restore to a new mount point (/backup). > > > > > > > > > ??? > > > a dd Backup/Restore works on _physical_ devices (HDs, partitions, etc). > > > It does not work on logical stuff like "mountpoints". > > OK, I understand this. > > > > > > Just Restore your three disks with dd > > which is what I did but to different 3 disk. However, I don't want to > > restore to the /original mount point, I am trying to keep my existing > > /original and restore to a new /restore location (on the new 3 disks). > > > Then try to rescan your volume group. > > > If your LV can be found, mount it whereever you want. > > For some reason when I go through the pvcreate, vgcreate, lvcreate, > > lvdisplay everything is fine. Then I do a "mkdir /restore" and when I > > follow it with the mount, it complains that I have to do a "mke2fs -j > > /---new---LVM". But if I do that, then the mount works but the data > > from my original LVM is not there. > > I have done a few restores trying to figure out how to get around this > > problem. > > My restores take about 3 hours. > > Why don't you try this: > > This requires that you have the dd'd file available locally. > mount -o loop,ro -t filesystem_type ./file_from_dd /temporary_mount_point > > If that works, then: > using lvcreate and mkfs.whatever, make a filesystem large enough to hold > all of the files. Mount it under /new_mount_point. > > cd /temporary_mount_point > rsync -av . /new_mount_point > > umount /temporary_mount_point > > An alternative (and this is *dangerous*): > > use lvcreate to make a new logical volume *at least* as large as the > file_from_dd. Then > > dd if=file_from_dd of=/path/to/logical_volume bs=4K sync > > By /path/to/logical_volume: > > If your volume group is named "jbod" and you created a logical volume > named "fish", the path would be /dev/jbod/fish > > Lastly: > never use dd to back anything up again. Back up files, not block > devices. Very good advise but it was the only backup I had. The file backup got damaged somehow and thanks god I had the disk backups. Unfortunately I needed to re-use my /LVM for an application so I created a new one. Now I am trying to go to my backup to restore what I had before my incident. The restore to the new disks works fine. When I do a "pvdisplay -new-volumes" it shows my LVM on the volumes. When I do a pvscan it does not find it. I followed your first advise but the mount -o loop shows nothing inside the file. When I followed the second advise I can't find /dev/jbod/fish. > > -- > Carpe diem - Seize the day. > Carp in denim - There's a fish in my pants! > > Jon Nelson <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
