AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Mounting of Nested Filesystem

    Posted Fri November 20, 2009 03:58 AM

    Originally posted by: MK8570


    Could anyone explain what happens when filesystems are mounted out of order ? For E.g

    /dev/fslv01 mount point /a
    /dev/fslv02 mount point /a/b
    /dev/fslv03 mount point /a/b/c

    And FS are mounted in the reverse order /a/b/c then /a/b then /a

    Trying to undertsand how the mounting FS works .


  • 2.  Re: Mounting of Nested Filesystem

    Posted Fri November 20, 2009 08:08 AM

    Originally posted by: nh4aix


    You won't like the results.. and that is assuming you can mount in the reverse order....
    first of, you have to have the subdirectory structure in root of /a/b/c to be able to mount your /a/b/c filesystem...

    Then when you mount /a/b, its ./c directory will overlay the ./c subdirectory of the /a/b/c filesystem,

    finally, when you mount /a, its /a/b directorg will overlay the /a/b subdirectory of the /a/b filesystem...

    Hope that helps..
    joe


  • 3.  Re: Mounting of Nested Filesystem

    Posted Fri November 20, 2009 03:07 PM

    Originally posted by: orphy


    nh4aix is correct. Essentially, each filesystem has its own meta data and data blocks for storage. When you mount a FS on top of another, you are dealing with the meta area and the data blocks of the top FS. The bottom FS is basically masked out and you won't be changing it.

    Think about a layered cake. If you put all three layers on top of each other, when you put some blueberry topping on, only the top layer has it and the bottom two layers will never see the blueberry! If you want each layer to get blueberry, you'll have to have three (3) 1-layer cake. Hmmm... That made me hungry...
    Orphy


  • 4.  Re: Mounting of Nested Filesystem

    Posted Fri November 20, 2009 09:25 PM

    Originally posted by: MK8570


    Sorry still not clear.

    When I mount /dev/fslv03, fs will available at /a/b/c.
    when i mount /dev/fslv02 , fs will be avilable at /a/b . Why should it affect sub-directory c ?


  • 5.  Re: Mounting of Nested Filesystem

    Posted Sat November 21, 2009 12:36 AM

    Originally posted by: j.gann


    you know trees, right?
    if you sit on branch c and cut off (i.e. overmount) branch b, will you still be sitting?

    why not experiment for 10 minutes? should give you a clue.


  • 6.  Re: Mounting of Nested Filesystem

    Posted Mon November 23, 2009 08:34 AM

    Originally posted by: nh4aix


    MK -

    I am sorry this isn't clear. I try again and stick with your example:

    You mount /dev/fslv03, fs will available at /a/b/c. No problem.
    When you mount /dev/fslv02 , fs will be avilable at /a/b. However, what is the status of the /dev/fslv03 filesystems mounted at /a/b/c? It will be overmounted with whatever in in /a/b/c in /dev/fslv02.

    Another poster made a suggestion... try it... For example:

    Put two files (123 and 456) in /a/b/c on /dev/fslv03.
    Put two other files (abc and xyz) in /a/b/c on /dev/fslv02.
    Then do what you suggest:

    Mount /dev/fslv03; fs will be available at /a/b/c and the contents of /a/b/c (ls /a/b/c) will be "123" and "456".
    Now, mount /dev/fslv02; fs will be available at /a/b and the contents of /a/b/c will be "abc" and "xyz".
    The files "123" and "456" are unavailable because the pointer to the /a/b/c directory is following the inode in the /dev/fslv02 filesystem.

    Try it... seeing it may help..

    Not sure I can explain it much better in this medium... Another suggestion is to call IBM support.. they may be able to provide a better explanation over the phone...

    Good luck..