Sie sind auf Seite 1von 9

Beginners Lesson VERITAS Volume Manager for Solaris

Veritas Volume Manager is a storage management application by symantec , which allows you to manage physical disks as logical devices called volumes. VxVM uses two types of objects to perform the storage management 1. Physical objects - are direct mappings to physical disks 2 . Virtual objects - are volumes, plexes, subdisks and diskgroups. a. Disk groups are composed of Volumes b. Volumes are composed of Plexes and Subdisks c. Plexes are composed of SubDisks d. Subdisks are actual disk space segments of VxVM disk ( directly mapped from the physical disks)

1. Physical Disks
Physical disk is a basic storage where ultimate data will be stored. In Solaris physical disk names uses the convention like c#t#d# where c# refers to controller/adapter connection, t# refers to the SCSI target Id , and d# refers to disk device Id. Below figure illustrates how the disk name changes depending on the connection. Physical disks could be coming from different sources within the servers e.g. Internal disks to the server , Disks from the Disk Array and Disks from the SAN.

Solaris native disks

Check the disks recognized by Solaris


#echo|format Searching for disksdone AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80> /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0 1. c0t1d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133> /sbus@1f,0/SUNW,fas@e,8800000/sd@1,0

2. Solaris Native Disk Partitioning


In solaris, physical disks will partitioned into slices numbered as S0,S1,S3,S4,S5,S6,S7 and the slice number S2normally called as overlap slice and points to the entire disk. In Solaris we use the format utility used to partition the physical disks into slices. Once we added new disks to the Server, first we should recognize the disks from the solaris level before proceeding for any other storage management utility.

Solaris Disk Partitioning

Steps to add new disk to Solaris:


If the disks that are recently added to the server not visible, you can use below procedure Option 1: Reconfiguration Reboot ( for the server hardware models that doesnt support hot swapping/dynamic addition of disks ) # touch /reconfigure; init 6 or #reboot -r ( only if no applications running on the machine) Option 2: Recognize the disks added to external SCSI, without reboot # devfsadm # echo | format <== to check the newly added disks Option 3: Recognize disks that are added to internal scsi, hot swappable, disk connections. Just run the command cfgadm -al and check for any newly added devices in unconfigured state, and configure them. # cfgadm -al Ap_Id c0 c0::dsk/c0t0d0 c0::dsk/c0t0d0 c0::rmt/0 c1 c1::dsk/c1t0d0 c1::dsk/c1t1d0 disk disk tape scsi-bus Type Receptacle Occupant scsi-bus connected Condition

configured unknown

connected connected connected

configured unknown configured unknown configured unknown configured unknown

connected

unavailable connected unavailable connected

unconfigured unknown <== disk not configured unconfigured unknown < == disk not configured

# cfgadm -c configure c1::dsk/c1t0d0 # cfgadm -c configure c1::dsk/c1t0d0 # cfgadm -al Ap_Id c0 c0::dsk/c0t0d0 c0::rmt/0 c1 c1::dsk/c1t0d0 c1::dsk/c1t1d0 # devfsadm #echo|format <== now you should see all the disks connected to the server Additional Procedure : Click here to check the procedure to add Internal FC-AL disks disk disk disk tape scsi-bus Type scsi-bus Receptacle Occupant connected Condition

configured unknown

connected connected

configured unknown configured unknown configured unknown

connected

connected connected

configured unknown <= Disk configured now configured unknown <= Disk configured now

3. Initialize Physical Disks under VxVM control


A formatted physical disk is considered uninitialized until it is initialized for use by VxVM. When a disk is initialized, partitions for the public and private regions are created, VM disk header information is written to the private region and actual data is written to Public region. During the notmal initialization process any data or partitions that may have existed on the disk are removed. Note: Encapsulation is another method of placing a disk under VxVM control in which existing data on the disk is preserved An initialized disk is placed into the VxVM free disk pool. The VxVM free disk pool contains disks that have been initialized but that have not yet been assigned to a disk group. These disks are under Volume Manager control but cannot be used by Volume Manager until they are added to a disk group Device Naming Schemes In VxVM, device names can be represented in two ways:

