You can dynamically add virtual disk units to an AIX® logical partition that
uses IBM® i resources.
This allows you to increase the storage capacity of your AIX logical partition when
needed.
About this task
Virtual disks simplify hardware configuration on the
server because they do not require you to add additional physical
devices to the server in order to run AIX. You can allocate up
to 64 virtual disks to an AIX logical
partition. Each virtual disk supports up to 1000 GB of storage. Each
virtual disk appears to AIX as
one actual disk unit. However, the associated space in the IBM i integrated file system
is distributed across the disks that belong to the IBM i logical partition.
Distributing storage across the disks provides the benefits of device
parity protection through IBM i.
Therefore, you do not have to use additional processing resources
and memory resources by setting up device parity protection through AIX.
IBM i provides the ability
to dynamically add virtual disks to an AIX logical partition.
You can allocate disk space in the integrated file system and make
it available to AIX without
restarting the server or logical partition. The AIX administrator can also
configure the newly allocated disk space and make it available without
restarting the server.
To add virtual disks dynamically to an AIX logical
partition, complete the following steps:
Procedure
-
If you use IBM Navigator for i, create a network-server storage space
using IBM Navigator for i.
-
Expand .
-
Right-click the Disk Drives and select New
Disk.
-
In the Disk drive name field, specify the name that you want to give to
the network-server storage space.
-
In the Description field, specify a meaningful description for the
network-server storage space.
-
In the Capacity field, specify the size of the new network-server
storage space in megabytes.
-
Click OK.
-
Continue with step 3.
- If you use a character-based
interface, create a network-server storage space using the character-based
interface:
- At an IBM i
command line, type the command CRTNWSSTG and press
F4.
The Create NWS Storage Space (CRTNWSSTG)
display opens.
- In the Network-server storage space field, specify the
name you want to give to the network-server storage space.
- In the Size field, specify the size in megabytes for
the new network-server storage space.
- In the Text description field, specify a meaningful
description for the network-server storage space.
- Press Enter.
- Continue with step 4
-
If you use IBM Navigator for i, link the network-server storage space
using IBM Navigator for i.
-
Expand .
-
Click Disk Drives, right-click an available network-server storage
space, and select Add Link.
-
Select the server to which you want to link the network-server storage space.
-
Select one of the available data access types.
-
Click OK.
-
Continue with step 5.
- If you use a character-based
interface, link the network-server storage space using a character-based
interface:
- At an IBM i
command line, type the command ADDNWSSTGL and press
F4.
The Add Network-Server Storage Link (ADDNWSSTGL)
display opens.
- In the Network server description field, specify the
name of the network server description (NWSD).
- In the Dynamic storage link field, specify *YES to make
the network-server storage space dynamically available to the logical
partition (that is, available without rebooting the AIX logical partition).
- In the Drive sequence number field, specify the link
sequence position you want to use.
- Press Enter.
- Activate the AIX logical partition (if
it is not already activated).
- Log in to AIX using
a user name with superuser (root) privileges.
- Configure the new virtual disk on the AIX logical partition by
running the AIX command
cfgmgr.
- Verify that your new disk has been added and can be configured
by running the AIX command
lspv.
When you enter lspv at the command prompt,
the system lists the disks that are currently available to AIX.
An
example of the output for this command is below:
# lspv
hdisk0 00cad6aceafe8fe4 rootvg active
hdisk1 none None
Note
the name of the new disk as it displays in the left-hand column.
- Configure the new disk using one of the following two methods.
- Add the new virtual disk to the root volume group by using the AIX command
extendvg
rootvg diskname, where diskname is
the name of the new disk. If you use this method, you do not need
to continue this procedure. You can use AIX methods to increase
the file system size at a later time.
- Create a new volume group for the new virtual disk by using the AIX command
mkvg
-y volgroup diskname, where volgroup is
the name that you want to use for the new volume group and diskname is
the name of the new disk.
- Make a logical volume on the new virtual disk using the AIX
mklv -y logicvol
volgroup 1 diskname command. logicvol is
the name that you want to use for the new logical volume, volgroup is
the name of the new volume group, and diskname is
the name of the new disk. (The numeral 1 indicates
that the logical volume is to consist of one logical disk partition.)
- Format the disk partition using the AIX
crfs command.
There are a number of optional parameters for the
crfs command,
but typically the defaults satisfy most disk uses. To format the disk
partition created in the previous steps, type the following command
at an
AIX command
prompt, where
logicvol is the name of the
logical volume and
/mnt/data is the mount
point directory at which you want to mount the new disk:
crfs -v jfs -d logicvol -m /mnt/data
The
crfs command
displays the following diagnostic messages:
crfs -v jfs -d logicvol -m /mnt/data
Based on the parameters chosen, the new /mnt/data JFS file system is limited to
a maximum size of 134217728 (512 byte blocks)
New File System size is 8192.
- Verify that the mount point directory exists by using the
cd /mnt/data command.
/mnt/data is the mount point. The
crfs command
creates this directory so that you can access your new file system.
If the mount point directory does not exist, then run the following
command, where
/mnt/data is the name of the
mount point directory:
mkdir /mnt/data
- Verify that an entry for your new file system exists in
the
/etc/filesystems file. The crfs command
automatically generates the appropriate /etc/filesystems entry
for your new file system. To verify that the entry exists, use an AIX text editor, such as
vi, to open the /etc/filesystems file, and look for
the entry in the /etc/filesystems file. If the entry
does not exist, use the text editor to add the entry to the /etc/filesystems file.
An example of such an entry is below:
/mnt/data:
dev = /dev/logicvol
vfs = jfs
log = /dev/loglv01
mount = true
account = false
This entry mounts the virtual disk every
time you restart
AIX.
- Mount the virtual disk drive in the new directory by typing:
mount
/dev/logicvol /mnt/data. logicvol is
the name of the logical volume and /mnt/data is
the mount point directory.