Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a mirror boot disk

Status
Not open for further replies.

stevenriz

IS-IT--Management
May 21, 2001
1,069
Hi everyone. We have an old E3500 with a single (original) boot disk and would like to prepare for that disk to fail. I would ultimately like to mirror it but was also thinking of having a fully configured boot disk on the shelf in case it fails. How could I do this? Could I simply install a disk and do some special type of copy to copy all the static information to the second drive? Everything on the boot drive is static. All dynamic data is on the raid array so I am nott worried about that. Just the boot drive. Thoughts??
Thanks!!
Steve
 
I am testing this on a netra T1 105 right now, I haven't even attempted this on the e3500 yet. Want to be sure I get it right first...

What do you mean the boot bath? In "format" for slice 0?
 
One thing I am noticing so far is dd is taking a long time. Still going after some 3 hours. I know it's doing something, as I did a truss on it... does it normally take this long?
 
Stevenriz;

Well since you are just testing this on the netra 105 you will not see the problem I am talking about since these are scsi drives. Most likely the issue you see on this is due to the bootblk being corrupt or nonexistant. see doc 11800 on sunsolve on how to fix that issue. But as tuka pointed out with the dd command the bootblk is installed so you should not have this problem with his procedure

On the E3500 after you do the dd you have to make sure the system is trying to boot the correct WWN#. If you have a sunsolve account check out doc 17643 this will give you a basic idea of what you need to do.

boot path is seen when you first boot your system. devalias will give you a list of boot paths. Also if you run printenv low level and look at boot-device and also nvramrc for settings you can compare against devalias to see the paths that will be booted.

Also if up and running you can run eeprom and look at same settings.

If you run this on your E3500 it will give you a good idea of the current boot path;

ls -l /dev/dsk/c0t0d0s0 ....the path shown is it's boot path


This link has some good low level info that you may find helpful also.



Thanks

CA
 
The dd command takes forever!!! That is why I do not use...it copies everything over sector for sector, in my opinion that is pointless. You can just do ufsdump and ufsrestores then put a boot block and your good to go.
 
we don't have support with Sun but I will see if I can get into that doc.

I just ran those commands... So this is my current boot path? If so why would it be any different??

# ls -l /dev/dsk/c0t0d0s0
lrwxrwxrwx 1 root root 74 May 26 2004 /dev/dsk/c0t0d0s0 -> ../../devices/sbus@2,0/SUNW,socal@d,10000/sf@0,0/ssd@w22000020379c3511,0:a
#
# eeprom
disabled-memory-list: data not available.
disabled-board-list: data not available.
memory-interleave=max
configuration-policy=component
scsi-initiator-id=7
keyboard-click?=false
keymap: data not available.
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,-
ttya-mode=9600,8,n,1,-
sbus-specific-probe: data not available.
sbus-probe-default=d3120
mfg-mode=off
diag-level=min
powerfail-time=976125686
#power-cycles=1426063403
fcode-debug?=false
output-device=screen
input-device=keyboard
load-base=16384
boot-command=boot
auto-boot?=true
watchdog-reboot?=false
diag-file: data not available.
diag-device=/sbus@2,0/SUNW,socal@d,10000/sf@0,0/ssd@w21000020379c3511,0
boot-file: data not available.
boot-device=disk
local-mac-address?=false
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
silent-mode?=false
use-nvramrc?=false
nvramrc: data not available.
security-mode=none
security-password: data not available.
security-#badlogins=2684354560
oem-logo: data not available.
oem-logo?=false
oem-banner: data not available.
oem-banner?=false
hardware-revision: data not available.
last-hardware-update=
diag-switch?=true
#
 
Stevenriz;

The reason is the the WWN is hard coded to each drive so currently your drive is WWN w21000020379c3511. The WWN of the new drive is usually on the label so you can see the difference.

What happens is your are makeing a copy of all info from current boot drive to another drive which will not change the current wwn which is linked to this path /dev/dsk/c0t0d0s0 -> ../../devices/sbus@2,0/SUNW,socal@d,10000/sf@0,0/ssd@w22000020379c3511,0:a

so you need to follow a procedure to let the OS know that you have replaced the boot drive and that there is a new WWN. This is found on that doc 17643.

