[linux-lvm] loop devices?

Mika Lansirinne Mika.Lansirinne at ecdl.hut.fi
Wed Dec 12 13:51:02 UTC 2001


Harri Haataja wrote:
> On Wed, Dec 12, 2001 at 06:16:31PM +0200, Mika Lansirinne wrote:
> > I was trying to use a loop device(s) for LVM. In the pvcreate man-page it 
is 
> > said that a PV can also be a loopback file. That also seem to work 
correct. 
> > But when I try to create a VG on that I get:
> > 
> > [root at arthur /tmp]# vgcreate tmpvg /dev/loop0
> > vgcreate -- no valid physical volumes in command line
> 
> I didnt bother to look deep into those messages but first though that
> came into my mind is that you didn't mention losetup. You did this?

Sorry, probably should have mentioned that to be complete. I indeed did use 
losetup first. (And I can create filesystem to that and can mount that. No 
problem with the loop device itself).

These are the steps I have done:
dd if=/dev/zero of=lvm-file bs=1M count=XX
losetup /dev/loop0 lvm-file
pvcreate /dev/loop0
=> pvcreate -- physical volume "/dev/loop0" successfully created
vgcreate tmpvg /dev/loop0
=> vgcreate -- no valid physical volumes in command line


-Mika

-- 
Mika Länsirinne, System Manager / Research Engineer, M.Sc. (E.E.)
Helsinki University of Technology
Electronic Circuit Design Laboratory
P.O. Box 3000				Email: mla at ecdl.hut.fi
FIN-02015 HUT				Tel: +358 9 451 2277
Finland					Fax: +358 9 451 2269





More information about the linux-lvm mailing list