AIX  New Harddrive Configuration

Posted on 2011-03-06
Last Modified: 2013-11-17
Install ISCSI on AIX, we see the harddrives in lsdev -Cc disk
The drives are presented from a netapp appliance to AIX 6.1 server
hdisk2-5 were created.
What are the steps after that so that we can mount the drives,
do I need to create a VG? when I have tried mount //dev/hdisk2 /test,
it will error about about not having a logfile, if I give it a log file via the -o
option, it fails on mount i/o.
I have looked at smit, but not sure of the VG options, create normal, big.
are these what needs to be done next?
mkvg -y  iscsi_vg hdisk1
mklv -t jfs2log -y logiscsi_vg iscsi_vg 1
mklv -t jfs2 -y iscsilv iscsi_vg 64G
then make file system

What I am worried about is overwriting any data on the Netapp drives, I am told
there is data there.

Question by:FITFSC
  • 3
  • 2
LVL 68

Accepted Solution

woolmilkporc earned 500 total points
ID: 35054946

creating an AIX volume group on a hdisk or on several hdisks always destroys the data on the disk(s).
There is no difference between hdisks accessed via iSCSI and locally attached disks or disks accessed via SAN.

If there is data on the disks there must be or have been a host machine owning/managing them!
In other words: Are these disks already attached to a different host?
If so, and if you want to share the data with that host you can't use iSCSI, you must revert to some file sharing protocol like NFS instead.

If there is no other host (anymore) you can access the disks without destroying the data only if there is an AIX VG already present on them.
In this case you can use "importvg" to make this VG known to AIX. Use "man importvg" to see how it works.
Please take note that all hdisks making up the VG should be accessible by the new AIX system.

By the way, "mkvg" only destroys data on the LUNs presented to AIX. The remainder of your NetApp box will of course be left unchanged!

Anyway, the commands you mentioned in your post are nearly OK. Some remarks/corrections:

- You should use "mkvg -S" to create a "scalable" VG. This will better allow for future growth.
- You can add all hdisks to the new VG in one go, not only one. In your example you use "hdisk1",
but in your Q you stated "hdisk2-5 were created". Is this a mistake or should hdisk1 become part of the new VG as well?
Assuming a mistake the command should be: mkvg -S -y iscsi_vg hdisk2 hdisk3 hdisk4 hdisk5

The command to define the log volume is correct, but you must format it afterwards:
mklv -t jfs2log -y logiscsi_vg iscsi_vg 1
logform /dev/logiscsi_vg
Answer "y" to the confirmation prompt.

- AIX formats its hdisks in chunks called "physical partitions". "mklv" expects the number of PPs to specify the size, not GB. Find out
which PPsize you have with "lsvg iscsi_vg". Look for "PP size" in the upper right area.
Assuming a PP size of 128 MB the "mklv" command should be:
mklv -t jfs2 -y iscsilv iscsivg 512

Please note that "mklv" can take hdisk names as parameters, so you  could control on which hdisks(s) the LV should be placed.

- Use "crfs" to create a filesystem.
crfs -v jfs2 -d iscsilv -m /mount/point
mount /mount/point

Note: you can use "smitty storage" instead of the command line for all of the above tasks.

Good luck!



Author Comment

ID: 35056902
the hdisk are presented from a netapp box that was configured offsite and sent to our location.
I used lqueryvg -Atp hdisk2 and I can see that there are file systems on the various h/d. I was looking
for any information regarding previous VG, but did not see any i will try the importvg.


LVL 68

Assisted Solution

woolmilkporc earned 500 total points
ID: 35057016
Good luck!

Take care to have all hdisks available whose PVIDs show up in "lqueryvg -Atp ..." under "Physical:"
Check with "lspv"!

Please note too that importvg will change the name of a logical volume if this name already exists!

Consider using the "-n" flag of importvg to not varyon the VG after importing. This way you can examine /etc/filesystems beforehand to check what filesystems came with the new VG. Making a backup copy of /etc/filesystems could also be a good idea.


Author Comment

ID: 35314222
closing,,, the issue turned out is that the LUNs were a "live" replication from another site, so, AIX was unable to mount them and considered the VID as corrupt.

Author Closing Comment

ID: 35316213
provided good help so awarding points, but the final solution was that the LUN was open by another process.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now