Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mirroring whole drive 2

Status
Not open for further replies.

SeanAIX430

Technical User
Jun 29, 2001
189
Hello, I'm a windows guy, but have one IBM p5 that I just got in that I'm using to replace my old e20. I asked that the 2 disks be in a mirrored Raid. I don't think the server has a raid card in it and that AIX will be doing the mirroring. In searching on here I've found that most people mirror the rootvg, but I'm not sure that's what I need. I just want the whole drive mirrored to the other drive, I'll need a bunch of step by step instructions if I can find one of you that is patient enough to deal with my newb-ness. Thanks a lot!
AIX 5.3 is loaded on at least one drive, and I can console or telnet into it.
 
if
lsvg -p rootvg
shows only hdisk0 in rootvg

if
lspv
shows hdisk0 in rootvg and hdisk1 not assigned to any volumegroup

then
extendvg rootvg hdisk1
mirrorvg -c2 -m rootvg hdisk1
bosboot -a -d /dev/hdisk0 -l /dev/hd5
bootlist -m normal hdisk0 hdisk1
shutdown -Fr

Warning: only reboot machine if bosboot command doesn't give any errors or you may have a machine that won't start up anymore.

Note: the shutdown/reboot is necessary because on a two disk mirrored rootvg, the quorum rule is turned off, but you need to recycle the volume group (varyoff/varyon) and for rootvg that can only be done by rebooting the server.

Also

HTH,

p5wizard
 
This is the info I get:

# lspv
hdisk0 none None
hdisk1 00071db220043602 rootvg active
# lsvg -p
0516-992 lsvg: Illegal combination of command line options.
Usage: lsvg [-o] [[-L] -n PVname]
lsvg [-L] [-i] [-M | -l | -p] VGname...
Lists the characteristics of a volume group.
# df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 131072 118312 10% 1767 7% /
/dev/hd2 1441792 48272 97% 31950 70% /usr
/dev/hd9var 131072 116768 11% 476 2% /var
/dev/hd3 131072 129488 2% 15 1% /tmp
/dev/fwdump 131072 130724 1% 4 1% /var/adm/ras/platform
/dev/hd1 131072 130680 1% 11 1% /home
/proc - - - - - /proc
/dev/hd10opt 262144 44824 83% 2594 21% /opt
 
extendvg rootvg hdisk0
mirrorvg -c2 -m rootvg hdisk0
bosboot -a -d /dev/hdisk1 -l /dev/hd5
bootlist -m normal hdisk1 hdisk0
shutdown -Fr


lsvg -p rootvg

Regards,
Khalid
 
# lspv -p rootvg
0516-306 : Unable to find rootvg in the Device
Configuration Database.
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 546 522 109..104..91..109..1
09
hdisk0 active 546 522 109..104..91..109..1
09
#

I was worried for a second there, and wondering how it booted if I had killed the rootvg.

So am I now good to go? If I were to pull one drive they both have the OS and from here out my data will be mirrored? If so thanks bunch!!
 
just a query

in the command bosboot -a -d /dev/hdisk0 -l /dev/hd5
whats the "-l /dev/hd5" for?

 
This is to create a boot logical volume (BLV) on the hdisk0 so you can boot from hdisk1 or hdisk0

Regards,
Khalid
 
Hi khalidaa

thanx , i know its fot booting from 0-1 but the last bit
i was referring to was "/dev/hd5"
why put this in?

thanx

sb
 
/dev/hd5 is the BLV

and because hdisk0 and hdisk1 are mirrored so you have to explicitly write a new BLV to hdisk1 as well! IMHO I think it can be done without this.

Code:
How to mirror a boot logical volume
Each hard drive is a potential boot device. The bosboot command creates a bootable image in the BLV (boot logical volume), which is used to boot AIX. The first block (sector) on the disk is called the boot block or IPL record. In addition, NVRAM contains a list of boot devices which can be specified by the bootlist command. The boot device can be changed by using the bosboot and bootlist commands. The format for these commands follows:

bootlist -m normal hdisk0 for normal operations
bootlist -m service fd0 rmt0 hdisk0 for service operations
bosboot -u -d /dev/hdisk0 bootable image in BLV on hdisk0

The bosboot command puts a bootable image in the BLV that is used to boot the system. Also, the bosboot command puts the physical sector number of the beginning ofthe bootable image on this disk, into the boot block of the disk. Since only one PSN (that of the primary copy of the BLV) is stored, therefore all copies of the BLV must reside on the SAME physical partitions of their respective devices.

