Search This Blog

Sunday, June 5, 2011

Importance of mknod


mknod is a utility to make filesystem objects. In the case of LVM you might do:
mknod /dev/vgxyz/group c 64 0x030000

You can call a volume group vgxyz if you want, but you must have a file called "group" in it. This form of mknod is making a character special file. 64 is the number of the LVM driver. (lsdev can list drivers.) 0x030000 is a unique number that you must pick to identify the volume group to the kernel. To you it's the vgxyz volume group, but to the kernel, it's the 03 volume group. The group file connects /dev/xyz to the number 03. Anytime you do a vgchange or whatever, the vgchange command needs to let the kernel know what's happening and it talks to the group file to do that.

No comments:

Post a Comment