Re: How to use LVM on a file? (as opposed to on a block device)

2010-03-03 Thread Mark Allums

On 3/3/2010 1:50 PM, Alexander Samad wrote:

On Thu, Mar 4, 2010 at 6:29 AM, Clive McBarton  wrote:


I have a file which is a dump of a disk partition. It has LVM on it and
a couple of LVs in the LVM, each containing a filesystem. How do I
access them? The lvm tools like lvdisplay, vgdisplay, lvs, lvscan,
lvdiskscan expect block devices and do not have the option of using a
file instead of /dev/something. I'd like to use the LVM on the file
without writing it out as a real disk partion. How do I do that?


I would guess you could look in /etc/lvm/lvm.conf  - it defines where
it looks for pv



If your kernel is recent enough, look to the device mapper.  A file can 
be mounted.  We do it regularly with ISOs.  Loopback is harder with LVM 
involved, but it's the same principle.  The usual application, these 
days, is for encryption.


Mark Allums


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4b8eccd5.3040...@allums.com



Re: How to use LVM on a file? (as opposed to on a block device)

2010-03-03 Thread Olaf Reitmaier Veracierta

On 03/03/10 14:59, Clive McBarton wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I have a file which is a dump of a disk partition. It has LVM on it and
a couple of LVs in the LVM, each containing a filesystem. How do I
access them? The lvm tools like lvdisplay, vgdisplay, lvs, lvscan,
lvdiskscan expect block devices and do not have the option of using a
file instead of /dev/something. I'd like to use the LVM on the file
without writing it out as a real disk partion. How do I do that?
   

Here you are...

http://forums.fedoraforum.org/showthread.php?t=211093


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuOuH0ACgkQ+VSRxYk4408yOACg6Pu2Md50e0BH77aB04oiGyuC
PEwAoOzQZs/4x9Z2rRlUVrDSifGLn0fP
=fzWE
-END PGP SIGNATURE-


   


--
-
   "You don't know where your shadow will fall",
Somebody.-
-
 Ing. Olaf Reitmaier Veracierta
-
 Personal Web Page -- http://olafrv.com -- i...@olafrv.com
-


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4b8ec2a1.1070...@gmail.com



Re: How to use LVM on a file? (as opposed to on a block device)

2010-03-03 Thread Boyd Stephen Smith Jr.
On Wednesday 03 March 2010 13:29:01 Clive McBarton wrote:
> The lvm tools like lvdisplay, vgdisplay, lvs, lvscan,
> lvdiskscan expect block devices and do not have the option of using a
> file instead of /dev/something. I'd like to use the LVM on the file
> without writing it out as a real disk partion. How do I do that?

losetup allows you do treat any file as a block device.

/etc/lvm/lvm.conf may need to be modified to pay attention to loop devices 
(the type created by losetup).
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.


Re: How to use LVM on a file? (as opposed to on a block device)

2010-03-03 Thread Alexander Samad
On Thu, Mar 4, 2010 at 6:29 AM, Clive McBarton  wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I have a file which is a dump of a disk partition. It has LVM on it and
> a couple of LVs in the LVM, each containing a filesystem. How do I
> access them? The lvm tools like lvdisplay, vgdisplay, lvs, lvscan,
> lvdiskscan expect block devices and do not have the option of using a
> file instead of /dev/something. I'd like to use the LVM on the file
> without writing it out as a real disk partion. How do I do that?

I would guess you could look in /etc/lvm/lvm.conf  - it defines where
it looks for pv

>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkuOuH0ACgkQ+VSRxYk4408yOACg6Pu2Md50e0BH77aB04oiGyuC
> PEwAoOzQZs/4x9Z2rRlUVrDSifGLn0fP
> =fzWE
> -END PGP SIGNATURE-
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: http://lists.debian.org/4b8eb87d.1050...@web.de
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/836a6dcf1003031150h448c060bi84c8644ea837c...@mail.gmail.com



How to use LVM on a file? (as opposed to on a block device)

2010-03-03 Thread Clive McBarton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I have a file which is a dump of a disk partition. It has LVM on it and
a couple of LVs in the LVM, each containing a filesystem. How do I
access them? The lvm tools like lvdisplay, vgdisplay, lvs, lvscan,
lvdiskscan expect block devices and do not have the option of using a
file instead of /dev/something. I'd like to use the LVM on the file
without writing it out as a real disk partion. How do I do that?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuOuH0ACgkQ+VSRxYk4408yOACg6Pu2Md50e0BH77aB04oiGyuC
PEwAoOzQZs/4x9Z2rRlUVrDSifGLn0fP
=fzWE
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4b8eb87d.1050...@web.de