Check nd.local when replacing disks.

Joe Smith jms at antares.tymnet.com
Thu Mar 9 02:25:33 AEST 1989


>To: Field Engineers supporting Sun Workstations/Servers.
>Subject: Danger in replacing disk drives on an NFS server.

When replacing the customers disk driver on a Sun server, special care
must be taken if the replacement disk does not have the same geometry as
the original.  In particular, if the original disk has 10 heads and the
replacement has 8 heads (or vice versa), then the file /etc/nd.local on
the customer's dump tapes will cause problems.

The symptoms are:
  1.  The client partitions get wiped out (cannot find root inode).
  2.  /dev/sd0d gets wiped out (usually the customer's home directories).
  3.  The server cannot access the client partition; "mount" says device busy.

Because the Toshiba has 340 blocks per cylinder and the Micropolis has 272
blocks per cylinder, the sizes of the partitions will be different.  (The
"setup" program always rounds the requested size up to the next cylinder
boundary.)  If the customer's old /etc/nd.local file is fed into the "nd"
program, it may cause the client partitions on /dev/sd0c to overlap the
blocks assigned to /dev/sd0d, causing damage to both.

  nd.local for a Micropolis 1355 (34 sectors, 8 heads, 1018 cylinders)
user 0 1 /dev/sd0f 0 12512 -1		#  46 cyls,   0- 45 =  6.41 Mb
user tardis 0 /dev/sd0c 49504 16048 0   #  59 cyls, 182-240 =  8.21 Mb
user tardis 1 /dev/sd0c 65552 33456 -1  # 123 cyls, 241-363 = 17.13 Mb

  nd.local for a Toshiba MK156F  (34 sectors, 10 heads, 815 cylinders)
user 0 1 /dev/sd0f 0 16660 -1		#  49 cyls,   0- 48 =  8.53 Mb
user tardis 0 /dev/sd0c 49640 15980 0	#  47 cyls, 146-192 =  8.18 Mb
user tardis 1 /dev/sd0c 65620 33660 -1	#  99 cyls, 193-291 = 17.23 Mb

Fix:

After running "setup" and before restoring the customer's level 0 dump
tapes, make a copy of nd.local by using "cp /etc/nd.local
/etc/nd.local.setup".  Restore all the dump tapes for the root partition,
but no other partitions.  After the last incremental dump of root has been
restored, rename the nd.local files with these commands:

	mv /etc/nd.local /etc/nd.local.old-disk
	cp /etc/nd.local.setup /etc/nd.local
	/etc/nd </etc/nd.local

Now it is safe to restore the other partitions.

This problem affects SunOS 3.2, 3.4, and 3.5; SunOS 4.0 does not have this
problem because "nd" has been eliminated.

			Joe Smith
			McDonnell Douglas Field Service Company
-- 
Joe Smith (408)922-6220 | jms at antares.Tymnet.COM[131.146.3.1] or jms at opus
McDonnell Douglas FSCO  | UUCP: {ames,pyramid}!oliveb!tymix!antares!jms
PO Box 49019, MS-D21    | PDP-10: JMS at F74.Tymnet   CA license plate: "POPJ P,"
San Jose, CA 95161-9019 |



More information about the Comp.sys.sun mailing list