[linux-lvm] Creating PV over a /dev/mapper device

Roman Medina-Heigl Hernandez roman at rs-labs.com
Sun Nov 7 21:35:57 UTC 2004


Hi Alasdair,

First, thanks for your fast answer. I added the "device-mapper" type
but it is still not working. Example:

jupiter:~# ls -l /dev/mapper
total 0
crw-------    1 root     root      10,  63 Nov  3 23:25 control
brw-r-----    1 root     root     253,   4 Nov  7 13:00 crypt10
brw-r-----    1 root     root     253,   5 Nov  7 13:02 crypt11
brw-r-----    1 root     root     253,   6 Nov  7 13:02 crypt12
brw-r-----    1 root     root     253,   7 Nov  7 13:02 crypt13
brw-r-----    1 root     root     253,   8 Nov  7 13:03 crypt14
brw-r-----    1 root     root     253,   9 Nov  7 13:03 crypt15
brw-------    1 root     root     253,   3 Nov  5 22:14 rs-home
brw-------    1 root     root     253,   0 Nov  5 22:14 rs-root
brw-------    1 root     root     253,   1 Nov  5 22:14 rs-usr
brw-------    1 root     root     253,   2 Nov  5 22:14 rs-var
jupiter:~# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "rs" using metadata type lvm1
jupiter:~# grep crypt /etc/lvm/.cache
jupiter:~# 

So grep shows that no crypt devices were found :(. I've attached my
current lvm.conf file. Please, if you were so kind to have a look...
I've set-up lvm1 mode ('cause I read that it is more stable than lvm2)
but I also did some tests with lvm2 and vgscan didn't detect my crypt
(=mapper) devices either. I've also set up a strict filter (although
I've also tried with less-restrictive ones with no success).

 Saludos,
 --Roman

--
PGP Fingerprint:
09BB EFCD 21ED 4E79 25FB  29E1 E47F 8A7D EAD5 6742
[Key ID: 0xEAD56742. Available at KeyServ]

On Sun, 7 Nov 2004 19:24:50 +0000, you wrote:

>On Sun, Nov 07, 2004 at 03:01:10PM +0100, Roman Medina-Heigl Hernandez wrote:
>> When trying to create PV, I got the following error:
>> jupiter:/# pvcreate /dev/mapper/crypt10
>>   /dev/mapper/crypt10: Couldn't find device.
> 
>By default LVM2 won't let you turn mapped devices into PVs,
>or if you're not careful you could get things horribly tangled up.
>(e.g. create pv2 on lv1 in vg1, then add pv2 to vg1...)
>
>> I know how to temporaly fix the problem by adding the device to
>> /etc/lvm/.cache. 
>Don't edit that file: the tools are free to regenerate it whenever
>they wish.
>
>> filter = [ "a|/dev/mapper/crypt.*|" ]
>> scan = [ "/dev/mapper" "/dev" ]
> 
>As long as you understand how to avoid recursion like the example
>above, you can edit the 'types =' line to include "device-mapper".
>[The 16 or whatever after it is for historic reasons - nothing 
>currently uses it.]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm.conf
Type: application/octet-stream
Size: 10279 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20041107/7c2a0eb0/attachment.obj>


More information about the linux-lvm mailing list