[Ocfs2-devel] [BUG] strange behavior with mknod on ocfs2

Rusty Lynch rusty at linux.co.intel.com
Wed Mar 24 20:05:42 CST 2004


I just created a new bug in bugzilla for some wacky bahavior around mknod.

The following is cut out of the bug report at ==>
http://oss.oracle.com/bugzilla/show_bug.cgi?id=52

On a 2.4 build, creating devices with mknod will result in the in-memory major
and minor numbers not matching the on-disk major and minor numbers (untill the
filesystem is remounted.)

For example:
[root at penguin nodetest2]# mknod somenode b 1 1
[root at penguin nodetest2]# ls -l somenode
brw-r--r--    1 root     root      11,   0 Mar 24 19:47 somenode
[root at penguin nodetest2]# cd /
[root at penguin /]# umount /oracle
[root at penguin /]# mount -t ocfs2 /dev/sda1 /oracle
[root at penguin /]# cd -
/oracle/nodetest2
[root at penguin nodetest2]# ls -l somenode
brw-r--r--    1 root     root       1,   1 Mar 24 19:47 somenode
[root at penguin nodetest2]#

On a 2.6 kernel I see a slightly different bahavior, where aa ls(1) of any 
device file will show a major of 8 and a minor of 17, regardless of what 
is on disk.

>From a 2.6 system...

[root at nobody nodetest2]# mknod somenode b 1 1
[root at nobody nodetest2]# ls -l somenode
brw-r--r--    1 root     root       8,  17 Mar 24 19:52 somenode
[root at nobody nodetest2]# cd /
[root at nobody /]# umount /oracle/
[root at nobody /]# mount -t ocfs2 /dev/sdb1 /oracle
[root at nobody /]# cd -
/oracle/nodetest2
[root at nobody nodetest2]# ls -l somenode
brw-r--r--    1 root     root       8,  17 Mar 24 19:52 somenode
[root at nobody nodetest2]# mknod somenode c 122 99992
[root at nobody nodetest2]# ls -l somenode
crw-r--r--    1 root     root       8,  17 Mar 24 19:55 somenode

If I mount the volume from a 2.4 build, then I see the correct 
major and minor numbers, so the device info is correct on disk.


More information about the Ocfs2-devel mailing list