Solstice DiskSuite Tool 4.0 User's Guide
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

Concatenating and Striping

4

This chapter discusses how to use the Solstice DiskSuite Tool (metatool(1M)) to create metadevices that consist of either concatenated or striped disk slices. Refer to Chapter 3, "Overview of DiskSuite Tool," for information on using DiskSuite Tool.
Use the following table to locate specific information in this chapter.
Overview of Concatenating and Stripingpage 59
Using Concatenations and Stripespage 61
Hardware and Software Considerationspage 62
Defining Metadevice Configurationspage 63
Replacing Failed Componentspage 80
Clearing Concatenations and Stripespage 84
Concat Information Windowpage 87
Stripe Information Windowpage 89
Checking the Status of Concatenations and Stripespage 91

Overview of Concatenating and Striping

Each metadevice is either a concatenation or a stripe of component slices. Concatenations and stripes work much the way the cat(1) program is used to concatenate two or more files together to create one larger file.
When slices are concatenated, the component blocks are addressed sequentially. The file system can access the entire concatenation.

Note - You can use a concatenated or striped metadevice for any file system with the exceptions of root (/), swap, /usr, /var, /opt, or any other file system accessed during a Solaris upgrade or installation.

Figure 4-1 illustrates the concatenation of three 327-Mbyte components. The logical block address ranges are listed below the drives. The physical block address range for each of the three drives would be 0 to 669695. When concatenated, the logical block address range is sequential from 0 to 2009087. In this illustration the disk labels are not part of the logical block addresses.

Graphique

Figure 4-1

Striping is similar to concatenation, except the addressing of the metadevice blocks is interlaced on the components, rather than addressed sequentially. When stripes are defined, an interlace size is specified as a number, for example, 8, 16, 32. The numbers are specified as kilobytes, megabytes, or (512-byte) sectors. If the size is not specified, it defaults to 16 Kbytes. This value tells DiskSuite how much data is placed on a component before moving to the next component of the stripe.
Because data is spread across a stripe, you gain increased performance as reads and writes are spread across multiple disk arms. Also, concurrent I/O requests may use different disk arms. This may be true of concatenation as well.
In Figure 4-2, three 327-Mbyte components are used to illustrate a stripe of component slices. The sector size is 512 bytes. The interlace value is 8 Kbytes (or 16 512-byte sectors). The same logical address range as shown for the concatenation in Figure 4-1 (0 to 2009087) applies to a stripe of the same component configuration. However, in striping, the logical block addresses on each component are alternated according to the interlace size specified. In this illustration the disk labels are not part of the logical block addresses.

Graphique

Figure 4-2

Figure 4-2 further illustrates how improved performance is gained through striping. For example, if a 1-Mbyte request were issued to this configuration, the data would be spread across the three components and the component arms on all components would be used to retrieve the data concurrently.

Using Concatenations and Stripes

Concatenating disk slices enables you to create a single metadevice with large capacity. This provides a solution for the space limitation a single slice poses. The logical disk block addresses are allocated sequentially to concatenated disk slices.
You can use a concatenated or striped metadevice for any file system with the exception of root (/), swap, /usr, /var, /opt, and any other file system accessed during a Solaris upgrade or installation.
Striping performs the same function as concatenation, enabling you to create a single metadevice with large capacity. But striping differs from concatenation because the logical disk block addresses are allocated in an interlaced fashion, which can improve performance.
The interlace value for striping is user defined. If the interlace size is not specified on the Stripe Information window, the size defaults to 16 Kbytes. A performance gain occurs when the I/O request is larger than the interlace size, because more disk arms are used to retrieve data or multiple requests spread over more disk arms.
DiskSuite Tool supports concatenations consisting of a single-component slice. This enables you to temporarily define a single-component configuration in anticipation of adding more components in the future.

Note - Another use of a single-component configuration is to enable mirroring of that component. Root (/), /usr, swap, and any other file system used when the system is booting must be in single-component configurations.

Concatenations and stripes are given the metadevice name dn, where n is a number is the range 0 to 127.
After the metadevice is configured, it can be used just as if it were a physical slice. As with physical slices, a file system can be created on the metadevice. Most UNIX disk utilities will work normally on metadevices, with the exception of format(1M).
In addition, all usual file system operations can be performed on a metadevice. The following list offers examples of file system operations:
  • Mount (mount(1M)) the metadevice on a directory
  • Unmount (umount(1M)) a mounted metadevice
  • Copy files to the mounted metadevice
  • Read and write files from and to the mounted metadevice
  • Run ufsdump(1M) and ufsrestore(1M) on the metadevice
