Solved

AIX  New Harddrive Configuration

Posted on 2011-03-06
5
887 Views
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.

Thanks
0
Comment
Question by:FITFSC
  • 3
  • 2
5 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 35054946
Hi,

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:

1)
- 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

2)
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.

3)
- 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.

4)
- 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!

wmp




 
0
 

Author Comment

by:FITFSC
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.

Thanks

0
 
LVL 68

Assisted Solution

by:woolmilkporc
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.

wmp
0
 

Author Comment

by:FITFSC
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.
 
0
 

Author Closing Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…

708 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

10 Experts available now in Live!

Get 1:1 Help Now