Add new disks and expandlv


 
Thread Tools Search this Thread
Operating Systems AIX Add new disks and expandlv
# 1  
Old 09-04-2009
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  
Old 09-04-2009
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  
Old 09-04-2009
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  
Old 09-04-2009
Quote:
Originally Posted by r4sutton
[...]
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 11:30 AM.. Reason: changed order of points
# 5  
Old 09-04-2009
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  
Old 09-04-2009
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  
Old 09-04-2009
Quote:
Originally Posted by r4sutton
[...]

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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to tell what disks are used for a zpool?

Hello, Does anyone know how I can tell what disk are being not being used by a zpool? For example in Veritas Volume manager, I can run a "vxdisk list" and disks that are marked as "online invalid" are disk that are not used. I'm looking for a similar command in ZFS which will easily show... (5 Replies)
Discussion started by: robertinoau
5 Replies

2. AIX

Striped FS , need to add new disks

Hi, I have a filesystem that is created on a VG with 12 disks. The FS is striped on these disks. Now I have to add 10 more disks to this volume group to help increase the space of the same FS that is striped. How should I add these disks to the Vg and i need these disks to be added such the FS... (1 Reply)
Discussion started by: aixromeo
1 Replies

3. Filesystems, Disks and Memory

FC related disks

Dear Friends, I would like know what are FC related disks and how it will be viewed by generic OSes (Unix, Unix like, Windows & etc.) AFAIK it is viewed by generic OS as SCSI. Can we have FC related disks as internal storage(physically) of general purpose machine (Server / PC /... (1 Reply)
Discussion started by: Tlogine
1 Replies

4. Solaris

Are my disks mirrored ?

# metastat d1: Mirror Submirror 0: d11 State: Okay Submirror 1: d12 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 14582208 blocks (7.0 GB) d11: Submirror of d1 State: Okay Size: 14582208 blocks... (2 Replies)
Discussion started by: Exposure
2 Replies

5. Solaris

host cannot see FC disks

Have a V440 server which we need to connect up to a SE6140. Did the zoning on the 3900 brocade silkworm and did mapping from the array to the host manually host initiator did not autodetect the wwn and had to key in manually. probe-scsi-all cannot show the fc disks. What is the problem here? (7 Replies)
Discussion started by: incredible
7 Replies

6. Solaris

Re-using disks

I would like to know if I can move the disks from a V240 chassis into a V440 chassis to use the increased resources (CPU & Memory) to boost performance. I know you can move disks between V210/240 chassis's, but I'm not sure if this would work between 240s & 440s. Any help would be much appreciated. (4 Replies)
Discussion started by: Chains
4 Replies

7. Solaris

disks in solaris

whats the command to find name of all disks. Is it iostat -En ? (1 Reply)
Discussion started by: vikashtulsiyan
1 Replies

8. AIX

disks broke?

hay I'm new in the AIX-environment. Right now i'm testing some stuff out. But i can't test the LVM-part which is (to me) very important. I have 2 disks in my testmachine but it seems only 1 is working wel. I'll show you the output below of the disks... hdisk0 = in good condition hdisk2 =... (8 Replies)
Discussion started by: kvanelshocht
8 Replies

9. Solaris

What do you use to wipe your disks?

What are y'all using to wipe your solaris disks? I am being question by IT Security, what I am using to wipe disk. Is anyone using a 3rd party utility? I have used the format utility in solaris previously. But they are looking for something commercial that I can use. Anyone have... (4 Replies)
Discussion started by: BG_JrAdmin
4 Replies

10. UNIX for Dummies Questions & Answers

how many disks do I have?

Hi How do I check how many disks do I have in Solaris & HP-UX? Also what does this mean c9t1d5 in /dev/dsk what is c, t, d etc cheers (8 Replies)
Discussion started by: g-e-n-o
8 Replies
Login or Register to Ask a Question