Create a boot disk mirror on Solaris 10 x86


 
Thread Tools Search this Thread
Operating Systems Solaris Create a boot disk mirror on Solaris 10 x86
# 1  
Old 04-09-2012
Create a boot disk mirror on Solaris 10 x86

I’m setting up a boot disk mirror on Solaris 10 x86. I’m used to doing it on SPARC, where you can copy the partition table using fmthard. My x86 boot disk has 2 primary partitions, a Solaris one and a diagnostic one. Is there a way to copy those 2 primary partitions to the second disk without having to manually do it using fdisk? I can’t seem to find a method to do it. I would like to be able to do this from the command line so I can use it as part of a script to mirror the boot disk and as part of my script for disaster recovery.

Code:
fdisk -B /dev/rdsk/${Secondary_disk}p0

only creates a Solaris fdisk Primary Partition on Secondary disk, so I wouldn’t have the diag partition.


Boot disk - 0
Code:
format> fdisk
               Total disk size is 36351 cylinders
               Cylinder size is 16065 (512 byte) blocks
   
                                                 Cylinders
        Partition   Status    Type          Start   End   Length    %
        =========   ======    ============  =====   ===   ======   ===
            1                 Diagnostic        1     7       7      0
            2       Active    Solaris2          8  36337    36330    100


Last edited by DukeNuke2; 04-09-2012 at 05:13 PM..
# 2  
Old 04-09-2012
why not using ZFS to setup a mirrored rpool?
# 3  
Old 04-09-2012
I agree with the "use zfs mirrored rpool" response. But if you want to use SVM to mirror the boot disk:

prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2


(man installgrub)
/usr/sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0
# 4  
Old 04-09-2012
Quote:
Originally Posted by rdhalstead
I agree with the "use zfs mirrored rpool" response. But if you want to use SVM to mirror the boot disk:

prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2


(man installgrub)
/usr/sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0
All good answers, however:
1-Boot disk is using UFS, so ZFS root pool mirroring is out.
2-prtvtoc ... | fmthard ... only copies the Solaris primary partition, not the diag primary partition. See below the result when I tried it earlier:

Code:
format> fdisk
             Total disk size is 36351 cylinders
             Cylinder size is 16065 (512 byte) blocks

                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1       Active    Solaris2          1  36350    36350    100

# 5  
Old 04-09-2012
# 6  
Old 04-09-2012
To copy fdisk partition tables:
Code:
fdisk -W - /dev/rdsk/${primary_disk}p0 | fdisk -F - /dev/rdsk/${Secondary_disk}p0

# 7  
Old 04-09-2012
Quote:
Originally Posted by bartus11
To copy fdisk partition tables:
Code:
fdisk -W - /dev/rdsk/${primary_disk}p0 | fdisk -F - /dev/rdsk/${Secondary_disk}p0

Thanks, I just tried that before seeing your post and I can confirm that's what I needed to do. Then I would copy the boot disk Solaris partition table to the second disk:

Code:
prtvtoc /dev/rdsk/${Primary_disk}s2 | fmthard -s - /dev/rdsk/${Secondary_disk}s2

and

Code:
/sbin/installgrub -fm /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/${Secondary_disk}s0

then do the usual SVM commands for the slices

Finally, update the secondary disk as alternate bootpath in /boot/solaris/bootenv.rc file. (This can be done
by executing the eeprom command)

Example: eeprom altbootpath=”"
If you are not sure what the physical path is that belongs in the above “”. It is recommended you run the
following command:

Code:
# ls -la /dev/dsk/c#t#d#s#
This example was taken from an X2100 platform:

# ls -la /dev/dsk/c2d0s0
lrwxrwxrwx 1 root root 48 Sep 5 21:35 /dev/dsk/c2d0s0 -> ../../devices/pci@0,0/pci-ide@7/ide@1/cmdk@0,0:a
so the path that needs to added to the bootenv.rc file is eeprom

ls -la /dev/dsk/${Secondary_disk}s0

# eeprom altbootpath=”/pci-ide@7/ide@1/cmdk@0,0:a”

Did I miss any other weird x86 stuff?

---------- Post updated at 05:50 PM ---------- Previous update was at 05:35 PM ----------

I think I need to do this before installgrub:

Make the secondary submirror bootable with a master boot program.

Specify the master boot program.