A drawback of concatenations, stripes, and concatenated stripes is that the loss of a single physical slice can cause the loss of service to the entire metadevice. This can be solved through mirroring or RAID and the use of hot spares. These three topics are discussed in subsequent chapters.

Hardware and Software Considerations

Both hardware and software considerations affect concatenations and stripes.
The only software consideration involves determining the interlace size when you build a stripe.
The hardware considerations include component size, number of controllers, component geometry, and the I/O load on the bus.
Refer to Chapter 4 of the Solstice DiskSuite 4.0 Administration Guide for additional information on the hardware and software considerations.

Defining Metadevice Configurations

The following sections show how to define concatenations, stripes, and concatenated stripes using DiskSuite Tool.

Concatenated Metadevices

Concatenation can help solve the single slice capacity limitation. For instance, concatenations enable a single database to exist on a single metadevice spanning multiple physical slices.
Figure 4-3 shows two physical components and a metadevice. The physical components are /dev/dsk/c6t5d4s0 and /dev/dsk/c7t0d0s0 and the metadevice is /dev/md/dsk/d6. As illustrated in Figure 4-3, a metadevice is a "virtual disk" and can be used like a physical disk slice.

Graphique

Figure 4-3

To set up a concatenation of the two physical components as shown in Figure 4-3, using DiskSuite Tool, perform the following steps:
  1. Start DiskSuite Tool.


  # metatool  

  1. Open a Concat/Stripe template on the Metadevice Editor canvas.

    Click on the Concat/Stripe template. An unassigned and uncommitted Concat/Stripe template is opened on the Metadevice Editor canvas. When you point to the template, the message line shows the metadevice name, size, use, and status.

Imported image(459x255)

  1. Open the Slice Browser.

    Click on Slices on the button panel.

Internal bitmap(360x138)

  1. Select the slices that will be concatenated.

    Scroll through the list of the devices on the Slice Browser and locate the two slices that will be concatenated. Click on the first slice that will be concatenated, then hold down the Control key and click on the second slice.

Imported image(360x195)

  1. Drag the two slices into the Concat/Stripe template.

    Point to one of the two selected slices, press the middle button, and drag the slices to the Concat/Stripe d6 template.

  1. Select Concat as the type of device.

    The Stripe or Concatenate dialog box is displayed. Click on the Concat button.

Internal bitmap(360x133)

  1. Commit the new device.

    Click on the top rectangle of the Concat/Stripe object. Then click on the Commit button on the button panel. Information about the new devices is written to the appropriate files.

Imported image(360x159)

The Configuration Log shows Concat/Stripe d6 was committed.

Internal bitmap(360x105)

  1. Put the d6 Concat/Stripe object away.

    Click on the top rectangle of the d6 Concat/Stripe object. Then click on the Put Away button on the button panel. The d6 Concat/Strip is placed in the device list.

Striped Metadevices

When components are configured into stripes, faster I/O throughput can be obtained. The ideal configuration of stripes would have each component on a separate disk controller. This configuration would deliver the best performance.
A configuration that delivers good performance would have the components on separate disks, but possibly on the same controller.

Note - Striping the slices on a single disk should be avoided. This will hurt performance.

You cannot change the interlace value of an existing stripe with DiskSuite Tool. To change the value, back up the metadevice, redefine the metadevice with a different value, and restore the data.
Figure 4-4 shows two physical components and a metadevice. The physical components are /dev/dsk/c6t5d1s0 and /dev/dsk/c7t0d1s0 and the metadevice is /dev/md/dsk/d7. The dotted rectangle represents the stripe defined in this example. The interlace value is 32 Kbytes.

Graphique

Figure 4-4

To set up a stripe of the two physical components shown in Figure 4-4, by using DiskSuite Tool, perform the following steps:
  1. Start DiskSuite Tool.


  # metatool  

  1. Open a Concat/Stripe template on the Metadevice Editor canvas.

    Click on the Concat/Stripe template. An unassigned and uncommitted Concat/Stripe object is opened on the Metadevice Editor canvas. When you point to the template, the message line shows the metadevice name, size, use, and status.

