Firstly, I can't stress enough how much of a newb I am to AIX or Linux in general so please be very patient. I am strictly a MS man, however I now need to administer an IBM power series blade server which sits on top of an AIX VIOS. The VIOS version I am running is 2.1.2.0 and it is mirrored on two physical disks.
I am currently trying to install the latest version of the VIOS but when I attempt to run the command updateios it complains that there is not enough space in the /usr filesystem.
I then attempted to extend the /usr filesytem using extendlv but I get the error "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."
In troubleshooting this error on google I think the problem lies in the allocation of my free PPs over the two mirrored disks. Here is the output of lsvg -pv rootvg.
$ lsvg -pv rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 546 0 00..00..00..00..00
hdisk1 active 546 301 83..00..00..109..109
I think what I need to do is move some of the 301 free PPs from hdisk1 over to hdisk0 but I haven't a clue where to even start. Can anyone help? Again, go easy I'm extremely new to this and barely know the connection between LVs, PVs, PPs and LPs.
Obviously your rootvg mirror is not clean, hdisk0 has more data than hdisk1. Check lsvg -l rootvg to see which logical volumes are not mirrored and then decide what to do.
As you have probably already figured out you are looking for the number of LPs compared to the number of PPs. if the PPs are doubled then it is mirrored. If it is not then figure out where that LV resides. If it already resides on hdisk1 then it will not do you any good but if it resides on hdisk0 then you can use;
migratepv -l logicalvolume hdisk0 hdisk1
to move that LV from hdisk0 to hdisk1 to free up some space on hdisk0.
You can use
lspv -l hdisk?
to figure out which disk the LV in question resides.
In my case my the only LVs that are not mirrored are my sysdump devices so that might be something to look for.
looking into your output from your last output you should not use more than 88 physical partitions per disk - I am wondering where the other 400+ are as your first post shows 546 pps in use on hdisk0 ... but if they are in use they obviously should be displayed somehere which they are not.
Can we start from the beginning - can you show us the output of
$ lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 0007f6fa0000d4000000012667f326b5
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1092 (279552 megabytes)
MAX LVs: 256 FREE PPs: 301 (77056 megabytes)
LVs: 16 USED PPs: 791 (202496 megabytes)
OPEN LVs: 14 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
In my version of AIX -M is not a valid argument for LSVG, there is however an argument -map for which the below is displayed. Is that what you were looking for?
Again, I don't have -l as a valid arg for lspv but I do have -lv, is this what you are looking for?
$ lspv -pv hdisk0
hdisk0:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-110 used outer edge VMLibrary jfs2 /var/vio/VMLibrary
111-112 used outer middle hd6 paging N/A
113-113 used outer middle livedump jfs2 /var/adm/ras/livedump
114-117 used outer middle lg_dumplv sysdump N/A
118-120 used outer middle fwdump jfs2 /var/adm/ras/platform
121-219 used outer middle VMLibrary jfs2 /var/vio/VMLibrary
220-223 used center paging00 paging N/A
224-224 used center hd8 jfs2log N/A
225-225 used center hd4 jfs2 /
226-238 used center hd2 jfs2 /usr
239-241 used center hd9var jfs2 /var
242-255 used center hd3 jfs2 /tmp
256-295 used center hd1 jfs2 /home
296-300 used center hd10opt jfs2 /opt
301-301 used center hd11admin jfs2 /admin
302-302 used center hd2 jfs2 /usr
303-305 used center hd10opt jfs2 /opt
306-328 used center VMLibrary jfs2 /var/vio/VMLibrary
329-437 used inner middle VMLibrary jfs2 /var/vio/VMLibrary
438-546 used inner edge VMLibrary jfs2 /var/vio/VMLibrary
$ lspv -pv hdisk1
hdisk1:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-84 free outer edge
85-110 used outer edge VMLibrary jfs2 /var/vio/VMLibrary
111-112 used outer middle hd6 paging N/A
113-113 used outer middle livedump jfs2 /var/adm/ras/livedump
114-116 used outer middle fwdump jfs2 /var/adm/ras/platform
117-117 used outer middle loglv00 jfslog N/A
118-219 used outer middle VMLibrary jfs2 /var/vio/VMLibrary
220-223 used center paging00 paging N/A
224-224 used center hd8 jfs2log N/A
225-225 used center hd4 jfs2 /
226-239 used center hd2 jfs2 /usr
240-242 used center hd9var jfs2 /var
243-256 used center hd3 jfs2 /tmp
257-296 used center hd1 jfs2 /home
297-304 used center hd10opt jfs2 /opt
305-305 used center hd11admin jfs2 /admin
306-328 used center VMLibrary jfs2 /var/vio/VMLibrary
329-437 free inner middle
438-546 free inner edge
This machine was a completely fresh install by an IBM guy. As stated in my OP the machine is a power blade server which acts as the VIOS for a IBM i server. Hope this helps.
Apologies, I forgot that you have a VIO server - my commands do work on 'normal aix'.
Ok so the missing pps are used by /var/vio/VMLibrary which doesn't seem to be mirrored.
I am not sure if commands like df -g or chfs commands are working on vio servers (as these are managed by another team in my company) but I would try to find out if I can make one of the existing filesystems either smaller or can live without a mirror for it - I would say /home would be such a candidate as it seems relatively huge and it doesnt necessarily have to be mirrored - depending on how full it is you could try to reduce the size by 1 GB and give the space to /usr instead with chfs -a size=-1G /home and chfs -a size=+1G /usr ?
This will put into more of a AIX compatible mode where you can run most of the normal AIX commands that zxmaus mentioned.
---------- Post updated at 11:00 PM ---------- Previous update was at 10:55 PM ----------
It looked to me like lg_dumplv is on hdisk0 and is not mirrored. You could move that lv from hdisk0 to hdisk1 with the command below after running the oem command mentioned above.
migratepv -l lvname hdisk0 hdisk1
That would fee up about 1Gig on hdisk0.
I don't mean to butt in on this to much just throwing some other thoughts out there.
That's exactly what I'll do, I'll reduce the size of /home as it's huge.
Two things I don't understand though:
I deleted a huge 20G SAVSYS from /var/vio/VMLibrary but it didn't free up any PPs on either physical disk. Would I have to delete files then reduce the filesystem using chfs before I see any free PPs?
If /var/vio/VMLibrary isn't mirrored how does it appear on both physical disks?
When you delete any files on the FS level, the LV/VG below does not know about it. Reduce the FS with chfs -a size=-1G or from "smit fs".
/var/vio/VMLibrary -> When that FS is mirrored, it should show "n" PPs in lsvg -l and n x 2 LPs. This doesn't meant that it is properly mirrored, but it is mirrored. Since you have just 2 disks the chance that it is correctly mirrored is pretty high
But from my lsvg I can see that the PPs are not double the LPs for /var/vio/VMLibrary. Does that not mean the filesystem isn't mirrored?
Also on looking at the below output I can see the distribution of LPs and PPs. If I reduce the size of /var/vio/VMLibrary using chfs will it always take PPs and LPs from hdisk1 until there are no longer any more LPs and PPs and then move to hdisk0 or can I force chfs to remove PPs and LPs from hdsik0?
PPs (physical partitions) represent free space on each disk. Each PP is 256 MB in your rootvg. You can see that in the "lsvg rootvg" output:
PP SIZE: 256 megabyte(s)
1 PP is the same as 256 MB of free space. The only way to get more free PPs is to move stuff off the disk to the other disk. LPs represent how may logical partitions of your rootvg are being used. If the disk is not mirrored, then a LP is the same as a PP. If your disk is mirrored, then LPs will be half the number of your PPs unless the logical volume is not mirrored like your /var/vio/VMLibrary. Since your "/var/vio/VMLibrary" is only on hdisk1, shrinking that filesystem size will only free PPs on hdisk1. There is no way to move free PPs from one disk to another. You can move logical volumes between your disks (migratepv -l) to free up PPs on one disk but you can't move free space from one disk over to another.
If your goal is to increase /usr by 2.5 GB, you should have the space according to your "lsvg rootvg" output:
$ lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 0007f6fa0000d4000000012667f326b5
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1092 (279552 megabytes)
MAX LVs: 256 FREE PPs: 301 (77056 megabytes)
LVs: 16 USED PPs: 791 (202496 megabytes)
OPEN LVs: 14 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
Yes, it is spread across both of your disks but that is irrelevant if you are just trying to increase the size of your /usr filesystem by 2.5 GB. Deal with that later. Run the chfs command I posted earlier and your /usr should increase without any error. You don't have to first increase the LV before increasing the FS. Some old versions of Linux I worked with had to do that but I've never had to do it with AIX 5.2 or newer. AIX is smart enough to figure out that the LV needs increased before the FS and will do it automatically.