Regarding AIX volume manager & replacing a disk


 
Thread Tools Search this Thread
Operating Systems AIX Regarding AIX volume manager & replacing a disk
# 1  
Old 04-12-2012
Regarding AIX volume manager & replacing a disk

First a little background: I'm working with an AIX 6.1 TL05 running two mirrored SAS disks (rootvg) and four SSDs (appvg)

All four SSDs belong to appvg and are setup to mirror as follows:
hdisk4 --> hdisk6 (containing application fs)
hdisk5 --> hdisk7 (containing database fs)

A few days ago hdisk5 went kaput. In preparation for replacing that one SSD, I did the followling:

Code:
unmirrorvg appvg hdisk5
reducevg appvg hdisk5
rmdev -dl hdisk5
rmdev -dl pdisk1 (the pdisk being what hdisk5 was mapped to; I checked)

After the disk was replaced, the system found the new disk and allocated as pdisk1/hdisk5. I then did the following:
Code:
extendvg appvg hdisk5
mirrorvg appvg hdisk5

Once the mirroring was done, I was back to my original set up. The question is, was this by design or was I just lucky? Could I have ended up with:
hdisk4 --> hdisk6 --> hdisk5
hdisk7
...or is Volume Manager smart enough to notice that the lvs on hdisk7 only had one copy and should thus be mirrored to the new hdisk5?

Thanks!

-- Mike

Moderator's Comments:
Mod Comment Please use code tags, thanks!

Last edited by zaxxon; 04-12-2012 at 11:21 AM.. Reason: code tags
# 2  
Old 04-12-2012
mirrorvg will follow the settings for the LVs to be mirrored. So if they are set to "strict", at least every PP of the mirrored LP will be placed on a different PV in a VG. If you have more than 2 PVs in a VG they can be scattered on PVs you did not intend to use. Ie. it could happen that if disks on one side get broken, it could hit both mirror copies of the LP which is what should be avoided at all costs and what you are trying to do.

Code:
# lslv root_lv| grep EACH
EACH LP COPY ON A SEPARATE PV ?: yes

But to make sure there is no mixup of PPs belonging to different mirrored LVs from the same VG, you can check this placement with for example:
Code:
# lsvg -M rootvg

You see things like:
Code:
hdisk1:280      hd4:6:2

From the man page of lsvg, specifically -M:
Code:
PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]]

(PPstate is not displayed here)
So if you see the same LV name with :1 and :2, which is the copy number on the same PV (hdisk1), then you have a problem - it would mean the allocation of LP copies is not strict for that LV. If you have LP copies of one LV on the same PV as that from another mirrored LV, then you have a problem too, as from your description you want to have both LV copies on separate disks, ie. each LV mirror has his dedicated mirror disk/PV.
To rearrange the placement you will have to use the command migratelp to move the LPs to the correct PV (note that the order of arguments/parameters of migratelp is different to the order you get from the output of lsvg -M!).
That's a lot of work so a script scanning for wrong placement and then migrating to free PPs is a bit of work, but helpful.

By this you can also check if the placement is/was as wanted, before you changed the disk.

Last edited by zaxxon; 04-12-2012 at 11:59 AM.. Reason: rearranged and added info, spelling etc.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to extend a disk in veritas volume manager in veritas cluster?

Hi Experts, I wanted to extend a veritas file system which is running on veritas cluster and mounted on node2 system. #hastatus -sum -- System State Frozen A node1 running 0 A node2 running 0 -- Group State -- Group System Probed ... (1 Reply)
Discussion started by: Skmanojkum
1 Replies

2. Solaris

Convert from raw disk to solaris volume manager disk

I have a solaris 10 system configured using NetApp as its storage, and the file systems are already configured as you can see from the example below: root@moneta # df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 9.8G 513M 9.3G 6% /... (4 Replies)
Discussion started by: fretagi
4 Replies

3. Solaris

Convert from raw disk to solaris volume manager disk

I have a solaris 10 system configured using NetApp as its storage, and the file systems are already configured as you can see from the example below: root@moneta # df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 9.8G 513M 9.3G 6% / ... (0 Replies)
Discussion started by: fretagi
0 Replies

4. Solaris

root disk mirroring in solaris volume manager for solaris 10

Need a procedure document to do "root disk mirroring in solaris volume manager for solaris 10". I hope some one will help me asap. I need to do it production environment. Let me know if you need any deatils on this. Thanks, Rama (1 Reply)
Discussion started by: ramareddi16
1 Replies

5. UNIX for Dummies Questions & Answers

VERITAS Volume Manager - mirror a disk/volume

I have a machine (5.10 Generic_142900-03 sun4u sparc SUNW,Sun-Fire-V210) that we are upgrading the storage and my task is to mirror what is already on the machine to the new disk. I have the disk, it is labeled and ready but I am not sure of the next steps to mirror the existing diskgroup and... (1 Reply)
Discussion started by: rookieuxixsa
1 Replies

6. Solaris

Veritas Volume Manager: disk "failed was"

Hello there, I'm going to describe a situation I've got here... feel free to ask away questions and I'll provide what I can if it'll help me get this answered! When I do a vxdisk list, I see a disk that VxVM calls "disk4" that is listed as "failed was: c1t9d0s2". When I do a format, I can go... (3 Replies)
Discussion started by: kitykity
3 Replies

7. UNIX for Advanced & Expert Users

Veritas Volume Manager question (Disk layout with 4 plexes)

I am trying to build a veritas volume similar to an existing volume on another server. The output on source server is: usbtor12# vxprint -hrtg appdg v anvil_sqlVOL - ENABLED ACTIVE 629145600 SELECT - fsgen pl anvil_sqlVOL-01 anvil_sqlVOL ENABLED ACTIVE 629145600... (3 Replies)
Discussion started by: momin313
3 Replies

8. Solaris

Need some E-Labs for solaris 10 & veritas volume manager

Hello friends, I need to test some of the solaris 10 concepts and veritas volume manager.i want to know ,where i get the testing labs or E-labs(online) for this practice.i ready to pay for this labs.pls kindly help me to get the details or website names...Thanks in Advance -Jay (6 Replies)
Discussion started by: rjay.com
6 Replies

9. Filesystems, Disks and Memory

Volume Manager; importing a disk

System: Alpha with Tru64 5.1b Disk under LSM (Logical Storage Manager; essentially v2 of Veritas VxVM) control was generating disk errors. The disk was timing out a lot and generating a few disk errors. DBAs couldn't keep the oracle instance up on that node of the cluster. I contacted HP and got... (1 Reply)
Discussion started by: BOFH
1 Replies

10. Solaris

Disk Mirror in Solaris 9 via Solaris Volume Manager

Hello, I am trying to do mirror in solaris 9. I have total 0-7 disks 4 5 6 7 0 1 2 3 Drive 0 and Drive 4 = Boot Drives Need to Mirror following drives. Drive 1 and Drive 5 = Need to mirror Drive 1 was mounted on: /prod1, /prod2, /prod3, /prod4, /prod5. Then i... (3 Replies)
Discussion started by: deal732
3 Replies
Login or Register to Ask a Question