Imported image(459x255)

  1. Open the Slice Browser.

    Click on Slices on the button panel.

Internal bitmap(360x143)

  1. Select the slices that will be striped.

    Scroll through the list of the devices on the Slice Browser and locate the two slices that will be striped. Click on the first slice that will be striped, then hold down the Control key and click on the second slice.

Imported image(360x201)

  1. Drag the two slices into the Concat/Stripe template.

    Point to one of the two selected slices and hold down the middle button. Drag the slices to the Concat/Stripe d7 template and release the button.

  2. Select Stripe as the type of device.

    The Stripe or Concatenate dialog box is displayed. Click on the Stripe button.

Internal bitmap(360x133)

  1. Optionally change the interlace size.

    By default the interlace value of a stripe is 16 Kbytes. To change the interlace value, point to the rectangle where the "stripe 0 of d7" text appears, press the right button, and select the Info option.

Imported image(360x192)

The Stripe Information window appears, displaying information about the stripe. To change the interlace value, click on the Custom button. Enter the new value in the fields. Click on the Attach button.

Imported image(360x312)

  1. Commit the new device.

    Click on the top rectangle of the Concat/Stripe object. Then click on the Commit button on the button panel. Information about the new devices is written to the appropriate files.

Imported image(360x159)

The Configuration Log shows Concat/Stripe d7 was committed.

Internal bitmap(360x105)

  1. Put the d7 stripe away.

    Point inside the top rectangle of the Concat/Stripe object and press the right button. Select Put Away on the menu.

Imported image(360x117)

Metadevices Defined as Concatenated Stripes

Concatenated stripes enable you to expand an existing stripe and provide some improved performance over simple concatenations.
Figure 4-5 shows three physical components and a metadevice. The physical components are /dev/dsk/c6t5d3s0, /dev/dsk/c7t0d2s0, and /dev/dsk/c7t0d3s0. The metadevice is /dev/md/dsk/d8. The first stripe (shown as a dotted rectangle) is made up of portions of two physical components and the second stripe is one component.

Graphique

Figure 4-5

To use DiskSuite Tool to set up the concatenated stripe shown in Figure 4-5, perform the following steps:
  1. Start DiskSuite Tool.


  # metatool  

  1. Open a Concat/Stripe template on the Metadevice Editor canvas.

    Click on the Concat/Stripe template. An unassigned and uncommitted Concat/Stripe template is opened. When you point to the template, the message line shows the metadevice name, size, use, and status.

Imported image(459x258)

  1. Open the Slice Browser.

    Click on Slices on the button panel.

Internal bitmap(360x143)

  1. Select the two slices that will be striped.

    Scroll through the list of the devices in the Slice Browser and locate the two slices that will be concatenated. Click on the first slice that will be concatenated, then hold down the Control key and click on the second slice.

Imported image(360x209)

  1. Drag the two slices into the Concat/Stripe d8 template. Point to one of the two selected slices and hold down the middle button. Drag the slices to the Concat/Stripe d8 template and release the button.

  2. Select Stripe as the type of device.

    The Stripe or Concatenate dialog box is displayed. Click on the Stripe button.

Internal bitmap(360x133)

The stripe is populated with the two slices.

Internal bitmap(360x126)

  1. Optionally change the interlace size.

    By default the interlace value of a stripe is 16 Kbytes. To change the interlace value, point inside the rectangle that contains the "stripe 0 of d8" text and press the right button. Select the Info option.

Imported image(360x172)

The Stripe Information window appears, displaying information about the stripe. To change the interlace value, click on the Custom button. Enter the new value in the fields. Click on the Attach button.

Imported image(360x312)

  1. Select the slice to be concatenated to the stripe.

    Scroll through the list of components in the Slice Browser to locate the slice that will be concatenated at the end of the d8 stripe (c7t0d3s0).

  2. Drag the slice into the Concat/Stripe d8 template. Point to the slice and press and hold down the middle button. Drag the slice to the top of the Concat/Stripe d8 template and release the button.

The concatenated stripe is then populated with the c7t0d3s0 slice.

Imported image(360x170)

  1. Commit the d8 Concat/Stripe.

    Click on the top rectangle of the d8 Concat/Stripe object. Then click on the Commit button on the button panel. Information about the new devices is written to the appropriate files.

Imported image(360x194)

  1. Put the d8 Concat/Stripe away.

    Click on the top rectangle of the Concat/Stripe object. Then click on the Put Away button on the button panel.

