Brian J. Murrell wrote:
>
> Notice the errors from mknod(2) near the bottom.
...
> 7447 mknod("/dev/VG/group", S_IFCHR|0640, makedev(109, 0)) = -1 ENOENT (No such
>file or directory)
...
>
> Why does trying to create nodes on the devfs filesystem return errors?
> I don't know much about devfs[d].
>
The actual question is, why it tries to mknod at all. Consider lvm.c and
lvm-fs.c in -12 source tree:
lvm.c:
lvm_chr_ioctl()
case VG_CREATE:
/* create a VGDA, assume VG number is filled in */
return lvm_do_vg_create(-1, arg);
lvm_do_vg_create():
/* create devfs and procfs entries */
lvm_fs_create_vg(vg_ptr);
and lvm-fs.c:
lvm_fs_create():
vg_devfs_handle[vg_ptr->vg_number] =
devfs_mk_dir(0, vg_ptr->vg_name, NULL);
ch_devfs_handle[vg_ptr->vg_number] = devfs_register(
vg_devfs_handle[vg_ptr->vg_number] , "group",
DEVFS_FL_DEFAULT, LVM_CHAR_MAJOR, vg_ptr->vg_number,
S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
&lvm_chr_fops, NULL);
i.e. creating group automatically creates /dev entries.
I understand that vgscan tries to make sure all needed specials are
there. But it is not needed in case of devfs, when all device entries
are created automatically.
vgscan should check for mounted devfs and refrain from creating /dev
entries.
-andrej