• No results found

Planning your use of volume groups

Chapter 1. Components of the logical volume manager

1.4 Use of the logical volume manager

1.4.1 Planning your use of volume groups

Disk failure is the most common hardware failure in the storage system, followed by failure of adapters and power supplies. Protection against disk failure primarily involves the configuration of the logical volumes. However, volume group size also plays a part, as will be explained.

To protect against adapter and power supply failure, you need to consider a special hardware configuration for any specific volume group. Such a configuration includes two adapters and at least one physical volume per adapter with mirroring across adapters and a non-quorum volume group configuration. The additional expense for this kind of configuration is not appropriate for all sites or systems. It is recommended only where high (up-to-the-last-second) availability is a priority. Depending on the

the most recent backup and the current data entry. High availability does not apply to files deleted by accident.

1.4.1.1 When to Create Separate Volume Groups

You should organize physical volumes into volume groups separate from rootvg for the following reasons:

• For safer and easier maintenance.

- Operating system updates, reinstallations, and crash recoveries are safer because you can separate user file systems from the operating system so that user files are not jeopardized during these operations. - Maintenance is easier because you can update or reinstall the

operating system without having to restore user data. For example, before updating, you can remove a user-defined volume group from the system by un-mounting its file systems and deactivating it (using varyoffvg). If necessary, the volume could even be exported (using exportvg). After updating the system software, you can reintroduce the user-defined volume group (using importvg), active it (varyonvg), then remount its file systems.

• For different physical-partition sizes. All physical volumes within the same volume group must have the same physical partition size. To have physical volumes with different physical partition sizes, place each size in a separate volume group.

• When different quorum characteristics are required. If you have a file system for which you want to create a non-quorum volume group, maintain a separate volume group for that data; all of the other file systems should remain in volume groups operating under a quorum.

• For security. For example, you might want to de-active a volume group at night

• To switch physical volumes between systems. If you create a separate volume group for each system on an adapter that is accessible from more than one system, you can switch the physical volumes between the systems that are accessible on that adapter without interrupting the normal operation of either (see the varyoffvg, exportvg, importvg, and varyonvg commands).

• To remove physical volumes from the system while the system continues to run normally. By making a separate volume group for removable physical volumes, provided the volume group is not rootvg, you can make removable physical volumes unavailable and physically remove them during normal operation without affecting other volume groups.

1.4.1.2 High availability with physical volume failure

The primary methods used to protect against physical volume failure involve logical volume configuration settings, such as mirroring. While the volume group considerations are secondary, they have significant economic

implications because they involve the number of physical volumes per volume group:

• The quorum configuration, which is the default, keeps the volume group active (varied on) as long as a quorum (51 percent) of the physical volumes is present. In most cases, you need at least three physical volumes with mirrored copies in the volume group to protect against physical volume failure.

• The non-quorum configuration keeps the volume group active (varied on) as long as one VGDA is available on a physical volume (see "Changing a Volume Group to Non-quorum Status"). With this configuration, you need only two physical volumes with mirrored copies in the volume group to protect against physical volume failure.

When deciding on the number of physical volumes in each volume group, you also need to plan for room to mirror the data. Keep in mind that you can only mirror and move data between physical volumes that are in the same volume group. If the site uses large file systems, finding disk space on which to mirror could become a problem at a later time. Be aware of the implications on availability of inter-physical volume settings for logical volume copies and intra-physical volume allocation for a logical volume.

1.4.1.3 High availability in case of adapter or power supply failure To protect against adapter or power supply failure, depending on the stringency of your requirements, do one or more of the following:

• Use two adapters, located in the same or different cabinets. Locating the adapters in different cabinets protects against losing both adapters if there is a power supply failure in one cabinet.

• Use two adapters, attaching at least one physical volume to each adapter. This protects against a failure at either adapter (or power supply if

adapters are in separate cabinets) by still maintaining a quorum in the volume group, assuming cross-mirroring (copies for a logical partition cannot share the same physical volume) between the logical volumes on physical volume A (adapter A) and the logical volumes on physical volume B (adapter B). This means that you copy the logical volumes that reside on the physical volumes attached to adapter A to the physical volumes that reside on adapter B, and also that you copy the logical volumes that reside

on the physical volumes attached to adapter B to the physical volumes that reside on adapter A as well.

• Configure all physical volumes from both adapters into the same volume group. This ensures that at least one logical volume copy will remain intact in case an adapter fails, or if cabinets are separate, in case a power supply fails.

• Make the volume group a non-quorum volume group. This allows the volume group to remain active as long as one Volume Group Descriptor Area (VGDA) is accessible on any physical volume in the volume group (see "Changing a Volume Group to Non-quorum Status").

• If there are two physical volumes in the volume group, implement

cross-mirroring between the adapters. If more than one physical volume is available on each adapter, implement double-mirroring. In this case, you create a mirrored copy on a physical volume that uses the same adapter and one on a physical volume using a different adapter.

1.4.1.4 Decide on the size of physical partitions

The physical partition size is set when the volume group is created. The default size is 4 MB. The default is designed to suit most sites and systems but may not be appropriate in every case. You can choose a partition size as small as 1 MB to gain flexibility in sizing, but this requires more partitions. The additional partitions create more overhead for the logical volume manager and are likely to affect performance.

If you make the partitions larger than 4 MB, you lose some sizing flexibility and may also waste space. For example, if you have 32 MB partitions, then your JFS log will have to be 32 MB when it only needs 4 MB. Some waste may be an acceptable trade-off if the particular site or system requires larger partitions.