HP VERITAS Volume Manager

   

HP-UX Virtual Partitions
By Marty Poniatowski

Table of Contents
Chapter 9.  File Systems


At the time of this writing HP Veritas Volume Manager (which I'll call VxVM throughout much of this chapter) is a software product loaded from the HP-UX 11i Application CD-ROM. There is a version of VxVM bundled with 11i called Base HP VERITAS Volume Manager and a full version called HP VERITAS Volume Manager. The Base product is a subset of the full version. With both versions of VxVM there is a Java-based administration interface, striping (RAID 0), concatenation, path failover support, online resizing of volumes, and a task monitor. The full version performs all of the functions in the Base product and also supports load balancing, hot relocation and unrelocation, mirroring of up to 32 copies (RAID 1), mirrored stripes, striped mirrors, RAID 5, online migration, and online relayout. The features of each are described in the HP VERITAS Volume Manager Release Notes.

On the system used for the examples compiled for the VxVM part of this chapter the root disk setup at the time 11i was originally loaded on the system was under control of Logical Volume Manager (LVM.) After loading HP Veritas Volume Manager as an application we can then perform storage administration on other disks on the system. The root disk will remain under LVM control and not be placed under VxVM control.

In the upcoming sections, we'll load HP Veritas Volume Manager and perform some basic storage management tasks so you can get a feel for this product. This is a product that has a lot of functionality and manuals devoted to using it, so in this part of the chapter we'll cover some of the basics. Please see docs.hp.com for a complete list of manuals on VxVm. Two that contain much more detailed information on configuring and using VxVM are HP VERITAS Volume Manager Release Notes and HP VERITAS Volume Manager Administrator's Guide.

HP VERITAS Volume Manager Setup

After loading HP Veritas from the Applications CD-ROM we have to decide what disk(s) we want to control with VxVM. Let's run ioscan to view the disks in our L-Class system:

 # ioscan -funC disk  Class     I  H/W Path     Driver S/W State   H/W Type     Description  =====================================================================  disk      0  0/0/1/1.2.0  sdisk CLAIMED     DEVICE       SEAGATE ST318203LC                           /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0  disk      1  0/0/2/0.2.0  sdisk CLAIMED     DEVICE       SEAGATE ST318203LC                           /dev/dsk/c2t2d0   /dev/rdsk/c2t2d0  disk      2  0/0/2/1.4.0  sdisk CLAIMED     DEVICE       TOSHIBA CD-ROM XM-6201TA                           /dev/dsk/c3t4d0   /dev/rdsk/c3t4d0 

This output shows two internal disks and a CD-ROM drive (we'll later add two more disks to demonstrate a setup of mirroring and striping). The root disk under LVM control is c1t2d0. We want to use VxVM to perform various storage management functions on disk c2t2d0. If there is any LVM header information on this disk, it must be removed prior to proceeding with any VxVM functions on the disk. The following two LVM-related commands were issued to create and remove this disk from LVM:

 # pvcreate -f /dev/rdsk/c2t2d0  Physical volume "/dev/rdsk/c2t2d0" has been successfully created.  # pvremove /dev/rdsk/c2t2d0  The physical volume associated with "/dev/rdsk/c2t2d0" has been  removed.  # 

You may not have to issue the pvcreate command; however, I have found that issuing both commands works every time. This procedure is outlined in the Release Notes I mentioned earlier.

Next, we run vxinstall to perform the initial setup of VxVM. In the following procedure, we run vxinstall and select a Quick Installation, which walks us through evaluating the disks on the system and allows us to select those that we want to put under VxVM control:

 # vxinstall  Populating VxVM DMP device directories ....  Generating list of attached controllers....  Volume Manager Installation  Menu: VolumeManager/Install  The Volume Manager names disks on your system using the controller  and disk number of the disk, substituting them into the following    pattern:                 c<controller>t<disk>d<disk>    NOTE:  With the Dynamic Multipathing (DMP) facility of VxVM, the    controller number represents a multipath pseudo controller number    for those disk devices with multiple access paths.  For example,    if a disk has 2 paths from controllers c0 and c1, then the Volume    Manager displays only one of them, such as c0, to represent both    of the controllers.    Some examples would be:                 c0t0d0- first controller, first target, first disk                 c1t0d0- second controller, first target, first disk                 c1t1d0- second controller, second target, first disk    The Volume Manager has detected the following controllers on your  system:                 c1:                 c2:  Hit RETURN to continue.  ______________________________________________________________  Volume Manager Installation  Menu: VolumeManager/Install    You will now be asked if you wish to use Quick Installation or    Custom Installation. Custom Installation allows you to select how    the Volume Manager will handle the installation of each disk    attached to your system.    Quick Installation examines each disk attached to your system and    attempts to create volumes to cover all disk partitions that might    be used for file systems or for other similar purposes.    If you do not wish to use some disks with the Volume Manager, or if    you wish to reinitialize some disks, use the Custom Installation    option Otherwise, we suggest that you use the Quick Installation    option.  Hit RETURN to continue.  ______________________________________________________________  Volume Manager Installation Options  Menu: VolumeManager/Install  1            Quick Installation  2            Custom Installation  ?            Display help about menu  ??           Display help about the menuing system  q            Exit from menus  Select an operation to perform: 1  ______________________________________________________________  Volume Manager Quick Installation  Menu: VolumeManager/Install/QuickInstall/c1  Generating list of attached disks on c1....  <excluding c1t2d0>  No disks were found attached to controller c1 !  Hit RETURN to continue.  ______________________________________________________________  Volume Manager Quick Installation  Menu: VolumeManager/Install/QuickInstall/c2  Generating list of attached disks on c2....    The Volume Manager has detected the following disks on controller  c2:    c2t2d0  Hit RETURN to continue.  ______________________________________________________________  Volume Manager Quick Installation For Controller c2  Menu: VolumeManager/Install/QuickInstall/c2  Initialize all disks on this controller ? (destroys data on these  disks)  [y,n,q,?] (default: n) y  Are you sure ? (destroys data on these disks)  [y,n,q,?] (default: n) y   Volume Manager will now initialize all the disks on this controller  Hit RETURN to continue.  ______________________________________________________________  Volume Manager Quick Installation  Menu: VolumeManager/Install/QuickInstall/c2/Init  Use default disk names for these disks? [y,n,q,?] (default: y) y    The c2t2d0 disk will be given disk name disk01  Hit RETURN to continue.  ______________________________________________________________  Volume Manager Quick Installation  Menu: VolumeManager/Install/QuickInstall    The following is a summary of your choices.                 c2t2d0New Disk  Is this correct [y,n,q,?] (default: y)    The Volume Manager is now reconfiguring (partition phase)...    Volume Manager: Initializing c2t2d0 as a new disk.    The Volume Manager is now reconfiguring (initialization phase)...    Volume Manager: Adding disk01 (c2t2d0) as a new disk.    The Volume Daemon has been enabled for transactions    Starting the relocation daemon, vxrelocd.  # 

Notice that vxinstall found the one disk on our system not under LVM control and asked us if we wanted to initialize this disk. Since we have only one potential disk to place under VxVM control, it is the only disk found by

vxinstall. The Quick Installation we chose, as opposed to Custom Installation, makes some of the decisions for us, and in this case, helped us configure the disk quickly.

After running vxinstall, we can view the processes that have been started to support VxVM:

 # ps -ef | grep vx   root    34     0  0 12:52:28 ?         0:01 vxfsd   root  2978     0  0 12:58:59 ?         0:00 vxiod   root  4170  4156  0 13:07:35 ttyp4     0:00 vxnotify   root  4079     1  0 13:05:51 ?         0:00 vxconfigd -k -m enable   root  4165     1  0 13:07:35 ttyp4     0:00 /sbin/sh -                                      /usr/lib/vxvm/bin/vxrelocd root   root  4173  4165  0 13:07:35 ttyp4     0:00 vxnotify -f -w 15   root  4628  2900  1 13:16:12 ttyp4     0:00 grep vx  # 

The initial load and setup of VxVM is quick and easy. I suggest that you obtain documents from docs.hp.com if you don't have them in hardcopy in case you need to refer to them as part of the setup. Without the Release Notes I would have not known the procedure to free the second disk from LVM control so that I could place it under VxVM control.

Volume Manager Storage Administrator

After the setup of HP Veritas Volume Manager is complete, its graphical interface is invoked with /opt/HPvmsa/bin/vmsa for the Volume Manager Storage Administrator (I'll call this vmsa occasionally in this section). Figure 9-17 shows the interface for our L-Class system:

Figure 9-17. Volume Manager Storage Administrator

graphics/09fig17.gif

Figure 9-17 shows the many areas of administration that can be performed in this interface under our system name l3. We could also perform storage administration on additional systems, Hosts, and Clusters, which would be shown in the left-hand window along with system l3 which is now shown.

Let's now select some of the administration icons and see what is reported for our L-Class system. Figure 9-18 shows the Controllers on our system:

Figure 9-18. Controllers

graphics/09fig18.gif

Figure 9-18 shows two internal controllers on our system, c1 and c2. All L-Class systems have two internal controllers, and in our case, there are no additional controllers. We could also select these controllers individually to see what disks are connected to them if we so desired.

Let's now view the Disk Groups on our system as shown in Figure 9-19:

Figure 9-19. Disk Groups

graphics/09fig19.gif

Figure 9-19 shows one disk group, called rootdg which consists of one 17 GByte disk drive. This is the VxVM disk group we set up earlier. Notice that the LVM disk is not shown because it is not under VxVM control.

Next, we'll view Disks in Figure 9-20:

Figure 9-20. Disks

graphics/09fig20.gif

Figure 9-20 shows the two internal disks of our L-Class system. The first is in use by the Logical Volume Manager (root disk) and is not under the control of Veritas Volume Manager. It therefore has very little information associated with it because the VxVM interface does not recognize any of the LVM information. The second is our unused disk in rootdg that is called disk01.

Figure 9-21 shows the File Systems in use on our system:

Figure 9-21. File Systems

graphics/09fig21.gif

Figure 9-21 shows many filesystems in use. Notice that all but one of these filesystems is a Veritas filesystem as indicated by the vxfs. This is sometimes a point of confusion. There is a Veritas file system (vxfs) that defines the type of file system and there is the Veritas Volume Manager, which we're covering in this section and is used to manage filesystems. You can also manage Veritas file systems on HP-UX using LVM.

We know that we have one disk in rootdg that is unused at this time. Let's issue a couple of vx commands and compare these to what we see in the graphical interface. Table 9-1 at the end of this section that describes the use of some vx commands.

First, let's get a list of disks on the system with vxdisk:

 # vxdisk list  DEVICE      TYPE     DISK        GROUP       STATUS  c1t2d0      simple   -           -           LVM  c2t2d0      simple     disk01        rootdg       online  # 

The output of vxdisk shows two disks in our system. The first is the root disk, which is under LVM control, and the second is disk01, which is under VxVM control.

Next, let's get some detailed information with vxprint -ht:

 # vxprint -ht  Disk group: rootdg  DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID  DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE  RV NAME         RLINK_CNT    KSTATE   STATE    PRIMARY  DATAVOLS  SRL  RL NAME         RVG          KSTATE   STATE    REM_HOST REM_DG    REM_RLNK  V  NAME         RVG          KSTATE   STATE    LENGTH   USETYPE   PREFPLEX RDPOL  PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE  SD NAME         PLEX         DISK     DISKOFFS LENGTH   [CO  L/]OFF DEVICE MODE  SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE  dg rootdg       default      default  0        969390349.1025.l3  dm disk01       c2t2d0       simple   1024     17782088 - # 

Notice that only the information related to rootdg, which is under the control of the Veritas Volume Manager, has been produced. The dg is information related to the disk group and dm is information about the disk mechanism.In an upcoming vxprint, we'll add the -q option to eliminate the extensive header information produced with this output.

Next let's see what we have free on rootdg with the vxdg command:

 # vxdg free  GROUP        DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS  rootdg       disk01       c2t2d0       c2t2d0       0         17782088  -

This output shows that we have nearly the full 18 GBytes of the disk free at this time.

We can now go back to the graphical interface and create a usable volume by selecting rootdg and entering information related to the new volume as shown in Figure 9-22:

Figure 9-22. Creating a New Volume

graphics/09fig22.gif

The maximum size that we could have made this volume is the total size of the unused disk of which rootdg is comprised, which is 17781760 bytes. We have selected about 1 GByte without RAID 5 because another disk would have been required. The default name of vol01I is used. In addition, selecting Add File System... from the bottom of Figure 9-22 brought up the window in Figure 9-23:

Figure 9-23. Specifying File System Information of a New Volume

graphics/09fig23.gif

In Figure 9-23 we selected a name of /dataspace as the mount point and have selected vxfs as the file-system type. After clicking OK, a new volume is created, as shown in Figure 9-24:

Figure 9-24. vol01

graphics/09fig24.gif

Figure 9-24 shows vol01 with a mount point of /dataspace. We can use the vxprint command with some useful options to see volume information. This includes information on the volume we just created. The following vxprint shows some useful options in the following listing:

 # vxprint -AGtsq  Disk group: rootdg  dg rootdg       default      default  0        969390349.1025.l3  sd disk01-01    vol01-01     disk01   0        1000000  0         c2t2d0   ENA  # 

This output shows that our roughly 1 GByte area on c2t2d0 is in place. We issued this vxprint with the -q option to eliminate the header information shown in the earlier example.

This simple example demonstrates the ease with which volumes can be added using VxVM. In the next section, we'll add two disks to the system and perform some additional setup.

HP VERITAS Volume Manager Mirroring and Striping

Now that we've covered the basics of VxVM, let's take the next step and add two additional disks to our system and use mirroring and striping.

To begin with, let's again use the vxdisk command to see the two new disks we've added to the system:

 # vxdisk list  DEVICE       TYPE      DISK         GROUP        STATUS  c1t0d0       simple    -            -            online invalid  c1t2d0       simple    -            -            LVM  c2t0d0       simple    -            -            online invalid  c2t2d0       simple    disk01       rootdg       online  # 

At this point, the disks are listed, but they have not been configured in any way. These disks were physically added to the system, and no additional commands were issued prior to the vxdisk.

Let's now go to the graphical interface and configure these disks. Figure 9-25 shows a total of four disks, including our two new unconfigured disks:

Figure 9-25. Two New Disks in vmsa

graphics/09fig25.gif

Figure 9-25 shows that disks c1t0d0 and c2t0d0 are installed and Not Initialized. Let's now add these disks to a new disk group, called test, using the graphical interface as shown in Figure 9-26 for the first of the two disks:

Figure 9-26. Adding New Disk to Group test

graphics/09fig26.gif

We add both disks to test graphically using the Add Disk(s) window. This results in the screen shown in Figure 9-27, in which both new disks, test01 and test02, are part of test:

Figure 9-27. Two New Disks Added to Group test

graphics/09fig27.gif

We ca confirm the disks in test with the vxdisk command as shown in the following listing:

 # vxdisk list  DEVICE       TYPE      DISK         GROUP        STATUS  c1t0d0       simple    test01       test         online  c1t2d0       simple    -            -            LVM  c2t0d0       simple    test02       test         online  c2t2d0       simple    disk01       rootdg       online  # 

The disks are now shown as configured with names of test01 and test02 and both are online. Both of these disks are part of Group test.

Next, let's create a striped and mirrored volume in our new disk group test. Selecting New from the items on the vmsa window brings up the dialog box shown in Figure 9-28.

Figure 9-28. Creating a New Volume That is Striped and Mirrored

graphics/09fig28.gif

From Figure 9-28, you can see all of the characteristics specified for vol02. It is roughly 5 GBytes in size, it is striped, and it has one mirror copy. It is a file system type of vxfs and has a mount point of /protected.

After adding this volume, it appears in the vmsa window as shown in Figure 9-29:

Figure 9-29. Volume vol02

graphics/09fig29.gif

We could go to the command line to confirm the presence of vol02 with vxprint and no options, as shown in the following listing:

 # vxprint  Disk group: rootdg  TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0  dg rootdg       rootdg       -        -        -        -        -       - dm disk01       c2t2d0       -        17782088 -        -        -        v  vol01        fsgen        ENABLED  1000000  -        ACTIVE   -        pl vol01-01     vol01        ENABLED  1000000  -        ACTIVE   -       - sd disk01-01    vol01-01     ENABLED  1000000  0        -        -       - Disk group: test  TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0  dg test         test         -        -        -        -        -       - dm test01       c1t0d0       -        17782088 -        -        -        dm test02       c2t0d0       -        17782088 -        -        -       - v  vol02        fsgen        ENABLED  5000000  -        ACTIVE   -        pl vol02-03     vol02        ENABLED  5000064  -        ACTIVE   -       - sv vol02-S01    vol02-03     ENABLED  2500032  0        -        -       -    sv vol02-S02    vol02-03     ENABLED  2500032  0        -         - v  vol02-L01    fsgen        ENABLED  2500032  -        ACTIVE   - pl vol02-P01    vol02-L01    ENABLED  LOGONLY  -        ACTIVE   - sd test01-03    vol02-P01    ENABLED  33       LOG      -        - pl vol02-P02    vol02-L01    ENABLED  2500032  -        ACTIVE   - sd test01-04    vol02-P02    ENABLED  2500032  0        -        - v  vol02-L02    fsgen        ENABLED  2500032  -        ACTIVE    - pl vol02-P03    vol02-L02    ENABLED  LOGONLY  -        ACTIVE   -       - sd test01-05    vol0 2-P0    ENABLED  33       LOG      -        -       - pl vol02-P04    vol02-L02    ENABLED  2500032  -        ACTIVE    - sd test02-02    vol02-P04    ENABLED  2500032  0        -        -       - # 

This output shows our 5 GByte volume as mirrored.

In addition, we want to see /protected as a mounted file system with bdf:

 # bdf  Filesystem          kbytes    used   avail %used Mounted on  /dev/vg00/lvol3     204800   55509  140002   28% /  /dev/vg00/lvol1     199381   46526  132916   26% /stand  /dev/vg00/lvol8     921600   38739  827833    4% /var  /dev/vg00/lvol7     937984  793162  135806   85% /usr  /dev/vg00/lvol4     204800    1529  190628    1% /tmp  /dev/vg00/lvol6     835584  722803  105775   87% /opt  /dev/vg00/lvol5     204800    1162  190917    1% /home  /dev/vx/dsk/rootdg/vol01                     1000000    1349  936243    0% /dataspace  /dev/vx/dsk/test/vol02                     5000000    2693 4685038    0% /protected  # 

Our new volume, vol02, has been created with a size of 5 GBytes and a mount point of /protected.

Several of the basics of using VxVM were covered in the previous examples. This by no means is an exhaustive coverage of VxVM, but hopefully, it serves as a good introduction. Please refer to the detailed information in the manuals related to VxVM.

Although we focused mostly on vmsa in this section there are a number of vx commands that you can issue that perform the same functions as the graphical interface. I sometimes like to issue commands to view volume-related work that I have performed in the graphical interface just to confirm the results. Table 9-1 lists some of the most commonly used vx commands and their functions.

Table 9-1. VxVM Commands

Command

Description

vxassist

Create and change volumes.

vxdctl

Manage the vxconfigd daemon.

vxdg

Perform tasks related to disk groups.

vxdisk

Perform tasks related to disks.

vxdiskadd

Used to add disks.

vxedit

Change VxVM objects.

vxmake

Create VxVM objects.

vxmend

Correct configuration problems.

vxplex

Perform plex-related tasks.

vxprint

Print configuration information.

vxsd

Perform tasks on subdisks.

vxstat

Print volume statistics.

vxtrace

Trace volume tasks.

vxunrelocate

Move relocated subdisks.

vxvol

Perform volume tasks.

These commands are covered in the HP documentation set, and there are also man pages available which provide detailed usage information on the commands.


       
    Top
     



    HP-UX Virtual Partitions
    HP-UX Virtual Partitions
    ISBN: 0130352128
    EAN: 2147483647
    Year: 2002
    Pages: 181

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net