[colug-432] Mounting Arbitrary Byte-Pools (File, Block Device, LVM partition, etc.)

Joshua Kramer joskra42.list at gmail.com
Tue Mar 13 21:25:33 EDT 2012


In my research on related to my previous question about "un-lvm-ifying" a
partition, I found these interesting articles.

1. Mount a disk image that exists as a file; in this case, a XEN xvda
device.  We assume that, like a real disk, this file contains a partition
table.

http://www.magicspace.eu/linux/direct-mount-xvda-devices-or-multi-partition-isos/

2. Take a disk image that exists as a file and contains LVM partitions,
activate the LVM partitions, and mount them accordingly:

http://www.thegibson.org/blog/archives/467

In my case, I found sufficient storage elsewhere, to copy my 476MB LVM
partition into a file.  Then, I reformatted the 500G disk with one ext3
partition.  Using the second article I mounted the "LVM-on-a-file" and
copied all of my stuff back to the 500G disk.

Among this data, was a xvda file for my old mailserver.  This file
contained two partitions, one being an LVM.  I was able to setup the
LVM-containing partition as a loopback device, run _lvm pvscan_ and then
_lvm vgchange -ay_, and then mount the resulting volumes to copy over all
the data contained within.  (The second article explains how to do this.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20120313/c9743edc/attachment.html 


More information about the colug-432 mailing list