Code:
# fdisk -b /usr/lib/fs/ufs/mboot /dev/rdsk/c1t1d0p0

    The following screen appears:

                 Total disk size is 31035 cylinders
                 Cylinder size is 1146 (512 byte) blocks

                                                   Cylinders
          Partition   Status    Type          Start   End   Length    %
          =========   ======    ============  =====   ===   ======   ===
              1        Active   Solaris           1  31034    31034    100


    SELECT ONE OF THE FOLLOWING:
       1. Create a partition
       2. Specify the active partition
       3. Delete a partition
       4. Change between Solaris and Solaris2 Partition IDs
       5. Exit (update disk configuration and exit)
       6. Cancel (exit without updating disk configuration)
    Enter Selection: 5

And this near the end:
Define the alternative boot path in the menu.lst file.

To enable the system to boot off of the disk that holds the secondary submirror, configure the system to
see the disk as the alternate boot device. In the current example, c1t1d0s0, the alternative path is on
the first slice of the first fdisk partition on the second disk. Thus, you would edit the menu.lst with
the following entry:

Code:
title alternate boot
 root (hd1,0,a)
 kernel /boot/multiboot
 module /boot/x86.miniroot-safe

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris 9 x86 check disk mirror status

We have Proliant DL380 G2 running Solaris 9 x86 There are 6 physical disks installed which I believe are mirrored at hardware level to 3 sets to present 3 disks to the OS. Is there any way to check the mirror status at OS level ? I am guessing not and it may need a trip to site as we have no... (4 Replies)
Discussion started by: frustrated1
4 Replies

2. HP-UX

Patch PHKL_31216 and PHCO_30698 HP-UX 11.11 for replace a LVM mirror boot disk

Hi, I have old server hp rp 3440 hp-ux 11.11. One mirrored disk is faulty. I need spesial patch PHKL_31216 and PHCO_30698, which give to correctly remove disk. Unfortunately I don't have access to hp support site. Please help me find it patch. regards,Andre (0 Replies)
Discussion started by: andre9
0 Replies

3. Solaris

Unable to boot from mirror disk on x86 server configured under VxVM

Hi, Can you help me on booting x86 server configured under VxVM. Server boots fine normally from both the disks but if I try to boot server from mirror disk without starting veritas, then it does not boot. vxplex -g rootdg dis var-02 vxplex -g rootdg dis swapvol-02 vxplex -g rootdg dis... (2 Replies)
Discussion started by: milindphanse604
2 Replies

4. Solaris

Solaris x86 installation using jumpstart does not local boot ( boot from hdd)

I am trying to install Solaris x86 using the Jumpstart server. I run the add_install_client command with appropriate options, and reboot my x86 Target box. The installation starts fine and unattended. After the installation completes and the target goes for a re-boot, it does not boot from the HDD... (9 Replies)
Discussion started by: hemalsid
9 Replies

5. Solaris

How to create mirror disk in solaris machine?

hi, I'm newbie in Solaris 10. can someone explain me the steps of how to create mirror disk in Solaris machine. thanks in advance (5 Replies)
Discussion started by: Wong_Cilacap
5 Replies

6. Solaris

x86 Solaris 8 does not boot.

Hello, First of all I must say that I have 0 solaris experience and only some average linux knowledge. One of my friends came to ask for my help today with a Solaris 8 x86 station that would not boot. The system is a pentium 4 1.6 ghz, 1gb ram, 40 gb hdd. When I turn it on, I get ... (3 Replies)
Discussion started by: gogusrl
3 Replies

7. Solaris

x86 Sun Machine and Solaris Soft Mirror

Hi everyone, Normally it always easier in Sparc machine, i can set or manually use the boot-device in NVram to boot the mirrored disk. However I have a big trouble about x86 mirror for a long time. I have been doing anything i can: search document, google, ask the others. Recently i did as... (5 Replies)
Discussion started by: tien86
5 Replies

8. Solaris

Create a logical volume from a mirror and single disk?

I have two 72GB disks that are mirrored and mounted (/backup). I have a 18GB drive in an array I just attached to the server, which is running Solaris 9. I need to create a new logical volume partition and make the existing mirror device (/dev/md/dsk/d34) and the array's 18GB drive a member of... (3 Replies)
Discussion started by: dotcom75
3 Replies

9. Solaris

Disk Mirror in Solaris 9 via Solaris Volume Manager

Hello, I am trying to do mirror in solaris 9. I have total 0-7 disks 4 5 6 7 0 1 2 3 Drive 0 and Drive 4 = Boot Drives Need to Mirror following drives. Drive 1 and Drive 5 = Need to mirror Drive 1 was mounted on: /prod1, /prod2, /prod3, /prod4, /prod5. Then i... (3 Replies)
Discussion started by: deal732
3 Replies

10. HP-UX

How to remove alternate boot disk (vg00) in mirror

How do we remove mirror (vg00) in itanium system having 11.23 version. (2 Replies)
Discussion started by: jeelans
2 Replies
Login or Register to Ask a Question