Replacing Failed Components

To remove a component from a concatenation or a stripe (for example, if a component is reporting soft errors), use one of the following methods:
  • If the metadevice is not in a mirror or in a RAID, use the instructions in Chapter 4 of the Solstice DiskSuite 4.0 Administration Guide to replace the failing component (if another disk is already attached to the system).
  • If the metadevice is in a mirror (described in Chapter 5, "Mirroring") or in a RAID (described in Chapter 9, "RAID Devices"), use DiskSuite Tool to replace the faulty component. The following example shows replacement of a failed component in a mirror.
  1. Start DiskSuite Tool.


  # metatool  

  1. Open the mirror on the Metadevice Editor canvas.

    Double-click on the mirror with the error. In this example, mirror d5 has been opened. A component error with a slice in the d4 submirror is being reported. The status is Critical.

Imported image(459x265)

  1. Open the Slice Information window.

    Point inside the submirror rectangle and press the right button. Select Info from the menu.

Imported image(360x142)

  1. View the size and condition.

    The Slice Information window displays the size and condition of the slice. The problem is with stripe 1, which is the slice c7t2d1s0. The replacement slice must be 989.30 Mbytes or larger.

Imported image(360x274)

  1. Open the Slice Browser.

    Click on Slices on the button panel.

Internal bitmap(360x142)

  1. Locate a replacement slice.

    Scroll through the list of slices and locate an unused slice that is 989.30 Mbytes or locate multiple slices that have a combined size of 989.30 Mbytes. The slice or slices selected should be attached to a different controller than the slices in the other submirror to help ensure availability of data. (Refer to "Setting Browser Filters" on page 50 for information about how to display slices of a certain size or other criteria.)

Imported image(360x168)

  1. Drop the replacement slice on the errored component.

    Point to the replacement slice. Press and hold down the middle button. Drag the cursor to the rectangle that contains the failed component, c7t2d1s0. Release the button.


Note - Be sure to point the cursor inside the rectangle that contains the device number of the errored component, instead of other rectangles inside the Concat/Stripe template.

Imported image(360x131)

  1. Commit the mirror.

    Click on the top rectangle of the d5 Mirror. Then click on the Commit button.

Imported image(360x222)

Clearing Concatenations and Stripes

You can easily clear (delete) a concatenation or stripe and use the components in a traditional fashion.

CAUTION Caution - Any data that is on the concatenation or stripes will be lost when the metadevice is cleared. Be sure to back up the data on the metadevice.

The procedure for clearing concatenations or stripes is described in the following example. In this example, the metadevice that is being cleared is named d7.
  1. Back up the data.

    Back up all data currently on the components that make up the metadevice (either the stripe or concatenation).

  1. Stop access to the data on the metadevice.

    For example, if a file system resides on the metadevice, unmount (with umount(1M)) the file system.


  # /sbin/umount /dev/md/dsk/d7  

  1. Open the d7 Concat/Stripe on the Metadevice Editor canvas. Point to the d7 Concat/Stripe in the device list and double-click the left button.

Imported image(459x260)

  1. Bring up the menu and select the Delete choice.

    Point inside the top of the d7 metadevice object and press the right button. Drag the cursor to the Delete choice and release the button.

Imported image(360x125)

  1. Select Really Delete when the dialog box is displayed.

    Click on the Really Delete button.

Internal bitmap(360x115)

  1. Check the Configuration Log to ensure the metadevice was deleted.

    When the deletion is completed, the Configuration Log window will pop to the front and display the message that the Concat/Stripe was deleted.

Internal bitmap(360x111)


Note - Any hot spare pools assigned to d7 are preserved.

Concat Information Window

DiskSuite Tool supports several options to view and manipulate concatenations. The Concat Information window is shown in Figure 4-6. There are three ways to display the Concat Information window:
  • Point to the Concat/Stripe object in the Metadevice Browser and double-click the left button. The Concat/Stripe object is opened on the Metadevice Editor's canvas and the Concat Information window will display.
  • If the Concat/Stripe object is on the Metadevice Editor's canvas, point inside the template and bring up the concatenation menu. Select the Info choice.
  • Double-click on a Concat/Stripe object on the Metadevice Editor's canvas.

Graphique

Figure 4-6

