Solved

Setup Disk on AIX 6.1

Posted on 2012-03-29
37
625 Views
Last Modified: 2012-04-05
This question is a continualtion of question: http://www.experts-exchange.com/OS/Unix/Q_27650927.html

The base install of AIX has finished. Now I need to setup my disk structure. Mirroring etc.. Also how do I assign different volumes to specific disk??
0
Comment
Question by:compdigit44
  • 22
  • 15
37 Comments
 
LVL 20

Accepted Solution

by:
carlmd earned 500 total points
Comment Utility
First lets find out what you have...

Please issue the following commands and post the results.

lsdev -C -c disk

lscfg | grep hdisk

lsparent -C -k scsi_scb && lsparent -C -k lsa && lsparent -C -k wsa && lsparent -C -k scsi

lsparent -C -k mpt_protocol;lsparent -C -k sis_protocol;lsparent -C -k mptscsi

This will tell us what you have to work with.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Thanks!!! I have gather all of the information as requested. I ideally would like to duplicate the same basic structure on my old system to my new one except the face the volumes are larger...
AIX-Disks.docx
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
Please type this and post output from NEW system
        lsvg '-p' rootvg

Please type this and post output from OLD system
        lsvg -o|/usr/sbin/lsvg -i -l
        lscfg | grep hdisk

and then for each hdisk on OLD system please post
        lspv hdisk0
        lspv hdisk1
          etc....
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Here is the information you requested....

