Implementing the Sun Volume Manager for Solaris

Discussion in 'Site & Server Administration' started by aaronnunter, Apr 15, 2006.

  1. #1
    Hey all. This is my first post. I had nightmareish time implementing some Sun X2100 servers at our data center. I ended up having to ditch freeBSD and install Solaris 10. Unfortunately solaris 10 doesn't support the nVidia raid controller that came with the machine.

    Below are some quick instructions on how it's done. Or you can check out my page which has links to the Sun documentation. http://www.hunter.cx/content/view/3/4/

    Enjoy!

    State database replica howto (2 slices per disk)

    Creating the First State Database Replica

    # metadb -a -f c0t0d0s7

    # metadb

    flags first blk block count

    ...

    a u 16 8192 /dev/dsk/c0t0d0s7

    You must use the -f option along with the -a option to create the first state database

    replica. The -a option adds state database replicas to the system.The -f option forces

    the creation of the first replica (and may be omitted when you add supplemental

    replicas to the system).

    Adding Two State Database Replicas to the Same Slice

    # metadb -a -c 2 c1t3d0s1

    # metadb

    flags first blk block count

    ...

    a u 16 8192 /dev/dsk/c1t3d0s1

    a u 8208 8192 /dev/dsk/c1t3d0s1

    The -a option adds state database replicas to the system. The -c 2 option places two

    replicas on the specified slice. The metadb command checks that the replicas are

    active, as indicated by the a flag in the metadb command output.

    Adding State Database Replicas of a Specific Size

    If you are replacing existing state database replicas, you might need to specify a

    replica size. Particularly if you have existing state database replicas (on a system

    upgraded from the Solstice DiskSuite product, perhaps) that share a slice with a file

    system, you must replace existing replicas with other replicas of the same size or add

    new replicas in a different location.

    # metadb -a -c 3 -l 1034 c0t0d0s7

    # metadb

    flags first blk block count


    x86: Creating a Mirror From the root (/) File System

    # metainit -f d1 1 1 c0t0d0s0

    d1: Concat/Stripe is setup

    # metainit d2 1 1 c0t1d0s0

    d2: Concat/Stripe is setup

    # metainit d0 -m d1

    d0: Mirror is setup

    # metaroot d0

    # lockfs -fa

    # reboot

    ...

    # metattach d0 d2

    d0: Submirror d2 is attached

    # ls -l /dev/dsk/c0t1d0s0

    lrwxrwxrwx 1 root root 88 Feb 8 15:51 /dev/dsk/c1t3d0s0 ->

    ../../devices/pci@1f,0/pci@1,1/ide@3/dad@0,0:a,raw

    # eeprom altbootpath=/pci@1f,0/pci@1,1/ide@3/dad@0,0:a,raw

    # fdisk -b /usr/lib/fs/ufs/mboot /dev/dsk/c0t1d0p0

    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

    # installboot /usr/platform/i86pc/lib/fs/ufs/pboot \

    /usr/platform/i86pc/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s2
     
    aaronnunter, Apr 15, 2006 IP