Table 4-1 lists the functionality associated with the regions of the Concat Information window.
Table 4-1
FieldFunctions
Device nameThe metadevice name of the concatenation.
StatusDescription of the concatenation's status. See "Checking the Status of Concatenations and Stripes" on page 91" for a description of the values that appear in this region.
SizeThe size of the concatenation.
UseHow the concatenation is currently used (for example, submirror).
Hot Spare PoolThe entry field for specifying the name of a Hot Spare Pool to be associated with the concatenation. To attach a hot spare pool enter the name in the field and click on the Attach button. The Hot Spare Pool Information window is displayed when you enter a hot spare pool name and click on the Info button.
Show stripesThis radio button enables you to turn on and off the stripe manipulation region. The number of stripes in the concatenation are shown in parentheses on the button.
Stripe manipulation regionThe following functionality is available in this region: List of stripes - Provides the size and status of each stripe included in the concatenation.

Attach - Attaches a new and empty stripe to the concatenation. Remove - Removes the selected stripe from the concatenation. Info - Brings up the Stripe Information window for the selected (highlighted) stripes.

Stripe Information Window

DiskSuite Tool supports several options for stripes. You set the options using choices on the Stripe Information window, as shown in Figure 4-7. There are three ways to display the Stripe Information window:
  • Point inside the stripe rectangle of the Concat/Stripe object and double-click.
  • If the Concat/Stripe object is on the Metadevice Editor's canvas, point inside the template and bring up the stripe menu. Select the Info choice.

Graphique

Figure 4-7

Table 4-2 lists the functionality associated with the regions of the Stripe Information window.
Table 4-2
FieldFunctions
Device nameThe metadevice name of the stripe.
StatusDescription of the stripe's status. See "Checking the Status of Concatenations and Stripes" on page 91" for a description of the values that appear in this region.
SizeThe size of the stripe.
Interlace value regionThe default interlace value is 16 Kbytes. To change the interlace value, click on the Custom button and enter the value in the field. The menu button to the right of the field enables you to specify the units used. The values on the menu are Gbytes, Mbytes, Kbytes, and Sectors. The default is Kbytes. After the Custom field is complete, the Attach button is used to assign the interlace value to the stripe. After a stripe is committed, the interlace value cannot be changed.
Show slicesThis toggle button enables you to turn on and off the slice manipulation region. The number of slices in the stripe are shown in parentheses on the button.
Slice

manipulation region

The following functionality is available in this region: Scrolling List - Shows slices included in the stripe. The information in this region includes the name of the slice, size, number of state database replicas on the slice, and the status. Enable - Activates the selected slices if they are disabled. Remove - Removes the selected slices. Slice - Enables you to specify a new slice to attach to the stripe or replace the selected slice. If no slice is selected, the button is unavailable.

Attach - Attaches the slice specified in the Slice field to the stripe. This button is active only when a slice name is entered in the field.

Replace - Replaces the selected stripe with the slice entered in the Slice field. This button is active only when a slice name has been entered in the field and a slice is selected on the scrolling list.

Info - Displays the Slice Information window for the selected (highlighted) slice.

Checking the Status of Concatenations and Stripes

There are three ways to check the status of a Concat/Stripe metadevice using DiskSuite Tool. The methods are:
  • Move the Concat/Stripe metadevice from the device list and check the Status field on the object.
  • Bring up the Concat/Stripe Information window and check the Status field.
  • Bring up the Problem List, which is available using the Browse menu on the menu bar of the Metadevice Editor window. If a problem exists, a detailed description of the problem is given.
The Status fields of the Concat/Stripe metadevice use the status keywords explained in Table 4-3.
Table 4-3
KeywordMeaning
OKThe Concat/Stripe metadevice has no errors and is functioning correctly.
AttentionThere is a problem with the Concat/Stripe metadevice, but there is no immediate danger of losing data.
UrgentThere is a problem with the Concat/Stripe metadevice and you are only one failure away from losing data.
CriticalData has potentially been corrupted.
Slices may be reported with any of the additional keywords shown in Table 4-4.
Table 4-4
KeywordMeaning
OKThe slice is part of a metadevice that reports its status as okay.
EnabledThe slice is currently out of service but is scheduled to be
enabled the next time you click on the Commit button.
ResyncingThe slice is currently being resynced. This happens after you click on Enable or Remove on the Slice Information window.
SparedThe slice is currently being replaced in the metadevice by a slice from a Hot Spare Pool.