C H A P T E R  9

Modifying and Adding Disk Partitions for Replicated Data on the Solaris OS

This chapter describes how to examine or modify the configuration of a disk partition on the master-eligible nodes. Master-eligible nodes can have more than one disk. The disk partitions discussed in this chapter pertain to the disk that contains the cluster configuration. For more information about disk partitioning, see “Volume Management” in the Netra High Availability Suite 3.0 1/08 Foundation Services Overview.

The disk on a dataless node is not used to store cluster data and is not discussed in this chapter. For information about the initial disk configuration of a dataless node, see the Netra High Availability Suite 3.0 1/08 Foundation Services Manual Installation Guide for the Solaris OS.

This chapter contains the following sections:


Using the format Utility to Display and Modify the Configuration of a Disk Partition on a Solaris Node

This section describes how to use the format utility to display and modify the configuration of a disk partition. For additional information, see the format1M man page.

Before you change the configuration of a disk partition, you must stop all the nodes in the cluster. If you change the size of a data partition on one master-eligible node, you must change the size of the corresponding bitmap partition on that disk. You must also change the size of the corresponding data partition and bitmap partition on the other master-eligible node.

procedure icon  To Display the Configuration of a Disk Partition on a Solaris Node

Use this procedure to identify the name of each partition on a disk and to determine whether a disk partition is big enough.

  1. Log in to a master-eligible node as superuser.

  2. Run the format utility:


    # format
    

    Output similar to the following is displayed in the console window:


    Searching for disks...done
    AVAILABLE DISK SELECTIONS:
    0. c0t0d0 SUN36G cyl 24620 alt 2 hd 27 sec 107>
    /pci@1f,0/pci@1,1/scsi@2/sd@0,0
    Specify disk (enter its number):
    

  3. Choose the disk you want to examine:


     Specify disk (enter its number): 0
    

    Output similar to the following is displayed in the console window:


    selecting c0t0d0
    [disk formatted]
    Warning: Current Disk has mounted partitions.
     
     
    FORMAT MENU:
            disk       - select a disk
            type       - select (define) a disk type
            partition  - select (define) a partition table
            current    - describe the current disk
            format     - format and analyze the disk
            repair     - repair a defective sector
            label      - write label to the disk
            analyze    - surface analysis
            defect     - defect list management
            backup     - search for backup labels
            verify     - read and display labels
            save       - save new disk/partition definitions
            inquiry    - show vendor, product and revision
            volname    - set 8-character volume name
            !cmd>     - execute cmd>, then return
            quit
    

  4. Choose the partition option:


    format> partition 
    

    Output similar to the following is displayed in the console window:


    PARTITION MENU:
            0      - change `0' partition
            1      - change `1' partition
            2      - change `2' partition
            3      - change `3' partition
            4      - change `4' partition
            5      - change `5' partition
            6      - change `6' partition
            7      - change `7' partition
            select - select a predefined table
            modify - modify a predefined partition table
            name   - name the current table
            print  - display the current table
            label  - write partition map and label to the disk
            !cmd> - execute cmd>, then return
            quit
    

  5. Display the configuration of the current disk partitions:


    partition> print 
    

    Output similar to the following is displayed in the console window:


    Current partition table (original):
    Total disk cylinders available: 24620 + 2 (reserved cylinders)
    Part      Tag    Flag     Cylinders         Size            Blocks
    0       root    wm       0 -  1451        2.00GB    (1452/0/0)   4194828
    1       swap    wu    1452 -  2177        1.00GB    (726/0/0)    2097414
    2     backup    wm       0 - 24619       33.92GB    (24620/0/0) 71127180
    3 unassigned    wm    2178 -  3629        2.00GB    (1452/0/0)   4194828
    4 unassigned    wm    3630 -  3771      200.31MB    (142/0/0)     410238
    5 unassigned    wm    3772 -  3772        1.41MB    (1/0/0)         2889
    6 unassigned    wm    3773 -  3773        1.41MB    (1/0/0)         2889
    7 unassigned    wm       0                0         (0/0/0)            0
    

  6. Quit if you do not want to modify the size of a partition:


    partition> quit 
    

    The following output is displayed in the console window:


    FORMAT MENU:
     disk       - select a disk
    type       - select (define) a disk type
    partition  - select (define) a partition table
    current    - describe the current disk
    format     - format and analyze the disk
    repair     - repair a defective sector
    label      - write label to the disk
    analyze    - surface analysis
    defect     - defect list management
    backup     - search for backup labels
    verify     - read and display labels
    save       - save new disk/partition definitions
    inquiry    - show vendor, product and revision
    volname    - set 8-character volume name
    !cmd>     - execute cmd>, then return
    quit
    


     format> quit
    

    You return to the console prompt, #.

