[linux-lvm] LVM with devfs questions and patches

Patrick Caulfield caulfield at sistina.com
Tue Feb 13 16:09:22 UTC 2001


On Mon, Feb 12, 2001 at 08:52:29PM +0100, Benoit Gaussen wrote:
> Hi,
> 
> I'm running LVM 0.9.1_beta2 from kernel 2.4.1 with devfs and I had some little
> troubles, all related to /dev entries and devfs registration :
> 
> - another trouble I had, and I saw some people here had the same, is the
>   'devfs_register(): device already registered: "group"' message while doing
>   vgchange.
>   I did not find an=y answer about the cause of it. So I looked at the code
>   of vgchange and discovered that the /dev/vg0 and /dev/vg0/group are created
>   by mkdir and mknod (in the function vg_create_dir_and_group() ).
>   So when the kernel code tries to register the group device, the devfs code
>   finds it, since it was already registered by doing the mknod.
>   I understand the group device must exist since the VG_CREATE ioctl uses its
>   minor to select the VG to create. But since the minor is based on
>   vg->vg_number, and the vg structure is passed as argument to the VG_CREATE
>   ioctl, why not using vg->vg_number to select the VG ?
>   So we could open /dev/lvm to do the VG_CREATE ioctl instead of using
>   /dev/vg0/group ?  
> 

Thanks for those, I've reworked them a little but the effect should be the same.

patrick




More information about the linux-lvm mailing list