The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Re-using disks Chains SUN Solaris 4 09-16-2008 05:56 AM
How to set up mirroring on OS disks. Sprellarinn Linux 0 10-17-2007 09:56 AM
new IBM pseries and new disks sapbcer AIX 2 07-19-2007 01:30 PM
Disks on AIX piooooter UNIX for Dummies Questions & Answers 2 03-07-2006 05:20 AM
how many disks do I have? g-e-n-o UNIX for Dummies Questions & Answers 8 11-01-2001 03:20 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-04-2009
r4sutton r4sutton is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 4
Add new disks and expandlv

I have successfully added new physical disks with the objective to expand an exisiting logical volume. How do I add the new disks to the logical volume so I can then expand the size of the lv and ultimately the file system. The disks have been added to the related Volume Group.

Thanks
  #2 (permalink)  
Old 09-04-2009
bakunin bakunin is online now Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,628
First, add the disk(s) to the volume group in question. You have already figured that out:

Code:
extendvg <VGname> <diskname>

example: extendvg myVG hdisk99
Then issue a "lsvg <VGname>" and you will see the added available PPs. These are available to expand your file systems/logical volumes.

It is possible to directly increase the FS and LVM will automatically extend the LV for you but i want more control over this process so i habitually extend the LV first and only then the FS:

Code:
extendlv [-m<mapfile>] <LVname> <NrOfPPs>
or
extendlv <LVname> <NrOfPPs> [<PVname>]

example: extendlv MyLV 5
will increase the size of MyLV by 5 times the PP size. If MyLV is mirrored a multiple of 5 PPs will be added,
depending on the number of mirrors configured.
Then expand the filesystem to make use of the additional space in the LV: first convert your PP size to 512-byte-blocks:

blocks = <nr of PPs> * 2 * <PPsize in kb>

example: PP size is 256G, 2 PPs added:

2 * 2 * 1024 * 1024 * 256 = 1073741824

Then use this number to add that many blocks to your fs:

Code:
chfs -a size=+<nr of blocks> <FS>

example: chfs -a size=+1073741824 /my/file/system
You can do all this while the system is under load, there is no need to unmount anything, let alone stop the system.

I hope this helps.

bakunin
  #3 (permalink)  
Old 09-04-2009
r4sutton r4sutton is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 4
Thank you bakunin, I really appreciate your help this is giving me a headache.

lsvg uservg01 = 2184 (559104 megabytes) PP SIZE: 256 megabyte(s)

This is a striped volume with
STRIPE WIDTH: 4
STRIPE SIZE: 32K
BACKUP MIRROR COPY: 3

If I try, for example, extendlv vol01 5. I get the following and its this I don't understand.

0516-1036 extendlv: Striped logical volume size can only be an even
multiple of the striping width.
0516-788 extendlv: Unable to extend logical volume.

I don't actually need to add the addtional hdisk*s to the LV?

Thanks
  #4 (permalink)  
Old 09-04-2009
shockneck's Avatar
shockneck shockneck is offline Forum Advisor  
No RISC - No Fun
  
 

Join Date: Mar 2008
Location: Infractor's boudoir
Posts: 355
Quote:
Originally Posted by r4sutton View Post
[...]
This is a striped volume with
STRIPE WIDTH: 4
[...]
If I try, for example, extendlv vol01 5. I get the following and its this I don't understand.

0516-1036 extendlv: Striped logical volume size can only be an even
multiple of the striping width.

[...]
Stripe width of 4 means that the content of one Logical Partition is spread over 4 Physical Partitions. Hence you can extend the striped LV by n*4 PP only because LV (oposed to filesystems) use complete PPs. So extending by 4, 8, 12, 16 ... is ok, extending by 5,7,9 is not. Furthermore you need free PP on 4 different hdisks.

Last edited by shockneck; 09-04-2009 at 10:30 AM.. Reason: changed order of points
  #5 (permalink)  
Old 09-04-2009
r4sutton r4sutton is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 4
bear with me, I think I may be close to understanding this now

There are four new disks available in the VG

hdisk14 active 546 546 110..109..109..109..109
hdisk15 active 546 546 110..109..109..109..109
hdisk16 active 546 546 110..109..109..109..109
hdisk17 active 546 546 110..109..109..109..109

So if I try

extendlv vol01 4

I get

0516-404 allocp: This system cannot fulfill the allocation request.
There are not enough free partitions or not enough physical volumes
to keep strictness and satisfy allocation requests. The command
should be retried with different allocation characteristics.
  #6 (permalink)  
Old 09-04-2009
faruk faruk is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 54
Hello,

While stripping we used to mention the name of the physical volume names.
Did u added the physical names of newly added to vg(hdisk14 hdisk15 hdisk16 hdisk17) in the field of spread LV.

smitty chlv => select your lv name => check the field "PHYSICAL VOLUME names"

HTH
  #7 (permalink)  
Old 09-04-2009
shockneck's Avatar
shockneck shockneck is offline Forum Advisor  
No RISC - No Fun
  
 

Join Date: Mar 2008
Location: Infractor's boudoir
Posts: 355
Quote:
Originally Posted by r4sutton View Post
[...]

There are four new disks available in the VG

[...]
So if I try

extendlv vol01 4

I get

0516-404 allocp: This system cannot fulfill the allocation request.
There are not enough free partitions or not enough physical volumes
to keep strictness and satisfy allocation requests. The command
should be retried with different allocation characteristics.
The LV was probably created with the default settings and therefore has its Upper Bound set to 4. If you use four more disks you need to change the LV's properties by increasing Upper Bound to at least 8 (disks) now. Use
# lslv vol01
to see LV's properties.
Change Upper Bound if necessary with
# chlv -u8 vol01
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0