question about LVM with a DD image from full disk?
I made a full disk backup using dd earlier today on an Ubuntu LTS 14.04 system running a LVM partition.
I am able to mount the .img file and see the /boot but im unable to get to the LVM, then when I attempt the following: Code:
[root@jackknife ~]# fdisk -lu /exports/backup/BOAT/BOAT.img Code:
[root@jackknife ~]# mount -o loop,offset=1048576 /exports/backup/BOAT/BOAT.img /mnt/old/ |
You can only mount filesystems, not (block) devices. Attempting to mount the "LVM Member" is akin to trying to mount /dev/sda (when /dev/sda has partitions).
I imagine vgscan should find your vg(s) - then you'd have to activate it/them with vgchange then mount them. Remember to reverse it all when finished. Another reason to add to my long list of not advocating image backups. |
Since your image will contain an LVM structure identical to the one you copied it from, you cannot have both the original and the copy connected to the system at the same time. They have the same VG and LV names, and the same PV, VG, and LV UUIDs. When accessing an LV, the system will randomly select one or the other. With the system already up and running, connecting the other disk won't cause confusion; you just won't be able to access it. Should you be so unfortunate as to boot with both copies connected, you would need to run "pvs" to see which physical volumes were actually in use.
|
after mounting as the successful way in the first post, neither vgscan or pvscan detect the LVM on the .img mounted system.
no the LCM structure is not identical as it is not from the live system, it is from an external HDD, has nothing to do with it. |
Instead of using offset with loop device you can with recent util-inux create multiple block devices for each partition and then mount fs or use for other purposes.
See this link. |
As stated you can not mount a volume group image the same way as you mount a regular partition image. Check out the links before. Your setting up the loop device to the LVM partition then mounting the volume group.
http://www.utilities-online.info/art.../#.VWHedGGQlpU http://forensicswiki.org/wiki/Linux_..._from_an_image |
Quote:
Your original post showed no output from the "kpartx -av /exports/backup/BOAT/BOAT.img" command. With that "-v" option, I would expect to see output like Code:
add map loop0p1 (253:3): 0 6848224 linear /dev/loop0 32 |
Quote:
Code:
[root@jackknife ~]# kpartx -av /exports/backup/BOAT/BOAT.img |
so im doing something horridly wrong:
Code:
[root@jackknife ~]# mount /dev/mapper/loop1p5 /mnt/home/ FYI, my system is CentOS v7, yes it an Ubuntu system I'm attempting to gain access to. I know the Ubuntu does some strange stuff with their LVM's is that the problem? |
nm, im a total idiot. i was mounting the wrong LVM on the .img:
Code:
[root@jackknife ~]# lvmdiskscan /mnt/old/ |
All times are GMT -5. The time now is 10:00 PM. |