fixing bad ND partitions

Todd Sandor todds at cognos.uucp
Fri Feb 3 10:36:55 AEST 1989


>In v7n105, Tony Tran (versatc!tran at sun.com) asks:
>>We have a server with 12 ND partitions, 4 of which are bad.  What is the
>>easiest/safest way to fix these partitions ?

Below is a simple script I use to fix nd partitions, please note though:
1) Bad nd must be halted. (If bad probably halted anyway :-)).
2) The /etc/mkfs must be tailored to the disk using (use dkinfo to find out)
3) The /etc/dump must use a good working nd partition (ndl2 in this case.
4) The editing of rc.boot must have hostname recreating the partition from.

I used this many times, partition dumping from doesn't have to be
shutdown, at least hasn't given me any problems yet.  I call this ndcreate
and used ndcreate nd_partition_number hostname to use it.  Also good to
use to recreate all nd partitions on server (except one dumping from)
after an install once tailor the dumpfrom nd partition exactly the way
want it (create a ndall script with all entries in it), saves me a lot of
time on new installations.

#!/bin/csh -v
cd /
echo "making /dev/ndl$1 "
/etc/mkfs /dev/ndl$1 16080 67 15 8192 1024
mount /dev/ndl$1 /mnt
cd /mnt
/etc/dump 0f - /dev/ndl2 | (cd /mnt; restore xf -)
cd /mnt/etc
ed rc.boot<<EOF
/canis/s//$2/
w
q
EOF
cd /
umount /mnt
-- 
Todd Sandor                                      P.O. Box 9707
Cognos Incorporated                              3755 Riverside Dr.
VOICE:  (613) 738-1440   FAX: (613) 738-0002     Ottawa, Ontario
UUCP: uunet!mitel!sce!cognos!todds     CANADA  K1G 3Z4



More information about the Comp.sys.sun mailing list