From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079085416173.tru64-unix-managers.marc@archive.invalid> From: "richard n. frank" Date: Wed, 10 Nov 1999 15:54:28 +0000 To: tru64-unix-managers Subject: SUMMARY:move advfs disk to new system X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079085416173 Many thanks for the excellent help to: "Bruce B. Platt" alan@nabeth.cxo.dec.com Oisin McGuinness "Edward J. Branley" "Sean O'Connell" I have appended the text of their replies because there is a wealth of information there. As it turned out, I had an easy situation because I was dealing with a simple configuration. To make a long story short, all I needed to do was shut the workstation down, install the ADVFS disk with an appropriate SCSI id # and boot up. The OS made the special device files on the way up. Then: cd /etc/fdmns ; mkdir home_domain ; cd home_domain ; ln -s /dev/rz2g (the new disk is SCSI id 2 and g is the advfs partition). I did an /sbin/advfs/advfscan rz2 but I think that was superfluous. Then mount -t advfs home_domain#home /home to mount the disk. This command associated "home_domain" to rz2g per info in /etc/fdmns/... . Than modify /etc/fstab with the disk info like on the old system. This is truly a great group! Thank you all. rich frank rnfrank@llnl.gov ------------------------------------------------- 2 nov 1999... ->Hello all, -> I am weak on advfs issues and could use some advice. I need to ->move an existing disk drive that is configured as "home_domain" to ->a new system that only has ufs disks at present. I want to be sure ->NOT to overwrite or initialize the "home_domain" disk because it has ->files that need to persist. -> What would be the steps to do that? -> Thanks very much. -> rich frank -> rnfrank@llnl.gov > Q:clarification of move ADVFS disk question > Let me make it clear that the new system has only 1 disk drive > and it has the / and /usr partitions in UFS file system. I want > to take a disk drive from an old system and physically install it > in the new system as the second disk drive. This disk should still > be referenced as /home_domain (as in the old system). -> From: "Bruce B. Platt" Subject: Re: Q: move advfs disk to new system Pretty simple: 1. Make sure you get a listing of ther file domains and sets on your old system 2. i.e., showfsets home_domain 3. get a listing of /etc/fdmns, i.e.: ls -lR /etc/fdmns |more and copy all the stuff down, most importantly the links, and the directory names, etc. 4. move the disk to your new system. 5. Make the directory name for the domain you want and the link to the device. 6. try the showfsets home_domain 7. mount -t advfs home_domain#set 8 edit /etc/fstab. I happen to have a home_domain#home on one of my systems. Here's what the above data from it looks like: [root@comport3:/]$ showfsets home_domain home Id : 37303c10.0007d930.1.8001 Files : 6328, SLim= 0, HLim= 0 Blocks (512) : 598878, SLim= 0, HLim= 0 Quota Status : user=off group=off [root@comport3:/]$ ls -lR /etc/fdmns |more total 64 -r-------- 1 root system 0 Apr 22 1999 .advfslock_fdmns -r-------- 1 root system 0 May 5 1999 .advfslock_home_domain -r-------- 1 root system 0 Apr 22 1999 .advfslock_root_domain -r-------- 1 root system 0 May 4 1999 .advfslock_tempusr -r-------- 1 root system 0 Apr 22 1999 .advfslock_usr_domain -r-------- 1 root system 0 Apr 22 1999 .advfslock_var_domain drwxr-xr-x 2 root system 8192 Sep 15 14:21 home_domain drwxr-xr-x 2 root system 8192 Sep 15 14:21 root_domain drwxr-xr-x 2 root system 8192 Sep 15 14:21 usr_domain drwxr-xr-x 2 root system 8192 Sep 15 14:21 var_domain /etc/fdmns/home_domain: total 0 lrwxrwxrwx 1 root system 9 Sep 15 14:21 rz9c -> /dev/rz9c So, if I were to move my disk with home domain to a new system, and the scsi-ID of the disk was 3 on the new system, I'd want to make a link of rz3c to /dev/rz3c in the /etc/fdmns/home_domain directory. I would use rz3c because I tend to use the entire disk for domains when I can. If your advfs domain is on a partition other than c, then just use the proper partition. Regards Bruce B. Platt, Ph.D. Comport Consulting Corporation 78 Orchard Street, Ramsey, NJ 07446 Phone: 201-236-0505 Fax: 201-236-1335 bbp@comport.com, bruce@ bruce.platt@ OR, bruce@bbplatt.com ------------------------------------------------------------------- From: alan@nabeth.cxo.dec.com To: "richard n. frank" Subject: Re: clarification of move ADVFS disk question First, make sure the target system has AdvFS in its kernel. Look for "options MSFS" in the kernel configuration as the best clue. I would guess that the kernel namelist would also have a lot of symbols prefixed by "msfs" when it does have AdvFS support and only a few when it doesn't. Next, physically move the disk. For direct connect SCSI all you need is an avaliable ID on the system's SCSI bus and a way to connect the disk. For HSZ connected disks it is basically the same, but you'll have to add the disk and unit on the target controller. Don't use the INIT command. For the backplane array controllers such as the KZPSC or KZPAC, you'll have to check the controller documentation to see if you can move a drive without reinitializing it. For direct SCSI and HSZ connected devices you don't need to rebuild the kernel if the disk is being added to an existing adapter. I think you do need to rebuild the kernel for a new logical unit on the backplane array controllers. If you have to unterminate the SCSI to add the device, shutdown the system, or least stop all I/O on that SCSI bus. It is fairly safe to add StorageWorks SBB to a shelf while the system is live. For MSCP connected storage, you'll also probably have to rebuild the kernel configuration file, but it depends on how prepared the configuration is for new devices. For SCSI devices you can update the driver's device tables using the scu(8) command and "scan edt". Don't put a disk at an ID previously used by a non-disk (tape, optical media changer, etc). For those cases, reboot. Once the driver finds the device you can use MAKEDEV to create the special files. For all the V4 versions this will be done automatically on a reboot. If doing it by hand, you can construct the device name with: rz# or rz[b-h]# where the '#' in rz# is the unit number found from: # = (bus * 8) + target-id The other type of name is used for HSZ connected disks that aren't at LUN 0. The logical unit number is represented by a letter correponding to the LUN; b-h: b = LUN 1, c = LUN 2 and so on. The unit number calculation is the same. For V5 systems there are commands to create the special files for new devices. I've found hwmgr pretty easy to use. Once you have the special files, use advscan to create the link structure for the domain. This will remove any risk of overwriting the domain with a new one, which IS what mkfdmn will do. Stay away from mkfdmn. Once the domain is created, you can mount the filesets. ------------------------------------------------------------------------------ Subject: Re: clarification of move ADVFS disk question From: Oisin McGuinness 1. Backup the old disk, home_domain. 2. Repeat step 1 on another tape. 3. Verify the backup worked. 4. On the old system, ls -l /etc/fdmns/home_domain You should see something like rz1a -> /dev/rz1a The number and partition number can vary. If you see "re" instead, your disk is on a Raid array. Get Raid help first. If you see something like rootdg.vol01@ -> /dev/vol/vol01, your disk is part of an LSM volume. Get LSM help first. Write down this information. Check the other partitions on the disk, e.g, if rz1, disklabel -r rz1 and look for "swap" or "database" or "advfs" in the appropriate place. If you see entries that you don't know about, you can't move the disk... The best case is if the partition used for your domain is "c", that means nothing else if using the disk. 5. On the new machine, make sure AdvFS support is configured into the kernel; the kernel config file (/sys/conf/MACHINENAME) should contain a line 'options MSFS'. If not there, add either manually or otherwise; you may need to add the appropriate software subset (OSFADVFSBIN425 on 4.0D) is on the machine first. If needed, rebuild kernel, install, reboot. 6. Old machine: unmount /home_domain; remove entry from /etc/fstab (saving a copy), down the machine, take the disk off. 7. New machine: down the machine, add the new disk (make sure SCSI id doesn't conflict; you don't need to use same ID as on old machine), up it, watch boot messages to check SCSI id and visibility of disk. 8. New machine: Assume new id is 2. Do 'disklabel -r rz2' to make sure you can see the disk, and that the disklabel hasn't been corrupted. 9. New machine: *******NB: You do not want to run mkfset here; that would kill the fileset on the disk**** The first 4 steps are essentially the same as mkfdmn; that is safe; I personally prefer to do the steps by hand. cd /etc/fdmns mkdir home_domain cd home_domain ln -s /dev/rz2c # Assuming "c" partition on disk 2. cd / mkdir home_domain edit /etc/fstab, adding a line like that on the old machine mount /home_domain That's it! Oisin McGuinness Sumitomo Bank Capital Markets 277 Park Avenue New York NY 10172 USA (212)-224-4913, email: oisin@sbcm.com ----------------------------------------------------------------------------- From: "Edward J. Branley" 1. move the disk and make sure the system recognizes it 2. make sure AdvFS is installed and is in your kernel. if not, do a setld and a doconfig to deal with that. 3. identify the device file for the drive. 4. go into /etc and mkdir /etc/fdmns if it is not there already 5. under /etc/fdmns, make a dir called home_domain 6. In /etc/fdmns/home_domain, make a symbolic link to the /dev/rzwhatever file that is the block-special device for the disk. 7. try mounting a fileset in home_domain Edward J. Branley elendil@yatcom.com, lawfive@hotmail.com Home Page and PGP Public Key at http://www.yatcom.com/mintir ------------------------------------------------------------------ From: "Sean O'Connell" Subject: Re: clarification of move ADVFS disk question Oh, that! 1) make sure the kernel on the new machine has options MSFS (mega safe filesystem) in it (It usually does by default) 2) on the old box (as root) cd /etc tar cf /tmp/dmns.tar fdmns/home_domain 3) on the new machine cd /etc tar xf dmns.tar 4) if the scsi target can be made the same rzX{c,d,e,f,g,h} (keep X the same) just plunk the drive in the new box, add the mountpoint and fstab entry from old 5) if not, you'll need to delete the current symlink to rzX{c,d,e,f,g,h} and create a symlink to /dev/rzY{c,d,e,f,g,h} just plunk the drive in the new box, add the mountpoint and fstab entry from old Sean O'Connell Email: sean@stat.Duke.EDU Institute of Statistics and Decision Sciences Phone: (919) 684-5419 Duke University Fax: (919) 684-8594 -------------------------------------------------------------------------