AIX

AIX

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


#Power
 View Only
  • 1.  File system and LV

    Posted Thu September 13, 2007 02:39 PM

    Originally posted by: SystemAdmin


    Hi,

    I know this a stupid question but I have to ask....
    What is the difference between the file system and a Logical volume? the reason I am asking is :

    When I ls /dev , it gives me the list of the file system on my machine. lets say:

    > ls /dev

    Filesystem 512-blocks Free %Used Iused %Iused Mounted on
    /dev/hd4 1015808 921664 10% 2479 3% /
    /dev/hd2 15040512 7739128 49% 73572 8% /usr
    /dev/hd3 1638400 1228400 26% 1258 1% /tmp
    /dev/hd1 2228224 1437976 36% 885 1% /home
    and when I do lslv on hd4, hd2 or any of the above file systems I also get results. Does it mean these are file systems AND logical volume?
    (I have read the IBM read book about this but still I am not clear.)

    Thanks
    #AIX-Forum


  • 2.  Re: File system and LV

    Posted Thu September 13, 2007 03:22 PM

    Originally posted by: orphy


    Are you sure you get that result from "ls /dev"? I think you got it
    from "df -k" rather. "ls /dev" would give you a total different listing.

    LV and FS are two different things. An LV doesn't always have a FS but
    a FS must have a LV. An LV is nothing more than a chunk of disk space
    craved out of one or more disks from a VG. Some applications (mostly
    databases) could deal with this type of chunk call raw LV. However, if you
    want to be able to create files and directories on the disk space, you'll
    need to create a filesystem (FS) on top of the LV. In the AIX world, we
    use either JFS or JFS2.

    http://en.wikipedia.org/wiki/IBM_Journaled_File_System_2_%28JFS2%29

    When you do "lslv <LV>", you are listing the properties of <LV> and, if
    <LV> has a FS associated with it, lslv also shows you what that FS is
    (MOUNT POINT). To get more info about the associated FS, you would
    use lsfs. To see if an LV has a FS associated with it, look at the
    value of "MOUNT POINT" from "lslv hd5". If it doesn't, you would see
    "N/A" rather than the actual mount point as the value.

    The is a 2 cents summary and I hope it helps.
    Orphy
    #AIX-Forum


  • 3.  Re: File system and LV

    Posted Wed September 26, 2007 01:39 AM

    Originally posted by: SystemAdmin


    LV-Logical volume.
    PV-Physical Volume.
    FS-Filesystem

    Initially disk is devided into pieces we call it as PV in AIX ..
    Ex: I have 2X10GB disks and i am planning to split the disk in 128MB pieces.

    Disk1

    PP1 PP2 PP3 ..........................................PPn

    128MB 128MB 128 MB ......... 128MB 128MB 128MB


    <---------------------------10GB------------------------------------------->

    Disk2
    PP1 PP2 PP3 ..........................................PPn
    128MB 128MB 128 MB ......... 128MB 128MB 128MB


    <---------------------------10GB------------------------------------------->

    If you want to create an LV of 5GB you can create that using the PPs in Disk1 and Disk2. I mean from Disk1 (PP1..n)+Disk2(PP1...n) here n may be vary depends on the size of each PV. this is not always in this way . if you have only one disk it will create there itself with the available PVs.

    its a RAW volume. here you don't have option to create files using Unix OS. for that you have to create a Filesystem ( Unix kernel will do read and write opreations As per filessystem design ). here using the " LV " you have to create the FS.

    This is the below process for the above

    Disks(PV)---> VG(we will mention No. of PPs)----> (group the PPs and call it as LV)----> Create the Filesystem...

    I think it will more clear
    #AIX-Forum


  • 4.  Re: File system and LV

    Posted Fri September 14, 2007 10:22 AM

    Originally posted by: SystemAdmin


    Thanks...One more question...if there is no mount point for a LV, does it mean that LV is not in used or usable?
    (What is the point of having LV when there is not any file system associate with it? Can you give me an example plz)
    #AIX-Forum


  • 5.  Re: File system and LV

    Posted Fri September 14, 2007 11:20 AM

    Originally posted by: orphy


    If you don't see a mount point for a LV, normally it's not usable as
    a FS; however, lslv will only display what it could find. Depending on
    what was done to the LV prior, it might still be used as a FS.

    The point of using raw LVs is typically for performance reason. The more
    layers an application has to go through, the more codes get executed before
    things are done. Thus, some performance sensitive applications would
    opt to use raw LVs. However, the perf gap has been narrowed nowadays and
    there are management issues with raw LVs as well.

    This is a different matter to explore if you are interested in it. Many
    discussions regarding this is available out there.
    Orphy
    #AIX-Forum