C H A P T E R 10 |
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 parted Utility to Display and Modify the Configuration of a Disk Partition on a Linux Node
Increasing the Size of a Replicated Data Partition on a Physical Disk on a Linux Node
Increasing the Size of a Replicated Data Partition on a Virtual Disk on a Linux Node
Adding a Mirrored Data Partition to a Virtual Disk on a Linux Node
This section describes how to use the parted utility to display and modify the configuration of a disk partition. For additional information, see the parted8 man page.
Before you change the configuration of a disk partition, you must stop all the nodes in the cluster. You must also change the size of the corresponding data partition and bitmap partition on the other master-eligible node.
|
Use this procedure to identify the name of each partition on a disk and to determine whether a disk partition is big enough.
Run the parted utility to display partitions of the disk:
# parted /dev/sda print |
Output similar to the following is displayed in the console window:
Disk geometry for /dev/scsi/host0/bus0/target0/lun0/disc: 0.000-70007.196 megabytes Disk label type: msdos Minor Start End Type Filesystem Flags 1 0.031 8189.384 primary ext3 boot 2 8189.385 12291.921 primary linux-swap 3 12291.921 70001.982 extended 5 12291.952 16386.613 logical ext3 6 16386.645 20481.306 logical ext3 7 20481.337 21501.057 logical ext3 8 21501.088 39997.771 logical ext3 Information: Don’t forget to update /etc/fstab, if necessary. |
|
Changing the size of a disk partition using the parted command requires that the partition that is going to be changed is deleted, and then recreated with the new size. There must also be enough unused space on the disk to allow the partition to be increased.
![]() | Caution - Deleting a partition also deletes all data on that partition. Make a backup copy of the data before deleting a partition. |
Delete the partition that you want to modify:
# parted /dev/sda rm 8 |
Recreate the partition with increased size:
# parted /dev/sda mkpart logical ext3 21501.058 70007.196 |
Verify the change by displaying the new partition table:
# parted /dev/sda print Disk geometry for /dev/scsi/host0/bus0/target0/lun0/disc: 0.000-70007.196 mbytes Disk label type: msdos Minor Start End Type Filesystem Flags 1 0.031 8189.384 primary ext3 boot 2 8189.385 12291.921 primary linux-swap 3 12291.921 70001.982 extended 5 12291.952 16386.613 logical ext3 6 16386.645 20481.306 logical ext3 7 20481.337 21501.057 logical ext3 8 21501.088 70001.982 logical ext3 |
Note - Refer to the parted8man page for more information about changing the partitions on a disk. |
This section describes how to increase the size of a replicated data partition on a physical disk.
|
Log in to a cluster node and note which node is the master node and which node is the vice-master node.
# nhcmmstat -all |
For information, see To Shut Down a Cluster.
Log in to the original master node in single-user mode, as superuser:
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 Linux Node.
Change the size of the data partition.
For information, see To Change the Size of a Disk Partition on a Master-Eligible Node on Linux.
Verify that the metadata partition is the correct size.
Identify the name of the local metadata partition associated with the chosen data partition.
For information, see To Display the Configuration of a Disk Partition on a Linux Node.
Confirm that the metadata partition is at least the following size:
128 Mbyte * Number of replicated file systems
If there are two replicated file systems, then the size of the meta data partition should be at least 256 MBytes.
If the metadata 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 Linux.
Restore the data on the partition using the restore command.
Log in to the old vice-master node in single-user mode, as superuser:
Change the size of the data partition by repeating Step 5 through Step 7.
Reboot the original master node as described in To Perform a Clean Reboot of a Linux Node.
When the master node has booted fully, reboot the original vice-master node as described in To Perform a Clean Reboot of a Linux Node.
Verify that the vice-master node is synchronized with the master node:
# drbdadm cstate all |
If the drbdadm command indicates "SyncSource," then synchronization is currently taking place. When the drbdadm command indicates "Connected," the vice-master node is synchronized with the master node.
Restart the diskless and dataless nodes.
For information, see To Restart a Node.
This section describes how to increase the size of a replicated data partition created by the Logical 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.
|
Log in to a cluster node and note which node is the master node and which node is the vice-master node:
# nhcmmstat -all |
For information, see To Shut Down a Cluster.
Log in to the original master node in single-user mode, as superuser:
Start the LVM and mount the file system.
For example, mount /dev/vg0/lvol4 on home2, as follows:
# /etc/init.d/nhlvm start # mount -t ext3 /dev/vg0/lvol4 /home2 |
Add space to the virtual disk by adding a new, unused partition to the volume group.
For example, add /dev/sda8 to the vg0 device:
# vgextend vg0 /dev/sda8 |
For more information about virtual disks, see the Logical Volume Manager How To at: http://tldp.org/HOWTO/LVM-HOWTO/
Grow the file system to its new size:
# resize2fs /dev/vg0/lvol4 |
Verify that the metadata partition is the correct size.
Identify the name of the local metadata partition associated with the chosen data partition.
For information, see To Display the Configuration of a Disk Partition on a Linux Node.
Confirm that the metadata partition is at least the following size:
128 Mbyte * Number of replicated file systems
If there are two replicated file systems, then the size of the metadata partition should be at least 256 MBytes.
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 Linux.
Log in to the original vice-master node in single-user mode, as superuser.
Add space to the virtual disk on the vice-master by repeating Step 6.
Reboot the master node as described in To Perform a Clean Reboot of a Linux Node.
When the master node has fully booted, reboot the vice-master node as described in To Perform a Clean Reboot of a Linux Node.
Verify that the vice-master node is synchronized with the master node:
For versions earlier than the Solaris 10 OS:
# drbdadm cstate all |
If the drbdadm command indicates "SyncSource," then synchronization is currently taking place. When the drbdadm command indicates "Connected," the vice-master node is synchronized with the master node.
Restart the diskless nodes or dataless nodes.
For information, see To Restart a Node.
Confirm that the nodes have the correct configuration:
# nhadm check |
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 the Logical Volume Manager software in the initial cluster configuration. For information about configuring the LVM, see the Netra High Availability Suite 3.0 1/08 Foundation Services Manual Installation Guide for the Solaris OS.
|
For information, see To Shut Down a Cluster.
Log in to a master-eligible node in single-user mode, as superuser:
Create two virtual disk partitions: one data partition and one metadata partition.
The metadata partition can be skipped if the system already has sufficient large metadata partition. The size of the metadata partition must be at least 128 MBytes multiplied by the number of replicated file systems. For information, see the Logical Volume Manager How To at: http://tldp.org/HOWTO/LVM-HOWTO/
Ensure that the partition is replicated by adding the RNFS.Slice parameter for the new soft partition to the nhfs.conf file.
Add the RNFS.Slice parameter for the new partitions to the nhfs.conf file.
The RNFS.Slice parameter is used to replicate the partition.
Repeat Step 2 through Step 6 for the second master-eligible node.
The changes you make must be identical on both master-eligible nodes.
For information, see To Restart a Cluster.
Verify that the vice-master node is synchronized with the master node:
# drbdadm cstate all |
If the drbdadm command indicates "SyncSource," then synchronization is currently taking place. When the drbdadm command indicates "Connected," the vice-master node is synchronized with the master node.
If the vice-master node is not synchronized with the master node, resynchronize it:
# nhcrfsadm -f all |
Confirm that the nodes have the correct configuration:
# nhadm check |
Copyright © 2008, Sun Microsystems, Inc. All rights reserved.