Could paging space increases be simplified?
AnthonyEnglish 270000RKFN Comments (6) Visits (5870)
On AIX, changing a file system size is a breeze. Here's how to increase the /myfs file system by 1 GB:
chfs -a size=+1G /myfs
And you can decrease it - on the fly - using a minus sign. Let's reduce it by 750 MB:
With paging space, it's a little less user-friendly. To increase paging space (which, let's face it, is the usual direction we want to go), it's chps -s. To decrease, it's chps -d. This will increase paging00 by 8 Physical Partitions:
chps -s 8 paging00
What's so hard about that syntax? Just that it means you need to work out the size in logical partitions. That means you first have to work out the paging space name:
Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
paging00 hdisk23 pagingvg 16384MB 8 yes yes lv 0
hd6 hdisk10 rootvg 16384MB 8 yes yes lv 0
Okay. You have to know the file system name when you want to change its size, so no difference here. But the next bit gets messy:
You have to find the PP (Physical Partition) size for that volume group. You can do this using the lsvg command, but the lslv command will give the information you need:
LOGICAL VOLUME: paging00 VOLUME GROUP: pagingvg
VG STATE: active/complete LV STATE: opened/syncd
TYPE: paging WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 256 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 128 PPs: 128
STALE PPs: 0 BB POLICY: non-relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: center UPPER BOUND: 32
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: off
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
In this case, the paging00 belongs to the volume group pagingvg. The PP SIZE for that volume group is 256 megabytes. When you're changing a file system size, on the other hand, you don't need to know what volume group the logical volume belongs to.
Now to increase the paging space paging00 by, say, 2 GB, you'd need to calculate that in multiples of 256 mb, which comes to 8 Logical Partitions (LPs).
So to increase paging00 by 2 GB, you would run:
chps -s 8 paging00
Wouldn't it be nice to be able to specify the size in GB or MB, the way you can with a file system? Wouldn't this syntax be easier:
chps -a size=+2G paging00
you could leave AIX to work out how many logical partitions that comes to, just the way it works for file systems.