Operating System - HP-UX
1752796 Members
5683 Online
108789 Solutions
New Discussion

Re: Extend new free space in logical drive into physical volume

 
Steven_181
Advisor

Extend new free space in logical drive into physical volume

We have a new server rx2660 in place with 5 disks (300GB each). By default it only uses 3 disks with RAID 5 as below when it shipped from HP.

 

logical drive: /dev/dsk/c0t0d0

volume group: vg00

physical volume: /dev/disk/disk1_p2

 

We have extend the remaining 2 disks using saconfig to the RAID 5 logical drive 0 and then extend space to maximum 1117GB.

 

sautil now show the logical drive: /dev/dsk/c0t0d is having Size = 1143808 MB  ~ 1117GB

 

However the physical volume: /dev/disk/disk1_p2 is still showing the old value.

 

The following is already done:

 

# ioscan -nfNC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      1  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       HP      LOGICAL VOLUME
                      /dev/disk/disk1      /dev/disk/disk1_p2   /dev/rdisk/disk1     /dev/rdisk/disk1_p2
                      /dev/disk/disk1_p1   /dev/disk/disk1_p3   /dev/rdisk/disk1_p1  /dev/rdisk/disk1_p3
disk      3  64000/0xfa00/0x2  esdisk   CLAIMED     DEVICE       TEAC    DVD-ROM DW-224EV
                      /dev/disk/disk3   /dev/rdisk/disk3

#insf -C disk

 

#vgscan

 

#pvdisplay -v /dev/disk/disk1_p2

 

PV Name                     /dev/disk/disk1_p2
VG Name                     /dev/vg00
PV Status                   available
Allocatable                 yes
VGDA                        2
Cur LV                      8
PE Size (Mbytes)            128
Total PE                    4462
Free PE                     4193
Allocated PE                269
Stale PE                    0
IO Timeout (Seconds)        default
Autoswitch                  On
Proactive Polling           On

4462 * 128 = 571136 MB  ~ 557.75GB

 

How do we extend the new available space in the logical drive 0 to the physical volume /dev/disk/disk1_p2 ?

 

 

10 REPLIES 10
Matti_Kurkela
Honored Contributor

Re: Extend new free space in logical drive into physical volume

vgmodify -a -E vg00

 

Edit: That would normally be the answer, but as this is a Itanium system disk, you would have to re-do the EFI partitioning first. I'm not sure if that is safe to do while the system is already installed and running.

MK
Torsten.
Acclaimed Contributor

Re: Extend new free space in logical drive into physical volume

Could you please post the sautil/saconfig output?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven_181
Advisor

Re: Extend new free space in logical drive into physical volume

I encountered the following error.


# vgmodify -a -E vg00
vgmodify: Error:Cannot use -a with a version 1.0 root volume group.

 

Any what should I change in the EFI? I never tried to change anything on that before ?

 

I have also attached the sautil and saconfig information.

 

 

 

 

 

Steven_181
Advisor

Re: Extend new free space in logical drive into physical volume

I have manged to get the size in the vg00. However it show smaller amount compare to the actual 1117GB.

The logical drive now show
diskinfo /dev/rdisk/disk1
SCSI describe of /dev/rdisk/disk1:
             vendor: HP
         product id: LOGICAL VOLUME
               type: direct access
               size: 1171259392 Kbytes
   bytes per sector: 512

# vgdisplay -v vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      8
Open LV                     8
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               5628
VGDA                        2
PE Size (Mbytes)            128
Total PE                    5628
Alloc PE                    269
Free PE                     5359
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 11256g
VG Max Extents              90048

--- Physical volumes ---
   PV Name                     /dev/disk/disk1_p2
   PV Status                   available
   Total PE                    5628
   Free PE                     5359
   Autoswitch                  On
   Proactive Polling           On

5628 * 128 = 720384MB ~ 703.5GB

There is a missing 413.5 GB space.

Any idea where is the missing space goes too?

Steven_181
Advisor