Also I just found this for you, this is what you need to do;


Thanks

CA
 
no thank you...

How about this...

What if I do a dd on that particular system, then replace the disk with the newly "copied" disk and boot to single user mode. I could probably bypass the drvconfig/disks/devlinks commands because all the devices are copied from DD.

then just run this command
luxadm set_boot_dev /dev/dsk/c0t0d0s0

yes??
 
stevenriz;

That procedure is what you would do if you had a failed boot drive and had to restore so i guess you could chop most of it out and try to just run
luxadm set_boot_dev /dev/dsk/c0t0d0s0.

Yes you want to remove the current boot drive and install the new one, boot cdrom -sw and go from there.

Thanks

CA

 
ya because the whole idea is to "shelf" a bootable drive identical to the one that is currently running. So if it fails, I can shut down, replace the failed drive with the one on the shelf then reboot. The file systems on the boot drive are pretty static so I am not worried about data being out of date etc.
 
stevenriz;

I have been thinking about this and don't believe the luxadm command is going to do it so you can try the luxadm command after booting cdrom -sw and then try booting the drive and see how it goes. If it fails to boot just boot cdrom -sw and mount /dev/dsk/c0t0d0s0 /a;

7) With root mounted under "/a" run the following commands to re-build
the devices tree :

drvconfig -r /a/devices -p /a/etc/path_to_inst

cd /devices
find . -print | cpio -pduVm /a/devices

disks -r /a
devlinks -r /a

The reason for this is if you just run the luxadm command c0t0d0s0 is still going to be showing the links with the old WWN.

Anyways let me know how things go.

Thanks

CA

 
ya I understand, so we really don't know if the links under the old WWN will appear different so we should regenerate them. Understood. Makes sense. I will let you know. I have some time before I actually do this, maybe a couple weeks but I will definately post back with my results.

Thanks for everything!!!
Steve
 
just a thought.... can a device driver file be renamed? For instance...

- copy the boot disk whatever way I decide, script, dd, whatever
- boot into single user mode or off CD
- mv /dev/rdsk/c0t0d0s0 /dev/rdsk/c0t0d0s0_ORIG
- mv /dev/rdsk/c0t1d0s0 /dev/rdsk/c0t0d0s0
- mv /dev/dsk/c0t0d0s0 /dev/dsk/c0t0d0s0_ORIG
- mv /dev/dsk/c0t1d0s0 /dev/dsk/c0t0d0s0

dumb idea???

btw - dd still running after 5 hours. 18gb drive.
 
I do not remember E3500 using WWN, but I could be wrong.

To fix the WWN problem under Solaris 8, you can do the following:

I have tried CNDC's solution and always had it mess up on me...

Code:
1) boot cdrom -s
2) mount /dev/dsk/cWtXdYsZ /mnt
3) mv /mnt/dev /mnt/dev.old
4) mv /mnt/devices /mnt/devices.old
5) rm /mnt/etc/path_to_inst*
6) devfsadm -r /mnt -p /mnt/etc/path_to_inst
7) reboot -- -r
You probably do not have to get rid of the entire /dev and /devices folders. But, I do it in just in case there is something else I missed.
 
I am trying all different ways out. Now I am experimenting with ufsdump. As I can do it when there is a tape drive involved, how would I dump out file systems to another drive? For instance, can I dump say root (c0t0d0s0) to another disk on that server (c0t1d0s5)?

note: I have /dev/rdsk/c0t1d0s5 mounted to /apps

I tried these and they both seemed to work as they both completed successfully, but I don't see a dump file anywhere so I won't be able to restore anything.... I have tried a few different variations of the ufsdump without success.

- ufsdump 0fu /dev/rdsk/c0t1d0s5 /dev/rdsk/c0t0d0s0
- ufsdump 0fu /apps/rootDump.dmp /dev/rdsk/c0t0d0s0
 
backup example:
Code:
# ufsdump 0f - / | gzip - >/mnt/root.dump.gz
restore example
Code:
# gzip -dc /mnt/root.dump.gz | ufsrestore xvf -

Where /mnt is your nfs mount and add any additional path requirements.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top