procedure icon  To Change the Size of a Disk Partition on a Master-Eligible Node on the Solaris OS

  1. Perform Step 1 through Step 5 of To Display the Configuration of a Disk Partition on a Solaris Node.

  2. Specify the physical partition you want to modify.

    Type the entry from the Part column that corresponds to this partition:


     partition> Part-entry
    

    Information about the partition that you have chosen is displayed in the console window. For example, partition 3 produces the following output:


    Part      Tag    Flag     Cylinders         Size            Blocks
     3 unassigned    wm    2178 -  3629        2.00GB    (1452/0/0)   4194828
    

  3. When the format tool prompts you to change some of the parameters of the partition configuration, press Return to accept the existing configuration:


    Enter partition id tag(unassigned):
    Enter partition permission flags[wn]
    Enter new starting cyl(2178):
    

  4. Change the size of the partition:


    new-partition-size]: [4194828b, 1452c, 2048.26mb, 2.00gbEnter partition size
    

  5. Write the new partition layout to the disk:


     partition> label
    

  6. Confirm that you want to change the partition size:


    Ready to label disk, continue? y 
    

  7. Verify that your modifications have been implemented:


    partition> print 
    

  8. Quit the format utility:


    FORMAT MENU:
     disk       - select a disk
    type       - select (define) a disk type
    partition  - select (define) a partition table
    current    - describe the current disk
    format     - format and analyze the disk
    repair     - repair a defective sector
    label      - write label to the disk
    analyze    - surface analysis
    defect     - defect list management
    backup     - search for backup labels
    verify     - read and display labels
    save       - save new disk/partition definitions
    inquiry    - show vendor, product and revision
    volname    - set 8-character volume name
    !cmd>     - execute cmd>, then return
    quit
    


    format> quit 
    

    You return to the console prompt, #.


Increasing the Size of a Replicated Data Partition on a Physical Disk on a Solaris Node

This section describes how to increase the size of a replicated data partition on a physical disk.

procedure icon  To Increase the Size of a Replicated Data Partition on a Physical Disk on a Solaris Node

  1. Log in to a cluster node and note which node is the master node and which node is the vice-master node.


    # nhcmmstat -all
    

  2. Stop the cluster.

    For information, see To Shut Down a Cluster.

  3. Log in to the original master node in single-user mode as superuser:


     ok> boot -s
    

  4. Back up the partition by using a tool such as ufsdump.

    For information, see the ufsdump1M man page.

  5. Identify the name of the data partition that you want to modify.

    For information, see To Display the Configuration of a Disk Partition on a Solaris Node.

  6. Change the size of the data partition.

    For information, see To Change the Size of a Disk Partition on a Master-Eligible Node on the Solaris OS.

  7. Verify that the bitmap partition is the correct size.

    1. Identify the name of the local bitmap partition associated with the chosen data partition.

      For information, see To Display the Configuration of a Disk Partition on a Solaris Node.

    2. Confirm that the bitmap partition is at least the following size:

      1 Kbyte + 4 Kbytes per Gbyte of data in the associated data partition

      If the bitmap partition is not big enough, increase the size of this partition, as described in To Change the Size of a Disk Partition on a Master-Eligible Node on the Solaris OS.

  8. Restore the data on the partition using the ufsrestore command.

    For information, see the ufsrestore1M man page.

  9. Reset the replication configuration on the master node:

    On the Solaris 9 OS:


    # /opt/SUNWesm/SUNWrdc/sbin/sndradm -d
    Disable Remote Mirror? (Y/N) [N]: Y
    #
    

    On the Solaris 10 OS:


    # /usr/sbin/sndradm -d
    Disable Remote Mirror? (Y/N) [N]: Y
    #
    

  10. Log in to the old vice-master node in single-user mode, as superuser:


     ok> boot -s
    

  11. Change the size of the data partition by repeating Step 5 through Step 7.

  12. Reset the replication configuration on the vice-master node by repeating Step 9 and Step 10.

  13. Reboot the original master node as described in To Perform a Clean Reboot of a Solaris OS Node.

  14. When the master node has booted fully, reboot the original vice-master node as described in To Perform a Clean Reboot of a Solaris OS Node.

  15. Log in to the master node as superuser.

  16. Verify that the vice-master node is synchronized with the master node:

    For versions earlier than the Solaris 10 OS:


    # /usr/opt/SUNWesm/sbin/scmadm -S -M
    

    For the Solaris 10 OS and later:


    # /usr/sbin/dsstat 1
    

  17. Restart the diskless and dataless nodes.

    For information, see To Restart a Node.

  18. Verify that the nodes have the correct configuration:


    # nhadm check
    

    For information, see the nhadm1M man page.


Increasing the Size of a Replicated Data Partition on a Virtual Disk on a Solaris Node

This section describes how to increase the size of a replicated data partition created by the Solaris Volume Manager. This replicated partition is called a soft partition. Perform this procedure to facilitate back up or to increase the partition size available to services or applications.

procedure icon  To Increase the Size of a Replicated Data Partition on a Virtual Disk on a Solaris Node

  1. Log in to a cluster node and note which node is the master node and which node is the vice-master node:


    # nhcmmstat -all
    

  2. Stop the cluster.

    For information, see To Shut Down a Cluster.

  3. Log in to the original master node in single-user mode as superuser:


     ok> boot -s
    

  4. Back up the partition by using a tool such as ufsdump.

    For information, see the ufsdump1M man page.

  5. Mount the file system.

    For example, mount dsk/d20 on home2, as follows:


    # mount /dev/md/dsk/d20 /home2
    

  6. Add space to the virtual disk.

    For example, add 10 Gbytes to the d20 device:


    # metattach d20 10g
    

    For more information about virtual disks, see the Solaris Volume Manager Administration Guide.

  7. Grow the file system to its new size:


    # growfs -M /home2 /dev/md/rdsk/d20
    

  8. Verify that the bitmap partition is the correct size.

    1. Identify the name of the local bitmap partition associated with the chosen data partition.

      For information, see To Display the Configuration of a Disk Partition on a Solaris Node.

    2. Confirm that the bitmap partition is at least the following size:

      1 Kbyte + 4 Kbytes per Gbyte of data in the associated data partition

      If the bitmap partition is not big enough, increase the size of this partition as described in To Change the Size of a Disk Partition on a Master-Eligible Node on the Solaris OS.

  9. Reset the replication configuration:

    On the Solaris 9 OS:


    # /opt/SUNWesm/SUNWrdc/sbin/sndradm -d
    Disable Remote Mirror? (Y/N) [N]: Y
    #
    

    On the Solaris 10 OS:


    # /usr/sbin/sndradm -d
    Disable Remote Mirror? (Y/N) [N]: Y
    #
    

  10. Log in to the original vice-master node in single-user mode, as superuser:


     ok> boot -s
    

  11. Add space to the virtual disk by repeating Step 6.

  12. Repeat Step 8 through Step 9 on the vice-master node.

  13. Reboot the master node as described in To Perform a Clean Reboot of a Solaris OS Node.

  14. When the master node has fully booted, reboot the vice-master node as described in To Perform a Clean Reboot of a Solaris OS Node.

  15. Log in to the master node as superuser.

  16. Verify that the vice-master node is synchronized with the master node:

    For versions earlier than the Solaris 10 OS:


    # /usr/opt/SUNWesm/sbin/scmadm -S -M
    

    For the Solaris 10 OS and later:


    # /usr/sbin/dsstat 1
    

  17. Restart the diskless nodes or dataless nodes.

    For information, see To Restart a Node.

  18. Confirm that the nodes have the correct configuration:


    # nhadm check
    

    For information, see the nhadm1M man page.


Adding a Mirrored Data Partition to a Virtual Disk on a Solaris Node

This section describes how to add a mirrored data partition to your disk configuration. To configure a virtual disk on the master-eligible nodes, you must include Solaris Volume Manager or the Solstice DiskSuitetrademark in the initial cluster configuration. For information about configuring Solaris Volume Manager, see the Netra High Availability Suite 3.0 1/08 Foundation Services Manual Installation Guide for the Solaris OS.

procedure icon  To Add a Mirrored Data Partition to a Virtual Disk on a Solaris Node

  1. Stop the cluster.

    For information, see To Shut Down a Cluster.

  2. Log in to a master-eligible node in single-user mode as superuser:


    ok> boot -s 
    

  3. Create two virtual disk partitions: one data partition and one bitmap partition.

    For information, see the following documents:

    • For the Solaris 9 and Solaris 10 OS, “Creating Soft Partitions” in the Solaris Volume Manager Administration Guide

  4. Format the disk to include the configuration information for the two new partitions.

    For information, see the format1M man page.

  5. Ensure that the partition is replicated by adding the RNFS.Slice parameter for the new soft partition to the nhfs.conf file.


    RNFS.Slice = slice-description
    

    For information, see the nhfs.conf4 man page.

  6. Add the RNFS.Slice parameter for the new partitions to the nhfs.conf file.

    The RNFS.Slice parameter is used to replicate the partition.

  7. Repeat Step 2 through Step 6 for the second master-eligible node.

    The changes you make must be identical on both master-eligible nodes.

  8. Reboot all of the peer nodes.

    For information, see To Restart a Cluster.

  9. Verify that the vice-master node is synchronized with the master node:

    For versions earlier than the Solaris 10 OS:


    # /usr/opt/SUNWesm/sbin/scmadm -S -M
    

    For the Solaris 10 OS and later:


    # /usr/sbin/dsstat 1
    

    If the vice-master node is not synchronized with the master node, resynchronize it:


    # nhcrfsadm -f all
    

  10. Confirm that the nodes have the correct configuration:


    # nhadm check
    

    For information, see the nhadm1M man page.