From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,5f5de11a8ca5873c,start X-Google-Attributes: gidfa528,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "Jack Estes" Newsgroups: comp.unix.tru64 Subject: Solution to trashed cluster (first described 7 posts down) LONG Date: 24 Oct 2005 22:21:15 -0700 Organization: http://groups.google.com Message-ID: <1130217675.680187.155950@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 192.234.167.242 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1130217681 2262 127.0.0.1 (25 Oct 2005 05:21:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 25 Oct 2005 05:21:21 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=192.234.167.242; posting-account=DgUiFA0AAAD_NpTN61HHrmTvRPT0DzjO Xref: g2news1.google.com comp.unix.tru64:378 Howdy Managers, First, my thanks to Tom Smith from HP and Adam Price who responded with very helpful information for my trashed two-node 5.1a cluster. After a lot of wasted effort trying to recreate CDSLs on the cluster_root partition, I gave up and installed fresh with 5.1B-3. All of the important AdvFS domains were perfectly intact out on the SAN so they were just reattached with advscan once I was back up and patched. It worked out great because none of the Oracle configuration files were on the member or clusterwide root partitions, but rather totally inside the "data" AdvFS domains on the SAN. This was the "swatting-flies-with-bricks" approach, of course. With time and the proper backups, it was likely I could have recovered the cluster but I had neither. Perhaps just as an academic exercise, and maybe to aid someone Googling for help on their own trashed cluster, here's what I figured out I could have done. My apologies if this is obvious to every other TRU64 manager on the planet but it wasn't to me. 1). Long before any of this ever happened, I should have made backups of each member's boot partition. Here's a convenient way to get one, although you obviously need enough free space on the clusterwide /var partition: # vdump -0Df /var/cluster/members/member1/boot_part_vdump \ >/cluster/members/member1/boot_partition You get something like this: path : /cluster/members/member1/boot_partition dev/fset : root1_domain#root type : advfs advfs id : 0x434c55ea.00004fe5.1 vdump: Date of last level 0 dump: the start of the epoch vdump: Dumping directories vdump: Dumping 70181654 bytes, 3 directories, 21 files vdump: Dumping regular files vdump: Status at Mon Oct 24 23:30:07 2005 vdump: Dumped 70181654 of 70181654 bytes; 100.0% completed vdump: Dumped 3 of 3 directories; 100.0% completed vdump: Dumped 21 of 21 files; 100.0% completed vdump: Dump completed at Mon Oct 24 23:30:07 2005 Repeat as necessary, incrementing the member # to include all of your nodes. Maybe do this weekly or monthly via cron depending upon how often your member boot filesystems change (patches, new hardware, whatever). These aren't very big and they take almost no time to do. Now, make sure your clusterwide /var filesystem is being backed up to some kind of removable media mountable by at least one member node, since you could conceivably trash your cluster enough to not have access to a network backup service like Netbackup. Now let's skip ahead in time to some point when either through hardware failure, corruption, or in my case, a clueless user who knew the root password; one or more of your member boot disks are trashed. ***This whole procedure assumes your member boot disks and the clusterwide root partition are on some kind of shared bus (in my case a couple of HSG80s). If your member boot disk is on a private bus, you won't be able to fix it from another bootable cluster member.*** 2). Now, let's say the member boot disk for member1 is dsk1 and it's trashed. Further, that you either already had a usable disk or added a new disk to the cluster (hwmgr -scan scsi or whatever works for your bus) and it's device name is dsk3. Because the original boot disk is dsk1 and you want to now use dsk3 as the member boot disk after the repair, you have to edit the member's /etc/sysconfigtab to use this new disk. Sounds like a catch-22, right? well almost... 3). Since your member boot disks were all on a shared bus, you just log on to any working cluster node and give this a whirl: a). clu_get_info -m 1 This ensures your member is truly offline. You don't want to trash a perfectly good node, do you? Change the "1" on the end or equal whatever member # you're interested in fixing. b). /usr/sbin/clu_bdmgr -c dsk3 1 This configures dsk3 as the boot disk for member 1. Write down the output of this command, we'll need it later. c). mount root1_domain#root /mnt (or wherever you like) Now the new member1 boot disk is read/writable by your working cluster nodes. NOW THE COOL PART: d). vrestore -xf /var/cluster/members/member1/boot_part_vdump -D /mnt Boy, those backups sure came in handy didn't they? You just restored the member's boot partition to the new member boot disk. But we're not quite done yet. The backup contains a unusable /etc/sysconfigtab. It's got inaccurate info for the swap partition, and the major and minor numbers for the disk. SO... e). vi /mnt/etc/sysconfigtab Now, edit the swapdevice entry in the VM section to read "dsk3b" and change the cluster_seqdisk_major and cluster_seqdisk_minor entries to be whatever they were when you did step b. f). /usr/sbin/clu_bdmgr -h dsk3 /mnt/etc/clu_bdmgr.conf This just restored the CNX partition to dsk3h. I think this uses the CNX info from the cluster node you issued the command from. These partitions are normally identical on all the nodes anyway. Regardless, I can't think of a reason why it would be bad to restore this partition in this manner. You might be able to backup and restore good h partitions ahead of time with clu_bdmgr but I can't remember how and I'm too lazy to look it up. You're done! Everything your member could do when you took the backup way back in step 1, it can do now (please, no Beavis & Butthead "you said 'member'" jokes). Of course you need to unmount /mnt and change the bootdef_dev flag to use the new disk, then boot it into the cluster. I'd be pleased if anyone could critique this procedure or provide corrections. As I haven't actually performed this on a real multi-member cluster, YMMV. Jack ______________________ Jack M. Estes II, Ph.D. Aegis Technology Partners, LLC 1000 E. Main Street Plainfield, Indiana 46168