AIX

AIX

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

 View Only
Expand all | Collapse all

Creating a new VG

  • 1.  Creating a new VG

    Posted Tue August 09, 2022 09:38 AM
    I am adding a 300 GB disk to my AIX server and am creating my first VG.   Is there a document that clearly explains the values PP Size, Total PP's, and Max LV.  I've tried searching various sites and not finding a document which explains the parameters easily.
    I used the command to make the VG
    mkvg -y CSVG hdisk0

    I tried several parameters for the LV and the FS but the end result appears that I am only creating a 50G volume. 
    Filesystem GB blocks Free %Used Iused %Iused Mounted on
    /dev/CSLV 50.00 49.99 1% 4 1% /CS

    I know I can use the chfs to increase the size to what I want, but I was trying to allocate the size at creation. 


    ------------------------------
    Michael Garczynski
    Director - SAP Architecture
    DAP Products
    ------------------------------


  • 2.  RE: Creating a new VG

    Posted Tue August 09, 2022 08:12 PM
    mkvg
    -y vgname
    -s ppsize in MB (I use -s 1024, but therer’re cases where other numbers make sense)
    -S | -B | (not specified) is the VG type (scaleable | Big | default) — this has to do with how many volumes (PVs) you’re going to have in the VG

    so, I added 24 TB filesystem today creating a scaleable vg
    mkvg -y myvgname -S -s 1024 hdisk1 hdisk2 hdisk3 … whatever your disk names are
    mklv -t jfs2 -ex -y mylv_name myvgname 24000
    crfs -v jfs2 -d mylv_name -m /myfs_name -A yes -a logname=INLINE
    chmod 555 /myfs_name
    mount /myfs_name

    This is obviously just an example off the top of my head, everything you do, you need to consider your needs and standards…




  • 3.  RE: Creating a new VG

    Posted Wed August 10, 2022 10:49 AM
    Tom,

    Thanks for the example.  It cleared up some of my issues.

    ------------------------------
    Michael Garczynski
    Director - SAP Architecture
    DAP Products
    ------------------------------



  • 4.  RE: Creating a new VG

    Posted Wed August 10, 2022 09:39 AM

    Hello Michael,

     

    The BEST references I have ever seen for LVM are:

     

    https://www.redbooks.ibm.com/abstracts/sg245432.html

     

    And

     

    https://www.redbooks.ibm.com/redbooks/pdfs/sg245433.pdf

     

    Yes, they are old. But these books very clearly explain the fundamentals of LVM. They do not cover many of the options that are available now, but the fundamentals are still the same.

     

     

     

    Sent from Mail for Windows

     






  • 5.  RE: Creating a new VG

    Posted Wed August 10, 2022 10:51 AM
    Grover,

    Thanks for the references.  I do have the second book but didn't know if there was anything current.

    ------------------------------
    Michael Garczynski
    Director - SAP Architecture
    DAP Products
    ------------------------------



  • 6.  RE: Creating a new VG

    Posted Thu August 11, 2022 09:46 AM

    Also you can use the official and actual AIX Documentation:

     

    https://www.ibm.com/docs/en/aix/7.3?topic=storage-logical-volume-concepts

     

    Good luck!

     

    Regards, Harald


    i. A. Harald Stürner
    Senior Consultant 

    Tel:      +49 711 72819-7123  
    Mobil:   +49 151 57690974  
    Fax:     +49 711 72819-7120 
    E-Mail:
    H.Stuerner@profi-ag.de

      PROFI Engineering Systems AG
      Breitwiesenstraße 19
      70565 Stuttgart

      

                   


    PROFI Engineering Systems AG, Otto-Röhm-Str. 18, 64293 Darmstadt, Amtsgericht Darmstadt HRB 7833.
    Vorstand: Lutz Hohmann
    Aufsichtsratsvorsitzender: Dr.-Ing. Udo Hamm.
    PROFI-Fokusthemen






  • 7.  RE: Creating a new VG

    Posted Thu August 11, 2022 02:29 AM
    You've had some good replies so far.  Another suggestion I would make is that you create your VG by going through SMIT, mess around with the different options before executing, and press F6 frequently so you can see what SMIT is building underneath to execute your command.  That way, you'll get a good idea of what each of those options to the mkvg command are and what they do exactly.

    ------------------------------
    Carlo Castillo
    ------------------------------



  • 8.  RE: Creating a new VG

    Posted Thu August 11, 2022 03:43 AM
    I just reread the original question and it dawned on me, do you really need a new VG?

    there are pros and cons to a deprecate VG, but more cons than pros IMHO.  Would you mind sharing how your disks are currently laid out?

    adding space to a system, if you ever want to extend an existing file system, then the disk needs to be in the same VG

    so if your new, and looking into mkvg, you need to also look into extendvg

    tom

    ------------------------------
    Tom McGivern
    ------------------------------



  • 9.  RE: Creating a new VG

    Posted Fri August 12, 2022 07:42 AM
    I am familiar with extendvg and have used it in the past.  As I had never created a VG, I wanted to make sure the VG was the proper size when I created it if possible.  I'm good and have created the VG and everything is functioning well.  

    Thanks again for the reply.

    ------------------------------
    Michael Garczynski
    Director - SAP Architecture
    DAP Products
    ------------------------------



  • 10.  RE: Creating a new VG

    Posted Fri August 12, 2022 08:02 AM
    This is good to study. Storage geometry is very important for
    performance and maintainability. I have a customer right now with a VG
    that can no longer expand due to poor geometry, and it's causing
    issues. We'd have to take an outage and rebuild/restore to fix it.

    Consider it carefully. Study what the LVM can do. Review the
    application requirements and what the SAN can offer.

    Never shy away from SMIT. Even seasoned admins use SMIT because it's
    faster than looking up flags you only use on occasion, plus it has the
    benefit of doing some checking to help make sure you're doing the
    right thing.

    Good luck!

    On Fri, Aug 12, 2022 at 11:41:49AM +0000, Michael Garczynski via IBM Community wrote:
    > I am familiar with extendvg and have used it in the past. As I had never created a VG, I wanted to make sure the VG was the proper size when I created it if possible. I'm good and have created the VG and everything is functioning well.
    >
    > Thanks again for the reply.
    >
    > ------------------------------
    > Michael Garczynski
    > Director - SAP Architecture
    > DAP Products
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Thu August 11, 2022 03:42 AM
    > From: Tom McGivern
    > Subject: Creating a new VG
    >
    > I just reread the original question and it dawned on me, do you really need a new VG?
    >
    > there are pros and cons to a deprecate VG, but more cons than pros IMHO. Would you mind sharing how your disks are currently laid out?
    >
    > adding space to a system, if you ever want to extend an existing file system, then the disk needs to be in the same VG
    >
    > so if your new, and looking into mkvg, you need to also look into extendvg
    >
    > tom
    >
    > ------------------------------
    > Tom McGivern
    > ------------------------------
    >
    > Original Message:
    > Sent: Thu August 11, 2022 02:28 AM
    > From: Carlo Castillo
    > Subject: Creating a new VG
    >
    > You've had some good replies so far. Another suggestion I would make is that you create your VG by going through SMIT, mess around with the different options before executing, and press F6 frequently so you can see what SMIT is building underneath to execute your command. That way, you'll get a good idea of what each of those options to the mkvg command are and what they do exactly.
    >
    > ------------------------------
    > Carlo Castillo
    >
    > Original Message:
    > Sent: Tue August 09, 2022 09:38 AM
    > From: Michael Garczynski
    > Subject: Creating a new VG
    >
    > I am adding a 300 GB disk to my AIX server and am creating my first VG. Is there a document that clearly explains the values PP Size, Total PP's, and Max LV. I've tried searching various sites and not finding a document which explains the parameters easily.
    > I used the command to make the VG
    > mkvg -y CSVG hdisk0
    >
    > I tried several parameters for the LV and the FS but the end result appears that I am only creating a 50G volume.
    > Filesystem GB blocks Free %Used Iused %Iused Mounted on
    > /dev/CSLV 50.00 49.99 1% 4 1% /CS
    >
    > I know I can use the chfs to increase the size to what I want, but I was trying to allocate the size at creation.
    >
    >
    > ------------------------------
    > Michael Garczynski
    > Director - SAP Architecture
    > DAP Products
    > ------------------------------
    >
    >
    > Reply to Sender : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=264367&SenderKey=358914ec-a8e6-4746-a9e9-ee380e8df4e1
    >
    > Reply to Discussion : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=264367
    >
    >
    >
    > You are subscribed to "AIX" as Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.


    ------------------------------------------------------------------
    Russell Adams Russell.Adams@AdamsSystems.nl
    Principal Consultant Adams Systems Consultancy
    https://adamssystems.nl/




  • 11.  RE: Creating a new VG

    Posted Fri August 12, 2022 07:37 AM
    Thanks for the F6 tip with smit.  I try using smit first, but sometimes it's hard to associate the name on the screen with the variable it's changing.  Coming from the IBM i, I was always told real admins use CLI.  hahaha.

    ------------------------------
    Michael Garczynski
    Director - SAP Architecture
    DAP Products
    ------------------------------



  • 12.  RE: Creating a new VG

    Posted Mon August 15, 2022 03:00 AM
    I'd suggest you open the man page for mkvg side-by-side the SMIT screen so you can more easily follow what each option's corresponding command line switch actually is.  Turn on an option in the SMIT screen, press F6, and see what switch was added to the command.  Then look up the documentation to confirm if you understood it correctly.

    Being former OS/400 myself, Control Language and the menu-based structure of the OS has always been an easier time navigating for anyone starting with scratch, I agree!  But AIX can be very configurable, while at the same time be very powerful. :)

    Carlo Castillo


    ------------------------------
    Carlo Castillo
    ------------------------------