Thanks Again!!!!!
AIX-Disk-Old-vs-NEW.docx
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
New server only has three 73GB HD's..
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
From what I see, your old system has four disks of which two are assigned to rootvg (maybe a mirror) and one is assigned to fdcvg2. And one that could be a mirror or not used (can't tell from what I have to look at). The new system has 3 disks of which one is used for rootvg (hdisk0). So you have two to work with.

What are the filesystems you want to create (duplicate) on the new system?
/users
/users-archive
/s/s2
/s/seclab

And of the ones you want to create, how much larger do you want to make them?

Also, what do you want to mirror if anything? Keep in mind that you only have 3 disks and can only mirror either rootvg OR the data disk (to be created), but not both.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
On my old system I do not think the hdisk3 is used since it got an not assigned message when I have th lspv command on it.

I need to duplicate all volumes and need to mirror the rootvg volume...

maybe place all of the other filesystem on the one 73GB hd???
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
Please identify the filesytems you want to move/create on the new systems. This is necessary to decide how much room you need and if you have enough space. Also, you idicated you wanted to make them larger, so how much larger?

These are the 5 filesystesms that appear as might contain your data.
/users
/users-archive
/s
/s/s2
/s/seclab

Once you do this we can layout the disk(s).
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
I know I only have three physical disk to mirror my rootvg volume and other volumes. yet still have space to grow????
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
If you mirror rootvg then you essentially have two disks to work with. There would be some space on rootvg that you could use, and you would have the other 73GB disk.

So, if you will answer the question about what filessystems you want to move, we can see exactly what space is needed.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Sorry like I said I'm still new at this.. The only thing I want to do is duplicate the same structure on the old server to the new server. Same file systems are placed on the small volume grups with the only difference is that the new server will be able to take advantage of the large disk sizes.

Does this make sence...
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
If we duplicate the 5 filesystems from two posts back it will fill about half of one 73GB disk. So if you want to make them larger then they are now, the time to do it is when we are creating them. Yes, then can be made larger later as well if you want to stick with the same size. If any of these filesystems are 80% or more full on the old system, then they should be made larger.

So the plan would be to use one disk to mirror rootvg, put everything else on the  other, and you would still have some room on rootvg.

Is this what you want to do?
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Any way to my the rootvg about 50GB but mirrored but have the remaining GB'S spanned to the other volume??
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
if i'm reading the setup on my old server correctly my rootvg is a mirrored 34GB volume and everything else is on a single non-mirrored 34GB hd..correct???
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
A mirror is of an entire disk. So to mirror rootvg (hdisk0) you will use an entire second disk. But you can put other than OS filesystems on rootvg. See below...

On the old system it appears that hdisk0 (rootvg) is mirrored on hdisk1.

The following non OS filesystems are on rootvg...
/s
/s/s2
/s/seclab

The following filesystems are on fdcvg2, which is on a single hdisk2
/users
/users-archive

hdisk3 is not used...

You have more than enough space to mirror rootvg, move what appears to be the five data filesystems, and expand them.

So, what do you want to do?
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
If you mean making one big mirror then YES!!!!

HOW!!!
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
BTW , once we get the one large mirror volume created I will close this question and open a new one so I can reward more points to people so please stay posted!!!!
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
If you want to do only the mirror first, then do the following. This will mirror hdisk0 and hdisk1.

Enter these commands at the aix prompt, logged in as root:

lspv             (either save a copy or write them down in case we need them later)

extendvg rootvg hdisk1
mirrorvg rootvg hdisk1

that should do it!

To verify, if you type

lspv hdisk0
lspv hdisk1

both should show (upper right corner) rootvg for volume group.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 19

Author Comment

by:compdigit44
Comment Utility
we can extent the mirror afterward correct.
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
I don't understand your question. Extend it to what?

The above commands create the mirror for rootvg. There is no place to "extend" it to.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
maybe i misunderstood. I thought we were going to make one large miror that would be extent to use the remain space on the third disk..
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
We are mirroring one disk (hdisk0 containing rootvg) onto the second disk, hdisk1. Entire disk to entire disk.

The one remaining disk (hdisk2) will remain unmirrored, and be used for the other filesystems.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
ok got it..
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
My rootvg volume has been extended and mirrored!!! How can I confirm the rootvg is using the entire size of the drive. What do I need to do with my remain hard so I can use it for my remain volumes?
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
By default rootvg will use the entire drive.

just type "lsvg rootvg" and you will see the entire drive has been used.

To use the last drive the first thing we need to do is assign it to a volume group, then add lv or filesystems

This would be a good time for you to learn something about smit, a more user friendly interface to do many things, as opposed to typing aix commands.

logged in as root, do the following, selecting as indicated on the screens that follow...

smit
System Storage Management (Physical & Logical Storage)
Logical Volume Manager
Volume Groups
Add a Volume Group
Add an Original Volume Group

on the next screen fill in..
VOLUME GROUP name       enter  [vg2] in box
PHYSICAL VOLUME names      enter [hdisk2] in box
 
then hit enter, you should get an OK in the upper left corner

You have now created a new volume group vg2 that is on the entire hdisk2

type "lsvg" and you should see
rootvg
vg2

Now you are ready to add the rest. Post back when you have done this.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
done everything worked perfectly!!!!
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
Next step is to make five lv for the five filesystems on vg2. These will be approximately the same size as on your old system.

type these commands

mklv -y'lv10' -t'jfs2' vg2 25
mklv -y'lv11' -t'jfs2' vg2 62
mklv -y'lv12' -t'jfs2' vg2 77
mklv -y'lv13' -t'jfs2' vg2 63
mklv -y'lv14' -t'jfs2' vg2 38

now lets go back to smit to add the filsystems on these

smit
File Systems
Add / Change / Show / Delete File Systems
Enhanced Journaled File Systems
Add an Enhanced Journaled File System on a Previously Defined Logical Volume

on the next screen the cursor will be at
LOGICAL VOLUME name
press F4 and select lv10

for MOUNT POINT enter [/s]
for Mount AUTOMATICALLY at system restart? hit the tab key to change to YES
then hit ENTER
you should ge an OK in upper left corner

Repeat these steps 4 more times for the combination of
lv11      /s/s2
lv12     /s/seclib
lv13     /users
lv14     /user_archive

after that user F10 to exit smit

then type
mount /s
nount /s/s2
mount /s/seclib
mount /users
mount /user_archive

now type a "df" and you should see all the filesystems at about the same size as the old system.

After that, all that is left to do is to copy the data. Do you know how to do that. If not, are the system networked?

Also be aware that if you are using any purchase products like a database you will need to install it on the new system.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
what do the numbers mean after the vg2 ?? VOlume size?? Also with the new file system use the all the same on the remain HD?
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
Those are PP's, which on the 73GB disk are twice the size of those on the 36GB disk. Hence the size of about one half the number of the old system.

I Don't understand the second part of your question.

Why not just do it and see what it looks like. It is simple to remove any, or make them larger after the fact.
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
OK, at the # prompt I typed in the following: mklv -y'lv10' -t'jfs2' vg2 25
 then my prompted turned into a > I typed in the next command and did get a prompt after that
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
Are you sure you did not make a typo? Do not insert or remove any spaces, type exactly as shown.

In response to the command it should simply return the lv name it created, like
lv10

Type the following:

lsvg -o|lsvg -i -l

does it show you created any lv's for vg2?

PS: anytime you get a > prompt type a CTRL C to get back to # prompt
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
when I hit the F4 key in t Enhanced Journaled File System on a Previously Defined Logical Volume the lv10 vg gruops are not listed
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
I 'smit' when I go to view all logical volume my newly created LG are showing up as follows:

lv10-tjfs2
lv11-tjfs2
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
I see what I did wrong and was able to create the file sytems. I was able to mount /s put when I tried to mount the other file system is give me a message some like no such device .. I'm rebooting now and see if this will help
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
OK I was able to get all file system mount put I have to reboot three times to get everything to work...
0
 
LVL 20

Expert Comment

by:carlmd
Comment Utility
Now you need to delete the two "extra" lv's that were created.

Using smit, go the remove lv's and delete
lv10-tjfs2
lv11-tjfs2

You should now be left with the five lv10 to lv14 on vg2.

Do you have that?

Do you know how to copy the data?
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Done..

I'm going to close this quetions and open a new one.. :-)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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 …
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

728 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

11 Experts available now in Live!

Get 1:1 Help Now