Re: Extend new free space in logical drive into physical volume

I have wondering why it does not goes tothe below in red color compare to the blue color line ?

 

# vgmodify -t /dev/vg00

Current Volume Group settings:
                                                      Max LV      255
                                                      Max PV       16
                                               Max PE per PV     5628
                                            PE Size (Mbytes)      128
                                          VGRA Size (Kbytes)      768
                  VGRA space (Kbytes) without PE renumbering      768
                    VGRA space (Kbytes) PE renumbering lower      768

Volume Group optimized settings (no PEs renumbered):
  max_pv(-p)        max_pe(-e)        Disk size (Mb)
  1                 65535             8388480
  2                 45820             5864960
  3                 30460             3898880
  4                 22780             2915840
  5                 18172             2326016
  6                 15100             1932800
  7                 13052             1670656
  8                 11260             1441280
  9                 9980              1277440
  10                8956              1146368
  11                8188              1048064
  12                7420              949760
  13                6908              884224
  14                6396              818688
  15                5884              753152
  16                5628              720384
  17                5372              687616
  18                4860              622080
  19                4604              589312
  21                4348              556544
  22                4092              523776
  23                3836              491008
  25                3580              458240
  27                3324              425472
  29                3068              392704
  32                2812              359936
  35                2556              327168
  39                2300              294400
  44                2044              261632
  45                1808              231424
  51                1788              228864
  59                1532              196096
  60                1352              173056
  71                1276              163328
  72                1128              144384
  89                1020              130560
  90                896               114688
  119               764               97792
  120               672               86016
  179               508               65024
  180               448               57344
  181               352               45056

Steven_181
Advisor

Re: Extend new free space in logical drive into physical volume

Ok guys, now I get it the value right.

 

use vgmodify -p -e and change the max_pv and max_pe value.

 

if you are in version volume group 1.0., you need to boot into single user mode.

Matti_Kurkela
Honored Contributor

Re: Extend new free space in logical drive into physical volume

The problem is, you've extended the logical disk /dev/disk/disk1 = /dev/dsk/c0t0d0 in legacy style.

 

But since this is a Itanium system disk, there is a EFI partition table,and your LVM PV is located on a partition /dev/disk/disk1_p2 (or /dev/dsk/c0t0d0s1 in legacy style). So far, you have not done anything to the partition table as far as I can see. For the LVM, the size of the PV is determined by the size of the partition. At the moment, the added space is just unpartitioned space at the end of the logical disk.

 

Before the PV can be extended, you would have to use the "idisk" command or a similar tool to extend the disk1_p2 partition. The problem is, there is no option in idisk for resizing existing partitions.

 

Assuming that the partition table has been created using the usual partition description file (= the one listed as an example on the idisk(1M) man page), it might be possible to switch the system to single user mode, repartition the disk using idisk and the usual partition description file, and then reboot - in effect, just write the new partition table to replace the old. If the space allocated to the EFI boot partition will be *exactly* the same it currently is, the start location of the disk1_p2 partition should not change, and the LVM should have no problems.

 

(The usual partition description file in 11.31 allocates 100 MB for the EFI boot partition, and "all the rest" to the LVM PV. However, it only takes into account the size of the existing disk as it exist at the time of the partitioning.)

 

If I had to do something like this, I would want to try it on a test system first, and would double-check the size of the EFI boot partition before proceeding with idisk. And I would definitely take a full Ignite backup first.

 

In the case of a Itanium system disk, vgmodify and the rest can only happen after the partition has been successfully resized.

 

If the resizing of the partition fails, you'll have to restore the OS from the Ignite backup - and since an Ignite restore will also recreate the EFI partition table to match the current size of the system disk, it will be a very effective Plan B. It'll just take longer than a successful resize + reboot.

MK
Steven_181
Advisor

Re: Extend new free space in logical drive into physical volume

Below is my result now

 

# pvdisplay -v /dev/disk/disk1_p2


