Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


AIX  New Harddrive Configuration

Posted on 2011-03-06
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 68

Accepted Solution

woolmilkporc earned 1500 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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.
Suggested Courses

704 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