Consider the scenario, where you have a filesystem called "/myfile" which was mounted onto a logical volume called "/dev/vg00/lvol1" that belongs to the volume group "vg00".
In this case. Every file and directory created in UNIX environement will have unique "i-node" value. But there are cases for directories to have the same "i-node" value.
So, is there any chance of a "Single" directory to hold two different "i-node" values.
Let me explain what is "i-node" ?
I-node is a pointer variable which holds address and other other attributes of an object. Where the object is referred to an file or directory.
So I-node is composed of ( File/Directory creation time, modified time, access time, its metadata, owner of the object, group of the object, permissions, location of the file/directory on the disk).
Now I am asked to craete a file sytem. First I would intialize the phyical volume.
# pvcreate /dev/rdsk/c0t0d1
Now I create volume group and logical volume.
# vgcreate myvolume /dev/dsk/c0t0d1
# lvcreate -L 512M -n mylogical myvolume
Now the logcial volume is created. Next I go ahead to format the logical volume.
# newfs -F vxfs /dev/myvolume/rmylogical
Now I create a mount point i.e., a directory.
# mkdir /myfile : This makes the OS to allocate an i-node to this directory.
# cd /
# ls -il | grep -i myfile : Now obtain the i-node of the created directory. It shows a value of "1234".
Now I proceed in mounting the file system.
# mount /dev/myvolume/mylogical /myfile
# bdf : Verify the filesytem is mounted and # cd /myfile confims "lost+found" as well.
Now I am trying to get the i-node of the same directory "/myfile" which is now acting as mounting point.
# cd /
# ls -il | grep myfile : Now it shows a different value. The value is the inode value of the "root" filesystem.
So when the same filesystem is unmounted.
# umount /myfile
Now if you try to get the "i-node" value of the directory "/myfile" it will show "1234".
In this case. Every file and directory created in UNIX environement will have unique "i-node" value. But there are cases for directories to have the same "i-node" value.
So, is there any chance of a "Single" directory to hold two different "i-node" values.
Let me explain what is "i-node" ?
I-node is a pointer variable which holds address and other other attributes of an object. Where the object is referred to an file or directory.
So I-node is composed of ( File/Directory creation time, modified time, access time, its metadata, owner of the object, group of the object, permissions, location of the file/directory on the disk).
Now I am asked to craete a file sytem. First I would intialize the phyical volume.
# pvcreate /dev/rdsk/c0t0d1
Now I create volume group and logical volume.
# vgcreate myvolume /dev/dsk/c0t0d1
# lvcreate -L 512M -n mylogical myvolume
Now the logcial volume is created. Next I go ahead to format the logical volume.
# newfs -F vxfs /dev/myvolume/rmylogical
Now I create a mount point i.e., a directory.
# mkdir /myfile : This makes the OS to allocate an i-node to this directory.
# cd /
# ls -il | grep -i myfile : Now obtain the i-node of the created directory. It shows a value of "1234".
Now I proceed in mounting the file system.
# mount /dev/myvolume/mylogical /myfile
# bdf : Verify the filesytem is mounted and # cd /myfile confims "lost+found" as well.
Now I am trying to get the i-node of the same directory "/myfile" which is now acting as mounting point.
# cd /
# ls -il | grep myfile : Now it shows a different value. The value is the inode value of the "root" filesystem.
So when the same filesystem is unmounted.
# umount /myfile
Now if you try to get the "i-node" value of the directory "/myfile" it will show "1234".