Using the traditional operating system-dependent format c#t#d# Using an operating system-independent format that is based on enclosure names

c#t#d# Naming Scheme Traditionally, device names in VxVM have been represented in the way that the operating system represents them. For example, Solaris and HP-UX both use the format c#t#d# in device naming, which is derived from the controller, target, and disk number. In VxVM version 3.1.1 and earlier, all disks are named using the c#t#d# format. VxVM parses disk names in this format to retrieve connectivity information for disks. Enclosure-Based Naming Scheme With VxVM version 3.2 and later, VxVM provides a new device naming scheme, called enclosure-based naming. With enclosure-based naming, the name of a disk is based on the logical name of the enclosure, or disk array, in which the disk resides.

Disks moving into Veritas Control

Steps to Recognize new disks under VxVM control


1. Run the below command to see the available disks under VxVM control # vxdisk list in the output you will see below status

error indicates that the disk has neither been initialized nor encapsulated by VxVM. The disk is uninitialized. online indicates that the drive has been initialized or encapsulated. online invalid indicated that disk is visible to VxVM but not controlled by VxVM

If disks are visible with format command but not visible with vxdisk list command, run below command to scan the new disks for VxVM # vxdctl enable Now you should see new disks with the status of Online Invalid 2. Initialize each disk with vxdisksetup command #/etc/vx/bin/vxdisksetup -i <disk_address> after running this command vxdisk list should see the status as online for all the newly initialized disks

4. Virtual Objects (DiskGroups / Volumes / Plexs ) in VxVM


Disk Groups A disk group is a collection of VxVM disks ( going forward we will call them as VM Disks ) that share a common configuration. Disk groups allow you to group disks into logical group of Subdisks called plexes which in turn forms the volumes. Volumes A volume is a virtual disk device that appears to applications, databases, and file systems like a physical disk device, but does not have the physical limitations of a physical disk device. A volume consists of one or more plexes, each holding a copy of the selected data in the volume. Plexes: VxVM uses subdisks to create virtual objects called plexes. A plex consists of one or more subdisks located on one or more physical disks. From the below diagram you can observer below points

The Diskgroup named Diskgroup_o1 is created using 4 different VM disks named as vxdisk_0x, vxdisk_oy, vxdisk_oz and vxdisk_oa The diskfgroup Diskgroup_01 was configured with 4 different volumes i.e. 1. Concat_vol 2. striped_vol 3. mirror_vol and 4. raid5_vol Concat_vol is a concatenation volume with single plex i.e. con_plex01 inside,

and con_plex01 was build up using 4 subdisks of different size Striped_vol is a striped volume with single plex i.e. stripe_plex01 inside, and stripe_plex01 was build up using 4 subdisks of same size

mirror_vol is a mirrored volume with two plexes named mplex01 and mplex02 inside, each plex is copy of other. Both the plexes formed with different subdisks of either same size or different size.

raid5_vol is a raid5 ( striped with parity) volume which build up using 3 different plexes formed with the subdisks of 3 different VM disks.

Components of Veritas Volume Manager

Summary Transformation of Physical disks into Veritas Volumes


Below diagram shows you the complete transformation of a physical disk into a veritas volume. And below is the summary of complete process 1. Recognize disks under solaris using devfsadm, cfgadm or reconfiguration reboot , and verify using formatcommand 2. 3. 4. 5. Recognize Initialize Add Create the the the disks to under disks disks Veritas Disk under VxVM under Disk Group using VxVM Group vxdctl enable

using vxdisksetup using vxdg commands

Volumes

using vxmake or vxassist commands

6. Create filesystem on top of volumes using mkfs or newfs, and you can create either VXFS filesystem or UFSfilesystem

Transformation of Solaris Disks into VERITAS Volumes

Solaris Volume Manager Vs Veritas Volume Manager


Below diagram explains how Solaris volume manager differs from the Veritas volume manager during the process of creating a new file system on top of physical storage.

Solaris Volume Manager vs Veritas Volume Manager

Das könnte Ihnen auch gefallen