Re: ??: Disks used by LV

From: Kumar, Praveen (cahoot) (Praveen.Kumar_at_CAHOOT.COM)
Date: 07/22/04

  • Next message: Green, Simon: "Re: ??: Disks used by LV"
    Date:         Thu, 22 Jul 2004 12:49:39 +0100
    To: aix-l@Princeton.EDU
    
    

    Thanks simon. Yes as you said we can even do that way. Instead of doing two
    chfs we can do two extendlv and then run the given script.

    Also thanks to all of you who have given time to think on this issue.

    Praveen.K

    -----Original Message-----
    From: Green, Simon [mailto:Simon.Green@EU.ALTRIA.COM]
    Sent: 22 July 2004 12:09
    To: aix-l@Princeton.EDU
    Subject: Re: ??: Disks used by LV

    You might just as well do the "extendlv" for the full amount - remaining
    space on hdisk1, plus what you need on hdisk2 - then do a single chfs for
    the full amount.
    You might find this trivial script handy:

    #!/bin/ksh
    #
    # Increase the size of a filesystem to that of its logical volume.
    #
    Filesystem=$1
    lsfs -q $Filesystem |tail -1|awk {'print $3 $6'} | tr ',' ' ' |read LV_Size
    FS_Size
    if [ $LV_Size -ne $FS_Size ]
    then
     chfs -a size=$LV_Size $Filesystem
    else
     echo Filesystem already uses all of Logical Volume.
    fi

    Do the extendlv, then just run the script. Saves you having to worry about
    the number of blocks.

    If you're going to do a lot of this sort of thing, I would recommend you
    change your intra-disk allocation policy from the default of "outer-middle"
    to "outer-edge". This helps keep the LV contiguous, which can aid
    performance and may make future maintenance easier.

    --
    Simon Green
    Altria ITSC Europe Ltd
    AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html
    <https://new-lists.princeton.edu/listserv/aix-l.html>
    New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX
    <http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX>
    N.B. Unsolicited email from vendors will not be appreciated.
    Please post all follow-ups to the list.
    -----Original Message-----
    From: Kumar, Praveen (cahoot) [mailto:Praveen.Kumar@CAHOOT.COM]
    Sent: 21 July 2004 15:59
    To: aix-l@Princeton.EDU
    Subject: Re: ??: Disks used by LV
    Hi Holger,
    Since it is possible with extendlv, let me know if these steps are correct.
    In fact I have tried increasing the LV and then increase the FS which was
    through.But this machine had only one disk.
    Data
    fs01 current size     5GB
    hdisk1 size             18GB
    Proposed fs01 size 20GB
    Preferable disk for 2GB extra space is hdisk2
    PP Size                 32MB
    What I would do is
    *       chfs -a size=+27262976   // (13*1024*2048) I Increase the file
    system fs01 by 13GB using chfs which would use the free space on hdisk1. Now
    the size of the file system is 18GB
    *       extendlv lv_fs01 64 hdisk2   // 64*32=2048MB=2GB
    *       chfs -a size=+4194304  // Increase the file system fs01 by adding
    4194304 (2*1024*2048) to the existing value.
    With the above steps I should have allocated the disk space of 2GB from my
    desired disk(hdisk2).
    Pl correct me if I am wrong.
    .sophos.3.83.07.21.
    *********************
    Internet communications are not necessarily secure and may be intercepted or
    changed after they are sent.  cahoot does not accept liability for any such
    changes.
    If you wish to confirm the origin or content of this communication, please
    contact the sender using an alternative means of communication.
    This communication does not create or modify any contract.
    This email may contain confidential information intended solely for use by
    the addressee.  If you are not the intended recipient of this communication
    you should destroy it without copying, disclosing or otherwise using its
    contents.
    Please notify the sender immediately of the error.
    cahoot is a division of Abbey National plc.
    Abbey National plc is registered in England, registered number 2294747.
    Registered Office: Abbey National House, 2 Triton Square, Regent's Place,
    London, NW1 3AN.
    

  • Next message: Green, Simon: "Re: ??: Disks used by LV"

    Relevant Pages

    • Re: Disks used by LV
      ... If you are concerned about disk placement, you must do an extendlv, ... If you just do a chfs LVM will decide which disk to extend onto and you ... cahoot does not accept liability for any such ... If you wish to confirm the origin or content of this communication, ...
      (AIX-L)
    • Re: Disks used by LV
      ... If you are concerned about disk placement, you must do an extendlv, ... If you just do a chfs LVM will decide which disk to extend onto and you ... > these IO intensive FS's should go and occupy the free space ...
      (AIX-L)
    • Re: Adding Addl Disk to Volume Group
      ... Multiply your free MB by 2048 to get the new_size value for your 'chfs -a ... size=new_size/fs_name' command. ... Adding Addl Disk to Volume Group ... done the work on the SAN but need help with the AIX commands to increase ...
      (AIX-L)
    • Re: Mirroring question
      ... Likewise....I always run an extendlv before performing a chfs. ... even performing those steps in my scenario it still does not control ... For an existing mirror, you can use a map file with extendlv to specify ...
      (AIX-L)
    • Re: chfs question
      ... >>available in the center disk region, ... chfs will allocated disk space whereever it can find it. ...
      (comp.unix.aix)