?
Solved

Disk mirroring AIX

Posted on 2008-11-18
8
Medium Priority
?
1,409 Views
Last Modified: 2013-11-17
hi guys,
output from the lspv comands for both hdisk1 and hdisk2 is below. seems like I will have to free some space on hdisk0 to have around 500 PPS free and then mirror /t24 app directory. Can you please advise me on how to go about it. Apologies I am not an AIX expert so am asking basic questions.

# lspv hdisk0
PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      00c739e22258cb96 VG IDENTIFIER     00c739e200004c000000011c2258cc13
PV STATE:           active
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            256 megabyte(s)          LOGICAL VOLUMES:  12
TOTAL PPs:          546 (139776 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           420 (107520 megabytes)   HOT SPARE:        no
USED PPs:           126 (32256 megabytes)    MAX REQUEST:      1 megabyte
FREE DISTRIBUTION:  109..39..54..109..109
USED DISTRIBUTION:  01..70..55..00..00
# lspv hdisk1
PHYSICAL VOLUME:    hdisk1                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      00c739e2222bf6b9 VG IDENTIFIER     00c739e200004c000000011c2258cc13
PV STATE:           active
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            256 megabyte(s)          LOGICAL VOLUMES:  10
TOTAL PPs:          546 (139776 megabytes)   VG DESCRIPTORS:   1
FREE PPs:           8 (2048 megabytes)       HOT SPARE:        no
USED PPs:           538 (137728 megabytes)   MAX REQUEST:      1 megabyte
FREE DISTRIBUTION:  00..00..00..00..08
USED DISTRIBUTION:  110..109..109..109..101
0
Comment
Question by:aojha
  • 5
  • 2
8 Comments
 
LVL 10

Expert Comment

by:dfke
ID: 22992564
what is the output of lsvg -l rootvg?
0
 

Author Comment

by:aojha
ID: 22992619
Hi dfke,
output is below.
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     2       4       2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       8       16      2    open/syncd    /
hd2                 jfs2       24      48      2    open/syncd    /usr
hd9var              jfs2       1       2       2    open/syncd    /var
hd3                 jfs2       8       16      2    open/syncd    /tmp
hd1                 jfs2       1       2       2    open/syncd    /home
hd10opt             jfs2       12      24      2    open/syncd    /opt
lg_dumplv           sysdump    8       8       1    open/syncd    N/A
fslv00              jfs2       480     480     1    open/syncd    /t24
fslv01              jfs2       40      40      1    open/syncd    /swtmp
fslv02              jfs2       20      20      1    open/syncd    /imtf
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22992942
Hi,
according to the posts in your related question it will not be possible to clear enough space on hdisk0 for mirroring /t24.
You need at least ~ 480 PPs, you have ~ 420
Even if we would shrink e.g. /, /usr. sysdump or /var, which are rather big, this could never give us 60 PPs.
 
So, if you can't get additional harddisks, the only possibility to spread I/O more evenly over the hds will be splitting /t24.
 
Please tell us whether you would like to do that.
 
wmp
 
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 23002694
Hi again,
I've just created a small script to move half of your /t24 volume to hdisk0.
If you wish to use it, please do so off-shift, and make sure to have a valid backup (just in case ...)
The script should be run only once, because running it again would mean migrating the same partitions one more time, which will, of course, have no effect.
A last chance for mirroring /t24 could exist if the FS had enough free space to shrink it for ~ 60 partitions ( ~ 15 GB in your case).  Look at the FS by issuing 'df -g /t24' and examine the 'Free' column.
Please post how you wish to proceed in this case.
 
wmp
 
 
 

#!/bin/ksh
 
LV=fslv00
target=hdisk1
numlps=240
 
count=1
 
while [ ${count} -le ${numlps} ]
 
        do
                echo Partition ${count} of ${LV} being processed ...
                echo migratelp ${LV}/${count} ${target}
                count=$(($count+1))
        done
 
exit

Open in new window

0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 23002700
Sorry, the 'target' variable in line 4 must be set to 'hdisk0', of course!
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 23002708
... and the 'echo' statement before 'migratelp' (I put it there for testing) must be removed.
0
 

Author Comment

by:aojha
ID: 23009933
Hi wmp,

looks like I can free up some space in the /t24 filesystem. Currently there is only 13.3 gig available. I can possiblfe free up around 15 more gig. Can I then reduce the /t24 filesystem using smitty and then make it mirrored ?

Regards,

Atap
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 23011208
Hi,
yes, if you then have enough partitions available.
After freeing up some space in /t24, use
'chfs -a size=-15G /t24' (or use smit)  to reduce the filesystem's size.
Look at 'lspv hdisk0'. There must be at least as much free partitions as is the actual size of /t24 (use 'lspv -l hdisk1' to check /t24)
Then do
'mklvcopy -u 2 fslv00 2 hdisk0' (or use smit).
-u 2 is to allow for using 2 hdisks.
 
Please come back here (or open a new question) in case you should encounter problems.
 
Good luck!
 
Norbert (wmp)

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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…
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…
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

862 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