On Tue 10 Apr 2012 16:29:47 NZST +1200, Christopher Sawtell wrote:

> I have done a dd copy of the partitions but find to my dismay that I cannot
> mount the resultant image file using the mount command. It complains about
> the LVM file image being an unknown format type.

You will have to use the LVM tools to make the content of that visible.
Start with using losetup to turn the file into a device, the scan the
device for LVM groups of the various kinds.

The LVM howto of TLDP is indeed both outdated and not much informative.
There are some good illustration pictures here:
http://linuxconfig.org/Linux_lvm_-_Logical_Volume_Manager

And this essay rocks:
http://www.howtoforge.com/linux_lvm

You'll probably want the commands
  pvscan
  pvdisplay
  vgscan
  vgdisplay
  vgchange -a y
  lvdisplay

All the mappings show up in /dev/mapper/ once active, from where you can
copy away.

You probably would have done better to dd the content of the mappings
(logical volumes) to a safe place, rather than the content of the LVM
partition, which might not even be used completely by those LVs. Or to
save more space, back up the files in the first place.

> I have searched far and wide for help, but the necessary incantation must
> reserved for the uber guru cognoscenti, or the mounting a LVM disk image
> file is simply not possible.

Not much guru needed with the right writeup, and correct, an LVM block
copy is not mountable. Once you read a bit of the documentation it
quickly becomes obvious why.

Saying that LVM is evil is not helpful. It serves a specific purpose, if
it doesn't do anything for you, don't use it. Blanket statements like
"lose one disk, lose the lot" are not even always true, though I supose
they are true if you only have one disk...

I find LVM quite useful on a laptop with only one disk. Encrypt the disk
first, then use LVM to create multiple filesystems which can be resized
almost arbitrarily later. There's still only one encryption container to
deal with.

To be sure, I am talking bout LVM2 here. Just forget about LVM 1, and
dunno what the last kernel was running that.

Volker

-- 
Volker Kuhlmann
http://volker.dnsalias.net/     Please do not CC list postings to me.
_______________________________________________
Linux-users mailing list
Linux-users@lists.canterbury.ac.nz
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users

Reply via email to