--- Physical volumes ---
PV Name                     /dev/disk/disk1_p2
VG Name                     /dev/vg00
PV Status                   available
Allocatable                 yes
VGDA                        2
Cur LV                      8
PE Size (Mbytes)            128
Total PE                    8928
Free PE                     8659
Allocated PE                269
Stale PE                    0
IO Timeout (Seconds)        default
Autoswitch                  On
Proactive Polling           On

 

# vgdisplay -v /dev/vg00


--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      8
Open LV                     8
Max PV                      10
Cur PV                      1
Act PV                      1
Max PE per PV               8956
VGDA                        2
PE Size (Mbytes)            128
Total PE                    8928
Alloc PE                    269
Free PE                     8659
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 11195g
VG Max Extents              89560

# saconfig /dev/ciss0

******************** SmartArray RAID Controller /dev/ciss0 ********************

Auto-Fail Missing Disks at Boot     = disabled
Cache Configuration Status          = cache enabled
Cache Ratio                         = 25% Read / 75% Write

---------- PHYSICAL DRIVES ----------

Location  Ct Enc Bay       WWID           Size       Status

Internal  1I   1   8  0x5000cca03c7cded1  300.0 GB   OK
Internal  1I   1   7  0x5000cca03c7e2425  300.0 GB   OK
Internal  1I   1   6  0x5000cca03c7cdc6d  300.0 GB   OK
Internal  1I   1   5  0x5000cca03c7c0dd9  300.0 GB   OK
Internal  2I   1   4  0x5000cca03c7e04e5  300.0 GB   OK

---------- LOGICAL DRIVE 0 ----------

Device File     = /dev/dsk/c0t0d0
RAID Level      = 5
Size            = 1143808 MB
Stripe Size     = 16 KB
Status          = OK

Participating Physical Drive(s):

Ct  Enc  Bay         WWID
1I    1    8  0x5000cca03c7cded1
1I    1    7  0x5000cca03c7e2425
1I    1    6  0x5000cca03c7cdc6d
1I    1    5  0x5000cca03c7c0dd9
2I    1    4  0x5000cca03c7e04e5

Participating Spare Drive(s):

None

 

# vgmodify -t /dev/vg00

Current Volume Group settings:
                                                      Max LV      255
                                                      Max PV       10
                                               Max PE per PV     8956
                                            PE Size (Mbytes)      128
                                          VGRA Size (Kbytes)      752
                  VGRA space (Kbytes) without PE renumbering      768
                    VGRA space (Kbytes) PE renumbering lower      768

 

The space size is showing available. Did I miss something ?

Matti_Kurkela
Honored Contributor

Re: Extend new free space in logical drive into physical volume

Looks like the extra space is now successfully added to vg00. (The difference of about 1024 MB is probably occupied by the EFI boot partition /dev/disk/disk1_p1 and the EFI partition table itself.)

 

Now, you can create new LVM LVs with the 'lvcreate' command, or extend existing LVs with 'lvextend' (+ probably fsadm/extendfs depending on whether you have OnlineJFS or not).

 

If you need a large amount of space for application and/or data, it's usually best to create a dedicated LV for it and mount it wherever it is needed, instead of extending the standard system LVs (/dev/vg00/lvol[1..8]) to huge sizes. Doing it this way makes OS upgrades much easier.

 

Remember: with LVM and OnlineJFS, you can extend filesystems very easily while the applications are running, but shrinking an existing filesystem that is too big is more dangerous and difficult.


Note that your storage configuration actually has quite a few layers:

  • 5x actual physical disks, which are presented by the RAID controller as...
  • ... a single RAID 5 logical disk /dev/disk/disk1, which is split into...
  • ...2 EFI partitions (disk1_p1 and disk1_p2), one of which is the LVM physical volume...
  • ...which is a member of the vg00 volume group...
  • ...which is currently split into 8 LVM logical volumes (lvol1 .. lvol8).

For a non-system disk, the EFI partition layer is omitted, and the entire disk becomes a LVM PV.

MK