From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Merrell Newsgroups: gmane.os.tru64.managers Subject: Summary: Recovering LSM/AdvFS-based data from a failed system Date: Thu, 04 Jul 2002 10:44:10 -0700 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1025805836 14594 127.0.0.1 (4 Jul 2002 18:03:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 4 Jul 2002 18:03:56 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17QAxP-0003nF-00 for ; Thu, 04 Jul 2002 20:03:55 +0200 Original-Received: (qmail 2748 invoked by uid 5); 4 Jul 2002 17:44:24 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 2740 invoked from network); 4 Jul 2002 17:44:24 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 4 Jul 2002 17:44:24 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GYQ00CY8JXZJK@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 04 Jul 2002 13:44:24 -0400 (EDT) Original-Received: from carney.netuser.net (carney.netuser.net [131.161.248.40]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GYQ00IFAJXMZZ@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 04 Jul 2002 13:44:11 -0400 (EDT) Original-Received: from supersax (supersax.netuser.net [131.161.248.41]) by carney.netuser.net (8.11.6/8.11.6) with SMTP id g64Hi4S25773 for ; Thu, 04 Jul 2002 10:44:04 -0700 (PDT) Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Xref: main.gmane.org gmane.os.tru64.managers:840 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:840 My original problem was: >I have a Tru64 V5.0A system that ran LSM mirrored drives and the system >failed. I have another Tru64 V5.0A system freshly installed on which I've >connected one of the old drives and I'd like to mount the old /usr and >/var partitions (AdvFS format) to recover data created since the last >back-up. I received helpful tips from several folks, but the best fit for my specific problem came from DEC/Compaq/HP's Tim Mark: >LSM only supports moving entire diskgroups between systems, not >individual disks and/or volumes. > >For encapsulated partitions however there is a simple procure to >"unencapsulate" the data and allow it to be accessed on another >system. Please note that this is a one-way transition and that >the disk cannot be brought back to the original system and used >under LSM without a fair amount of reconfiguration. > >From the LSM side all one needs to do is: > >1. Make sure that LSM is not running on the new system. Tim and I exchanged further messages to explain this to me. His concern was that LSM would mount the moved drive which would prevent the partition change from LSMpriv to AdvFS. I tried it both with and without LSM installed and configured on the new system and it didn't seem to matter either way since my new system had no prior knowledge of the drive. >2. Remark the partitions as in-use by AdvFS instead of > the old LSM usage (LSMnoprv). For example: > > # disklabel -F -s /dev/rdisk/dsk3g AdvFS > # disklabel -F -s /dev/rdisk/dsk3h AdvFS > >I will leave it to the AdvFS experts to recommend a procedure for >bringing the domains back under AdvFS control but here is a procedure >that has worked for me: > >3. Make the new domain directories: > > # mkdir /etc/fdmns/old_usr /etc/fdmns/old_var > >4. Create the device links > > # ln -s /dev/disk/dsk3g /etc/fdmns/old_usr/ > # ln -s /dev/disk/dsk3h /etc/fdmns/old_var/ These last two lines instead needed to be: # ln -s /dev/disk/dsk3g /etc/fdmns/old_usr/usr # ln -s /dev/disk/dsk3h /etc/fdmns/old_var/var (see below for more on this.) >5. Make the new mount points > > # mkdir /old_usr /old_var > >6. Mount the domains > > # mount old_usr#usr /old_usr > # mount old_var#var /old_var Even after all of this, I was still unable to mount the access points. I got an error message indicating that the mount points did not contain valid AdvFS volumes. I was very reluctant to use anything that needed write access to the drive for fear of corrupting it, but ultimately ended up running /sbin/advfs/advscan to rebuild the mount point data in /etc/fdmns (-r option) and to reconcile the drive's g & h partitions (-f option). I suspect that this second step was the one that really mattered. I suspect that manual creation of the directory entries probably would have worked if I had done the advscan -f step, too. One extra tidbit I discovered was that for the disk to mount, I HAD to use the same names for the filesets as originally used. Specifically, the advscan created entry for /etc/fdmns/domain_dsk3g/dsk3g had to be modified to /etc/fdmns/domain_dsk3g/usr in order for it to mount. When I tried to create similar entries on my own (as noted in Tim's suggestion #4 above) before running advscan, it didn't work. advscan cleaned up something additional and that appeared to be the key. I was able to completely recover both the usr and var partitions off of the drive once it mounted. Thanks Tim Mark, Pat O'Brien (mitidata.com), and Mahendra Rajah (Univ of Regina, Sask) who provided information and words of encouragement and to this great list! Greg