An example of a mirrored BLV with 3 copies follows:

blk XXX, where XXX is the starting physical sector number in hex, within the specified physical partition (PP) number.

Copy 1 Copy 2 Copy 3 
hdisk0 hdisk1 hdisk2 
LP 1: PP 1(blk 200 ) LP 1: PP 6(blk C200) LP 1: PP 4(blk 8200) 
LP 2: pp 2(blk 2200) LP 2: PP 7(blk E200) LP 2: PP 5(blk A200) 

To use hdisk0 as the boot device, specify the following: bosboot -a -u -d /dev/hdisk0

The IPL record on hdisk0 indicates the boot image starts at PSN (physical sector number) 200. Now, the system can be booted using drive hdisk0.

To use hdisk1 as the boot device, issue the following: bosboot -a -u -d /dev/hdisk1

Because the bosboot program only looks for the PSN of the first copy, the IPL record indicates the starting PSN for the boot image as 200 instead of the correct C200. Attempts to boot with hdisk1 as the boot device will fail.

To mirror the BLV and get around this problem, do the following. Insure that all the copies occupy the same physical partitions on each device. It is not important which partitions the BLV uses, but all copies must use the same relative positions on the disk device. So, the configuration should be:

Copy 1 Copy 2 Copy 3 
hdisk0 hdisk1 hdisk2 
LP 1: PP 10(blk 20200) LP 1: PP 10(blk 20200) LP 1: PP 10(blk 20200) 
LP 2: pp 11(blk 22200) LP 2: PP 11(blk 22200) LP 2: PP 11(blk 22200) 

To move individual partitions around and keep them in sync, use the lmigratepp command.

To find available physical partitions on a disk, use lspv -m hdisk? Take the output of this command and choose two physical partition that are allocated/free on all the target disks and use these partitions to create your BLV image on multiple disk drives.

If your mirroring, make sure that PTF U407433 is installed. This allows you to disable the QUORUM feature. When one disk dies, the other disk will take over without checking to see if the quorum is still meet. (chvg -Qn rootvg)

When a write is performed to a disk containing mirrored copies, all copies are written simultaneously in parallel mode, and each is written sequentially in sequential mode.

Should the system crash while parallel writes are being performed to mirrored copies of the data, inconsistencies may exist between the data which was actually written to the different copies. To protect against this, the Mirror Write Consistency Cache was developed to write a record to the disk each time a mirrored write is in progress, so that when the system is rebooted, a record will show that possible inconsistencies may exist, and the data from the first physical partition is rewritten to all other physical partition copies. However, by enabling the Write Consistency Check, the penalty you pay is having to do an extra read/write when doing I/O. When this feature is disabled, if the system goes down because of power failure or system crash, you will need to MANUALLY perform a syncvg when the system is rebooted.

The jfslog is used to keep a record of file system metadata (superblock, inode, directories, etc) and also ensures the integrity of the file system.

The impact of losing the PV containing the jfs log will be quite serious. All file systems using that log will become unavailable.


Regards,
Khalid
 
I have another issue now. There is no parallel port so I can't directly connect my old greenbar printer that prints our checks etc. Ibm is saying there isn't even a parallel card I can install, and that possibly the serial ports that are on there aren't true serial ports and are just for consoling in(why would there be more than one port for that?). Anyhow I'm hoping someone already has a solution out there for getting a parallel printer to work with a p52a 9131 with AIX 5.3 on it? Thanks
 
Is there an external JetDirect box with a parallel adapter available? If so, you could switch to IP-based printing.
 
spamly is right. Most of our printers in my company was shifted to use an external JetDirect box and use IP-based Printing.

By the way, it would have been better if you start a new thread with your case. You would have more attention i beleive!

Regards,
Khalid
 
SeanAIX430 (TechnicalUser) 28 Jun 07 12:45
# lspv -p rootvg
0516-306 : Unable to find rootvg in the Device
Configuration Database

lspv is the command to look up pv information.
rootvg is a vg, it's not a pv.
therefore, this command will failed. no need to worry.

lsvg -p rootvg // can show you all pv in rootvg
 
use network printer is a lot simpler.
to set it up:
1.a printer on network can communicate with your aix server.
2.add that printer's IP and printer name in your aix server's /etc/hosts
3. download from the printer website for the aix driver and install it to your aix server. if no driver is provide, you can try to use the generic driver
4. define printer in aix server.
 
Thread title: Mirroring whole drive.

What's with all this printer stuff ! ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top