1 2 Previous Next 25 Replies Latest reply: Nov 21, 2013 10:00 PM by Catch-22 RSS

    Unable to resize physical volume

    fraze2001

      We've resized an iSCSI based LUN and are trying to resize the associated physical volume. I've re-scanned the iscsi bus, resized the multipath device (mpath0), but cant resize the physical volume:

       

      1. Multipath device is 1.5T

       

      [root@dcsorap02 ~]# multipath -ll mpath0

      mpath0 (368b7b24ca523e05052f714f2a97ce369) dm-7 EQLOGIC,100E-00

      [size=1.5T][features=1 queue_if_no_path][hwhandler=0][rw]

      \_ round-robin 0 [prio=2][active]

      \_ 8:0:0:0  sdb 8:16  [active][ready]

      \_ 10:0:0:0 sde 8:64  [active][ready]

      -

      2. Physical volume is 1TB

       

      [root@dcsorap02 ~]# pvdisplay /dev/dm-7

        --- Physical volume ---

        PV Name               /dev/dm-7

        VG Name               vgoradata01

        PV Size               1.00 TB / not usable 2.00 MB

        Allocatable           yes

        PE Size (KByte)       4096

        Total PE              262147

        Free PE               3

        Allocated PE          262144

        PV UUID               lkAYd6-EXy9-VBGh-B4XZ-jte1-EgHY-9DIc3N

       

      3. Cant resize the PV

       

      [root@dcsorap02 ~]# pvresize /dev/dm-7

        Unable to find "/dev/dm-7" in volume group "vgoradata01"

        0 physical volume(s) resized / 1 physical volume(s) not resized

       

       

      Am I missing something?

       

      Thanks,

      Fraze

        • 1. Re: Unable to resize physical volume
          Catch-22

          What is your output of:

           

          ls -l /dev/dm-7

          • 2. Re: Unable to resize physical volume
            fraze2001

            [root@dcsorap02 ~]#  ls -l /dev/dm-7

            brw-rw---- 1 root root 253, 7 Nov 19 09:07 /dev/dm-7

            • 3. Re: Unable to resize physical volume
              Catch-22

              Do you have /dev/dm-7 mounted?

               

              What you get if you use:

               

              pvresize -v -d /dev/dm-7

              • 4. Re: Unable to resize physical volume
                fraze2001

                Its definitely mounted - there's an Oracle Standby database using the filesystem and I've checked thats running. But it looks like there's something strange going on:

                 

                1. run df -h - there are 4 LV's built on the same VG

                 

                 

                /dev/mapper/vgoradata01-lvol0

                                       99G   74G   25G  76% /opt

                /dev/mapper/vgoradata01-lvol1

                                      591G  569G   16G  98% /u01

                /dev/mapper/vgoradata01-lvol2

                                      221G  215G  4.0G  99% /u02

                /dev/mapper/vgoradata01-lvol3

                                       99G  322M   98G   1% /u03

                 

                2. lvdisplay can only see one LV

                 

                [root@dcsorap02 net]# lvdisplay -m /dev/mapper/vgoradata01-lvol0

                  --- Logical volume ---

                  LV Name                /dev/vgoradata01/lvol0

                  VG Name                vgoradata01

                  LV UUID                rByUrG-cjhR-xpf3-yfTR-3OEB-FB1b-pN03Pt

                  LV Write Access        read/write

                  LV Status              available

                  # open                 1

                  LV Size                545.00 GB

                  Current LE             139520

                  Segments               1

                  Allocation             inherit

                  Read ahead sectors     auto

                  - currently set to     256

                  Block device           253:8

                 

                 

                  --- Segments ---

                  Logical extent 0 to 139519:

                    Type                linear

                    Physical volume     /dev/dm-6

                    Physical extents    0 to 139519

                 

                [root@dcsorap02 net]# lvdisplay -m /dev/mapper/vgoradata01-lvol1

                  One or more specified logical volume(s) not found.

                [root@dcsorap02 net]# lvdisplay -m /dev/mapper/vgoradata01-lvo2

                  One or more specified logical volume(s) not found.

                [root@dcsorap02 net]# lvdisplay -m /dev/mapper/vgoradata01-lvo3

                  One or more specified logical volume(s) not found.

                 

                3. I can create files in the /u01 filesystem (used for the database)

                 

                [root@dcsorap02 net]# cd /u01

                [root@dcsorap02 u01]# ls

                lost+found  oradata

                [root@dcsorap02 u01]# ls -l

                total 24

                drwx------ 2 root   root 16384 Apr  4  2012 lost+found

                drwxrwxr-x 5 oracle dba   4096 Dec 17  2012 oradata

                [root@dcsorap02 u01]# touch fc.txt

                [root@dcsorap02 u01]# ls -l

                total 24

                -rw-r--r-- 1 root   root     0 Nov 19 14:35 fc.txt

                drwx------ 2 root   root 16384 Apr  4  2012 lost+found

                drwxrwxr-x 5 oracle dba   4096 Dec 17  2012 oradata

                 

                4. The LV's scan with no problem

                 

                [root@dcsorap02 u01]# lvscan -v

                    Finding all logical volumes

                  ACTIVE            '/dev/vgoradata01/lvol0' [100.00 GB] inherit

                  ACTIVE            '/dev/vgoradata01/lvol1' [600.00 GB] inherit

                  ACTIVE            '/dev/vgoradata01/lvol2' [224.00 GB] inherit

                  ACTIVE            '/dev/vgoradata01/lvol3' [100.00 GB] inherit

                  ACTIVE            '/dev/VolGroup00/LogVol00' [9.75 GB] inherit

                  ACTIVE            '/dev/VolGroup00/LogVol02' [14.62 GB] inherit

                  ACTIVE            '/dev/VolGroup00/LogVol05' [19.53 GB] inherit

                  ACTIVE            '/dev/VolGroup00/LogVol04' [19.53 GB] inherit

                  ACTIVE            '/dev/VolGroup00/LogVol03' [19.53 GB] inherit

                  ACTIVE            '/dev/VolGroup00/LogVol01' [19.53 GB] inherit

                 

                5. I've rebooted the server but no difference??

                • 5. Re: Unable to resize physical volume
                  fraze2001

                  Sorry forgot to add the output from the pversize command:

                   

                  [root@dcsorap02 u01]# pvresize -v -d /dev/dm-7

                      Using physical volume(s) on command line

                    Unable to find "/dev/dm-7" in volume group "vgoradata01"

                    0 physical volume(s) resized / 1 physical volume(s) not resized

                  • 6. Re: Unable to resize physical volume
                    Catch-22

                    Does your vgoradata01 volume group consist of several physical devices?

                     

                    What is the following output:

                     

                    lvs --segments -o +devices

                    pvs -v


                    • 7. Re: Unable to resize physical volume
                      fraze2001

                      [root@dcsorap02 u01]# lvs --segments -o +devices

                        LV       VG          Attr   #Str Type   SSize   Devices

                        LogVol00 VolGroup00  -wi-ao    1 linear   9.75G /dev/sda2(0)

                        LogVol01 VolGroup00  -wi-ao    1 linear  19.53G /dev/sda2(2655)

                        LogVol02 VolGroup00  -wi-ao    1 linear  14.62G /dev/sda2(312)

                        LogVol03 VolGroup00  -wi-ao    1 linear  19.53G /dev/sda2(2030)

                        LogVol04 VolGroup00  -wi-ao    1 linear  19.53G /dev/sda2(1405)

                        LogVol05 VolGroup00  -wi-ao    1 linear  19.53G /dev/sda2(780)

                        lvol0    vgoradata01 -wi-ao    1 linear 100.00G /dev/dm-7(0)

                        lvol1    vgoradata01 -wi-ao    1 linear 500.00G /dev/dm-7(25600)

                        lvol1    vgoradata01 -wi-ao    1 linear 100.00G /dev/dm-7(230400)

                        lvol2    vgoradata01 -wi-ao    1 linear 200.00G /dev/dm-7(153600)

                        lvol2    vgoradata01 -wi-ao    1 linear  24.00G /dev/dm-7(256000)

                        lvol3    vgoradata01 -wi-ao    1 linear 100.00G /dev/dm-7(204800)

                      You have new mail in /var/spool/mail/root

                      [root@dcsorap02 u01]# pvs -v

                          Scanning for physical volume names

                        PV         VG          Fmt  Attr PSize   PFree  DevSize PV UUID

                        /dev/dm-6  vgoradata01 lvm2 a-   600.00G 55.00G 600.00G 9KmBZw-KCUf-Q54s-p1R9-r4lC-BzfB-GpbrkD

                        /dev/dm-7  vgoradata01 lvm2 a-     1.00T 12.00M   1.50T lkAYd6-EXy9-VBGh-B4XZ-jte1-EgHY-9DIc3N

                        /dev/sda2  VolGroup00  lvm2 a-   136.00G 33.50G 136.02G Hym4x9-GfiE-6ZHw-WsLl-gFpN-bvMN-ztRlGh

                      • 8. Re: Unable to resize physical volume
                        Catch-22

                        I'm not sure if you can resize a physical volume that is in use. Whatever you do, I hope you have a valid backup.

                         

                        What is the following output:

                         

                        pvck /dev/dm-6 /dev/dm-7

                        vgchange -ay

                        • 9. Re: Unable to resize physical volume
                          fraze2001

                          Good point - I've stopped the databases and unmounted the file systems associated with the LV but still cant resize.

                           

                          1. Output from the commands

                           

                          [root@dcsorap02 ~]# pvck /dev/dm-6 /dev/dm-7

                            Found label on /dev/dm-6, sector 1, type=LVM2 001

                            Found text metadata area: offset=4096, size=192512

                            Found label on /dev/dm-7, sector 1, type=LVM2 001

                            Found text metadata area: offset=4096, size=192512

                          [root@dcsorap02 ~]# vgchange -ay

                            4 logical volume(s) in volume group "vgoradata01" now active

                            1 logical volume(s) in volume group "vgoradata01" now active

                            6 logical volume(s) in volume group "VolGroup00" now active

                           

                          2. Still cant resize

                           

                           

                          [root@dcsorap02 ~]# pvresize /dev/dm-7

                            Unable to find "/dev/dm-7" in volume group "vgoradata01"

                            0 physical volume(s) resized / 1 physical volume(s) not resized

                          • 10. Re: Unable to resize physical volume
                            Catch-22

                            Did you ever rename the volume group or machine name?

                             

                            Does pvresize /dev/sda2 work?

                             

                            Perhaps you can find more info using the following:

                             

                            strace pvresize /dev/dm-7

                            • 11. Re: Unable to resize physical volume
                              fraze2001

                              Nope never renamed (as far as I know!)

                               

                              Can resize sda2 which belongs to a separate VG

                               

                              [root@dcsorap02 ~]# pvresize /dev/sda2

                                Physical volume "/dev/sda2" changed

                                1 physical volume(s) resized / 0 physical volume(s) not resized

                               

                              Will take a look at strace

                               

                              Thanks for the help

                              • 12. Re: Unable to resize physical volume
                                Catch-22

                                Can you post the output of the "vgdisplay vgoradata01 " command?

                                • 13. Re: Unable to resize physical volume
                                  fraze2001

                                  [root@dcsorap02 ~]# vgdisplay vgoradata01

                                    --- Volume group ---

                                    VG Name               vgoradata01

                                    System ID

                                    Format                lvm2

                                    Metadata Areas        1

                                    Metadata Sequence No  9

                                    VG Access             read/write

                                    VG Status             resizable

                                    MAX LV                0

                                    Cur LV                1

                                    Open LV               1

                                    Max PV                0

                                    Cur PV                1

                                    Act PV                1

                                    VG Size               600.00 GB

                                    PE Size               4.00 MB

                                    Total PE              153599

                                    Alloc PE / Size       139520 / 545.00 GB

                                    Free  PE / Size       14079 / 55.00 GB

                                    VG UUID               l632jR-Exb8-mMkT-47SU-8mW2-uNrj-7pLY3u

                                  • 14. Re: Unable to resize physical volume
                                    Catch-22

                                    Could you please also post the output of "lvs -v". Perhaps the VG UUID is registered to /dev/dm-6 and not /dev/dm-7, which you are trying to resize.

                                    1 2 Previous Next