Go Premium for a chance to win a PS4. Enter to Win


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
  • 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

876 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