resize2fs fails continually fails with "open: No such file or directory"

I have dynamically increase a logical volume for a CentOS Linux system a dozen times.  But this one server REFUSES to expand any logical volumes.

Here is the error I get no matter what I try:
resize2fs 1.41.12 (17-May-2010)
open: No such file or directory while opening /dev/mapper/vg_kraken-lv_root

Do I need to completely unmount root to extend this?

Here are the steps I followed:

[root@kraken ~]# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (14019-30394, default 14019):
Using default value 14019
Last cylinder, +cylinders or +size{K,M,G} (14019-30394, default 30394): +20G
Command (m for help): p

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x332b4f39

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       10100    81128218+  8e  Linux LVM
/dev/sdb2           10101       11406    10490445   8e  Linux LVM
/dev/sdb4           11407       30394   152521110    5  Extended
/dev/sdb5           11407       14018    20980858+  8e  Linux LVM
/dev/sdb6           14019       16630    20980858+  83  Linux

Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): 8e
Changed system type of partition 6 to 8e (Linux LVM)
Command (m for help): p

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x332b4f39

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       10100    81128218+  8e  Linux LVM
/dev/sdb2           10101       11406    10490445   8e  Linux LVM
/dev/sdb4           11407       30394   152521110    5  Extended
/dev/sdb5           11407       14018    20980858+  8e  Linux LVM
/dev/sdb6           14019       16630    20980858+  8e  Linux LVM


[root@kraken ~]# vgextend vg_kraken /dev/sdb6
  Physical volume "/dev/sdb6" successfully created
  Volume group "vg_kraken" successfully extended

[root@kraken ~]# lvextend -l+100%FREE /dev/vg_kraken/root /dev/sdb6
  Size of logical volume vg_kraken/root changed from 329.81 GiB (84432 extents) to 349.82 GiB (89554 extents).
  Logical volume root successfully resized

[root@kraken ~]# resize2fs /dev/vg_kraken/root
resize2fs 1.41.12 (17-May-2010)
open: No such file or directory while opening /dev/mapper/vg_kraken-lv_root
jgrammer42Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MazdajaiCommented:
Can you provide output for the following?

pvdisplay
vgdisplay
lvdisplay

Open in new window

jgrammer42Author Commented:
Mazdajai
Here is the output of those commands.

FYI...the name of the logical volume in the output below I am having a problem with is "lv_oracle".  And yes, Oracle is running on that LV.  

