LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 08-03-2004, 01:20 PM   #1
papajohns
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Rep: Reputation: 0
steps to adding disk in aix 5.2


hello....

i come from the solaris/redhat world, and aix is plainly confuses me when it comes to disk management..


i read through a couple of threads in here concerning disk management and i have a vague understanding of how aix manages disks and volumes..


is there a step-by-step guide of how to add and configure additional disks?

i tried search on google but came up empty..

basically have a disk hdisk1

and i want to let say partition it into 1 big partition and mount it at say.. /opt


how do i do that?

theres no like format and partition commands like in solaris/linux, and i'm not exactly sure how to use smitty to accomplish that task..

any help would be great.

thanx
 
Old 08-03-2004, 01:35 PM   #2
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
smitty vg
add a volume group
choose the disk hdisk1

I would not give the whole disk to a single filesystem, I would give, let's say, 100 megs or 2gig, what you want. And see how it's used, increase it if necessary. And let the free space free for other filesystems you will probably need to create, like /users/zorba4/private/verboten.

First look how many space you have :
lsvg # to see the name of all the volume groups
lsvg myvg # and look how many partitions are free.

smit lv
add a logical volume
give the name of the volume group, let's say users
exit from smit

smit fs
add a filesystem
add a filesystem on a previously defined logical volume
add a journaled filesystem
choose the logical volume you just created (users I gess)
choose the mountpoint (let's say /users)

By the way, I would say don't create a filesystem named /opt if you already have one, it will hide your files in the previous /opt fileystem.

Hope this helped, if I was not clear or not enough step-by-step please tell me.
Zorba
 
Old 08-03-2004, 02:03 PM   #3
papajohns
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
i need to put it as one big partition for db testing purposes..we just going to dedicate the disk to the test db so thats why we giving it as big as possible
 
Old 08-03-2004, 02:42 PM   #4
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
Zorba's instructions are excellent. Having used Linux and AIX a lot myself, I think the problem might be that you are expecting things to be more complicated than they really are on AIX.

What you're going to do is
1. Create a volume group (which is a bunch of 1 or more disks lumped together).
2. Create a logical volume : a box to put the filesystem into
3. Create a filesystem in the logical volume.
4. Mount the filesystem.

You can actually miss out step 2 (but not with the procedure below, as the crfs command is a bit different if you do miss it out)

Here is the same thing from the command line :

Code:
mkvg -f -y testvg -s 64 hdisk1
lsvg testvg | grep "TOTAL PP"  
           Make  a note of the number of PPs (not the MB number).  
mklv -y testlv testvg <NUM>
            Where <NUM> is one less than the total PPs (e.g. if total PPs is 1000, <NUM> is 999)

Now here comes the nasty command
crfs -v jfs -a bf=true -d'testlv' -m'/test' -A''`locale yesstr | awk -F: '{print $1}'`'' -p'rw' -t''`locale nostr |\
awk -F: '{print $1}'`'' -a nbpi='4096' -a ag='64'
            The only bit you need to amend in this command is the mount point /test.
Finally remember to mount the filesystem.
mount /test
 
Old 08-03-2004, 03:56 PM   #5
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
I fully agree with iainr, his alternate way is very efficient.
By the way, papajohns, if you do have several physical disks, dedicating a single big disk for database test could be not fully optimized.
Most of database love having several disks in order to spread I/O's : one disk for the data, one disk for the indexes, one disk for the logs, one disk for the rollback segments...
So, maybe you should consider creating sevral small filesystems instead of a big one. Morever, if you only want to test, it could be better learning how to use several filesytems, in order to be able to optimize a real-life situation where you have to spread data across several physical disks.
I know, it's very far away from the simple question "how to create a filesystem", but's its a basick trick in database life.
 
Old 08-03-2004, 04:00 PM   #6
papajohns
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
i know about the problems with 1 disk for performance issues on dbs..our test is just for proof of concept., not performance..

but thanx for the the tips for the disk partitioning..ill give it a shot..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[AIX 4.3] Adding a serial tty with smitty MD3 AIX 9 01-21-2006 05:48 AM
Need basic disk copy routine for AIX 3 tekmeister AIX 5 11-03-2005 04:04 PM
"Normal" Steps for Adding a DVD/CD-RW Drive CooManChu Linux - Hardware 3 01-08-2005 09:59 AM
Adding a disk to 7044 170 AIX 5.2 gmccormack AIX 2 05-20-2004 03:21 PM
Knoppix to hard disk: complete steps jfchui Linux - Newbie 2 04-17-2004 04:20 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 10:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration