YOUR TIME IS PRECIOUS!
When you need to increase a file system,
you can use our old friend smitty. But stepping through the SMIT
menus could take a good 3 seconds (at least!) And as a good AIX guru,
your time is precious. In a perfect world AIX gurus like you should
your time by the nanosecond!
(Just go tell your boss that the bloke who writes AIX
Down Under said so.)
Alas, the world is not perfect, as
you may have discovered after that friendly chat with the boss. Even
so, you can save a few seconds when you have to increase a file
system. Here's how:
- Use the command line
- Specify the size to increase in Gigabytes (or MB or KB)
you use the chfs
command, you can specify the new size in blocks.
Option 1: Specify new size
of file system in blocks
chfs -a size=54132736
This, of course requires you to do a calculation or a guestimate
of how many blocks the file system should be.
Or you could do that using the much easier G (for GB), M (MB) or K
(KB) - at least on recent releases of AIX. Note that these three abbreviations are in upper case.
Option 2: Specify new size
of file system in Gigabytes
chfs -a size=24G
That's easier, isn't it?
Or even easier, you can specify
the amount to increase using the += (plus equals) followed by the
amount in Gigabytes / Megabytes / Kilobytes.
Option 3: Specify amount to
increase file system in Gigabytes
chfs -a size=+4G
Update: this originally showed the command operators as += instead of =+ , but as a kind reader has commented, the original syntax I had was incorrect.
This increases the file system by 4 GB.
You can reduce it -
provided you have sufficient working space - using the -=
Option 4: Reduce file
system by 500 Megabytes
chfs -a size=+500M
Space and time
When you increase a file system, you'll need to have enough disk space on
the logical volume on which the file system sits. That may mean expanding an existing LUN or adding a new one, or maybe increasing virtual disk supplied via the VIO server. In
fact, come to think of it, there are few things you need to think
about when you increase file system space.
You may also need
to increase the maximum size of the logical volume that the file
system is associated with. You can use the chlv
command with the -x
flag from the command line.
Or, you could just use SMIT. Sure, it will
take a few seconds more, but you've got the time, haven't you?
ask your boss.