pvdisplay
[root@nkidhd02 ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_nkidhd02
  PV Size               69.51 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              17794
  Free PE               426
  Allocated PE          17368
  PV UUID               GB2428-PYu2-WNVw-UAd0-SdBa-yxMy-iFBOEI

  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               vg_nkidhd02
  PV Size               10.00 GiB / not usable 1.38 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              2559
  Free PE               0
  Allocated PE          2559
  PV UUID               tPkXGn-UQO6-BohM-2mH2-7f36-E7hO-7EKaGu

  --- Physical volume ---
  PV Name               /dev/sda4
  VG Name               vg_nkidhd02
  PV Size               20.00 GiB / not usable 1.31 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              5120
  Free PE               0
  Allocated PE          5120
  PV UUID               g2pw6U-fzki-U03y-4okL-gDn5-Pgsp-UdGIs3

  --- Physical volume ---
  PV Name               /dev/sdb5
  VG Name               vg_nkidhd02
  PV Size               69.00 GiB / not usable 4.84 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              17664
  Free PE               3072
  Allocated PE          14592
  PV UUID               2lFD4q-XCUT-4etr-wr6x-rVBF-SeDs-d8ln7i

  --- Physical volume ---
  PV Name               /dev/sdb6
  VG Name               vg_nkidhd02
  PV Size               12.01 GiB / not usable 3.73 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              3074
  Free PE               3072
  Allocated PE          2
  PV UUID               KSLS82-ZeY3-YCc5-9Wbo-5FdN-YCPQ-LqGxIF


[root@nkidhd02 ~]# vgdisplay
  --- Volume group ---
  VG Name               vg_nkidhd02
  System ID
  Format                lvm2
  Metadata Areas        5
  Metadata Sequence No  15
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                5
  Open LV               5
  Max PV                0
  Cur PV                5
  Act PV                5
  VG Size               180.51 GiB
  PE Size               4.00 MiB
  Total PE              46211
  Alloc PE / Size       39641 / 154.85 GiB
  Free  PE / Size       6570 / 25.66 GiB
  VG UUID               fbK7e5-XYLq-qKb6-phku-PEo2-8onz-6fAZry

[root@nkidhd02 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg_nkidhd02/lv_home
  VG Name                vg_nkidhd02
  LV UUID                rQVUnN-1FSU-LSb2-vLR3-QH3x-qcs0-qILkAK
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                54.00 GiB
  Current LE             13823
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Name                /dev/vg_nkidhd02/lv_oracle
  VG Name                vg_nkidhd02
  LV UUID                SH7QCP-95Z9-1lkY-HNls-jteN-k0Eh-AMoRm0
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                69.00 GiB
  Current LE             17664
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

  --- Logical volume ---
  LV Name                /dev/vg_nkidhd02/lv_root
  VG Name                vg_nkidhd02
  LV UUID                jnlZUy-Vc3N-VTZI-A7K6-HrVH-M38s-ugdZHs
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                12.01 GiB
  Current LE             3074
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg_nkidhd02/lv_swap
  VG Name                vg_nkidhd02
  LV UUID                AhZUC7-Cob1-DoLs-WLrB-LwlH-5pmM-NaFeGd
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                7.84 GiB
  Current LE             2008
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Name                /dev/vg_nkidhd02/lv_usr
  VG Name                vg_nkidhd02
  LV UUID                XRdG66-pHUb-6M0r-ixnn-cCeL-Vq2J-CO7Pm1
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                12.00 GiB
  Current LE             3072
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

[root@nkidhd02 ~]#
MazdajaiCommented:
Are you trying to extend 25.66 GiB on lv_oracle that resides in vg_nkidhd02 (/dev/sdb)?

Why are you extending /dev/vg_kraken/root if the target is /dev/vg_nkidhd02/lv_oracle?
lvextend -l+100%FREE /dev/vg_kraken/root /dev/sdb6

Open in new window

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

jgrammer42Author Commented:
mazdajai,

My original post I did not use the actual LV names.  That was an example.

Originally, lv_oracle was 12GB in size.  I added a new physical drive of /dev/sdb

/dev/sdb is exactly configured as below.

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x96f62bc0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       13054   104856223+   5  Extended
/dev/sdb5               1        9008    72356697   8e  Linux LVM
/dev/sdb6            9009       10576    12594928+  8e  Linux LVM
/dev/sdb7           10577       13054    19904503+  8e  Linux LVM


I extended the Volume Group of vg_nkidhd02 to add in /dev/sdb5.  Which was successful.

I then added /dev/sdb5 by extents to the LV of oracle with lvextend bringit up to 69G (see lvdisplay output above)

However, when I go to execute resize2fs that is when I get the following error.
[root@nkidhd02 ~]# resize2fs /dev/mapper/vg_nkidhd/lv_oracle
resize2fs 1.41.12 (17-May-2010)
open: No such file or directory while opening /dev/mapper/vg_nkidhd/lv_oracle
[root@nkidhd02 ~]#
MazdajaiCommented:
The volume group is vg_nkidhd02, shouldn't it be:
resize2fs /dev/mapper/vg_nkidhd02/lv_oracle

Open in new window


but not :
[root@nkidhd02 ~]# resize2fs /dev/mapper/vg_nkidhd/lv_oracle
resize2fs 1.41.12 (17-May-2010)

Open in new window

joolsSenior Systems AdministratorCommented:
You need to be using the correct device file, for example. (given your output above)

resize2fs /dev/vg_nkidhd02/lv_oracle

if it doesnt work, make sure the device file exists, if not then the lv may not be active and you may need to activate it.

lvchange -a y /dev/vg_nkidhd02/lv_oracle

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jgrammer42Author Commented:
Thank you very much Jools!

The cmd I was missing was the lvchange -a y piece.  

Once I executed that, the LV resized perfectly!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.