This action might not be possible to undo. Are you sure you want to continue?
Veritas Volume Manager ‐ Part 1
Veritas Volume Manager 1. Volume Manager Objects 1.1 Disks 1.2 Disk groups 1.3 Volume Manager disks 1.4 Subdisks 1.5 Plexes 1.6 Volumes 1.7 Volume Manger Objects & their Relationship 2. Volume Manager Configuration ( options menu) 2.1 Add or initialize one or more disks 2.2 Encapsulate one or more disks 2.3 Remove a disk 2.4 Remove a disk for replacement 2.5 Replace a failed or removed disk 2.6 Mirror volumes on a disk 2.7 Move volumes from a disk 2.8 Enable access to (import) a disk group 2.9 Remove access to (deport) a disk group 2.10 Enable (online) a disk device 2.11 Disable (offline) a disk device 2.12 Mark a disk as a spare for a disk group 2.13 Turn off the spare flag on a disk About Veritas volume manager : Veritas Volume Manager is a software product from veritas Inc. and it is used to manage disk storage . The main features of volume manager are following : 1. Allows creation of logical volumes spanning over multiple disks. This overcomes the physical limit of the disk . 2. Provides high availability storage solutions through RAID ,Mirroring of disks . 3. Provides fail over features by providing transferable disk group ownership between systems. 4. Dynamic reconfiguration of disk storage in an online system state. what is veritas volume manager . The following article describes the volume manager objects and configuration of these objects using a text menu based utility called vxdiskadm .
All the configuration changes made to a disk group are applied to the disks in that disk group only. Volume Manager objects cannot span disk groups i. target id 3 .0 Volume Manager Objects Disks Disks are referred in volume manager by two terms ‐ device name and disk name . In two hosts and a shared storage situation one host can take over the ownership of the disk groups and drives in case other host fails. A subdisk is defined by an offset and a length in sectors on a volume manager disk. Subdisks A subdisk is a subsection of a disk's public region and is the smallest unit of storage in Volume Manager. Disk groups enable high availability as these can be shared by two or more hosts but can be accessed by only one host at a time. A subdisk is similar to a partition but with following differences : The maximum number of partitions to a disk is eight. You can use free space to create new subdisks. this default can be changed. Disk groups : A disk group is a collection of volume manager disks grouped together to hold the data . Once a volume manager disk is assigned a disk media name. A Volume Manager disks are created from the public region of a physical disk that is under Volume Manager control. While device name is system dependent based on controller and disk id the disk name is user defined . but it has been limited to a default value of 4096.1.The public region is the disk space available for volume space and the private region stores the configuration information. For example device name c2t3dos2 represents controller number 2 . Disk name is the common name given to the device name as an easy to remember name . all the operations on a particular disk group remains confined to that particular group . The physical address of c#t#d# becomes known as the disk access record. volume manager disk space that is not reserved or that is not part of a subdisk is free space. disk group 0 and slice 2 and disk01 may be its disk name . Each volume manager disk corresponds to one physical disk. The device name specifies controller .e. . If required. A volume manager disk is given a disk media name when it is added to a disk group which can be default or unique user defined. Volume Manager disks Adding physical disks to the volume manager results in creation of public and private region in the disk by the volume manager . target id and slice of the disk . There is no theoretical limit to number of subdisks that can be attached to a single plex.. A volume manager disk can contain multiple subdisks but subdisks cannot overlap or share the same portions of a volume manager disk. using the vol_subdisk_num tunable parameter. the disk is no longer referred to by its physical address of c#t#d#.
where ## represents a two‐digit number but can be user defined as per requirement. The default naming convention for plexes in a volume is volumename‐##. A plex consists of one or more subdisks located on one or more physical disks. a hyphen. The terms plex and mirror can be used interchangeably. A plex is also called a mirror. and a two‐digit number Volumes A volume is composed of one or more plexes not restricted by the physical size of the disk. The length of a plex is determined by the last block that can be read or written on the last subdisk in the plex. The default plex name consists of the volume name.Plexes A plex is a structured or ordered collection of subdisks that represents one copy of the data in a volume. A volume can span across multiple disks. The terms "mirrored" or "mirroring" imply two or more copies of data. . even though a plex is only one copy of the data. Volume Manager uses the default naming convention vol## for volumes.
Volume Manager Objects and Their Relationship .
Private region which is generally of a few megabytes stores the disk configuration information . #vxdiskadm Typing vxdiskadm brings up a menu based utility (text) . Most useful to get a quick view of all disks or list details of a single disk ‐ its name . Similarly. device name or disk group name and you can have this information by typing list in the vxdiskadm menu . list the names of the disks to be excluded in the file /etc/vx/disks.2. File system can be created on these volumes or these can be accessed as raw devices for some database applications. A disk needs to be formatted in order to be included in volume manager . you can exclude all disks on specific controllers from initialization or encapsulation by listing those controllers in the file /etc/vx/cntrls. Most of the volume manager operation related to disks & volume can be performed by a character based menu utility call vxdiskadm Following paragraphs describes the use of vxddiskadm to configure and manage volume manager.Most of the options need a disk name .The list menu option is used to display a list of disks attached to your system. The options .0 Volume Manager Configuration Volume configuration consists of adding two or more disks to form disk group and create volume/s from this disk group. their explanation and screen shots are given below .exclude. ? & ?? options provide help about the menu item and menu system. First step in volume manager configuration consists of adding and initializing disks under volume manager which creates a public region which is bulk of disk space available for volume space . #vxdiskadm Volume Manager Support Operations Menu: VolumeManager/Disk 1 Add or initialize one or more disks 2 Encapsulate one or more disks 3 Remove a disk 4 Remove a disk for replacement 5 Replace a failed or removed disk 6 Mirror volumes on a disk 7 Move volumes from a disk 8 Enable access to (import) a disk group 9 Remove access to (deport) a disk group 10 Enable (online) a disk device 11 Disable (offline) a disk device 12 Mark a disk as a spare for a disk group 13 Turn off the spare flag on a disk list List disk information ? Display help about menu ?? Display help about the menuing system q Exit from menus Select an operation to perform . This also lists removed or failed disks.exclude before the initialization or encapsulation. volume manager will report unformatted disk as invalid and a will only recognize after formatting By default all the available disks in the system are considered for inclusion as volume manager disk however to exclude certain disks. volume association and status.
. followed by a prompt at which you should type the device name of the disk to be added: DEVICE DISK GROUP STATUS c0t0d0 disk01 rootdg online c0t1d0 disk02 rootdg online c0t2d0 disk03 rootdg online c0t3d0 ‐ ‐ online c1t0d0 disk10 rootdg online c1t0d1 ‐ ‐ error . list at the prompt displays a list of the disks available to the system.?]list <pattern‐list> can be a single or more disks and/or controllers.list.. Error status indicates disks not recognized by volume manager as part of volume manager and can be used to add in the volume manager . If <pattern‐list> consists of multiple items. Disk groups needs to be given for making a new group or adding disks in existing group.2. Add or initialize disks Menu: VolumeManager/Disk/AddDisks Use this operation to add one or more disks to a disk group. . Here are some disk selection examples: all: all disks c3 c4t2: all disks on both controller 3 and controller 4.?] c1t0d1 All disks attached to the system are recognized by the Volume Manager and displayed here. The selected disks may also be added to a disk group as spares. You can add the selected disks to an existing disk group or to a new disk group that will be created as a part of the operation.q. those items must be separated by white space. .list.target 2 c3t4d0: a single disk Select disk devices to add: [<pattern‐list>. The selected disks may also be initialized without adding them to a disk group leaving the disks available for use as replacement disks.q. Select 1 (Add or initialize one or more disks) from the vxdiskadm main menu. c3t0d0 ‐ ‐ error c3t1d0 disk33 rootdg online c3t2d0 disk34 rootdg online c3t3d0 disk35 rootdg online Select disk devices to add: [<pattern‐list>.all..all. Default disk group is rootdg and if none is specified the disks are added to volume manager and are kept as hot spares which can be used in place of a failed disk. More than one disk or pattern may be entered at the prompt.1 Add or initialize one or more disks The formatted disks can be added or initialized with volume manager .
group and online status are present in volume manager in a valid volume manager disk group . System needs rebooting if encapsulation is used for disk with mounted filesystem or running applications . initialize? [y.q. Adding disk device c1t2d0 to disk group rootdg with disk name disk39.?] (default: y) y The following disk device has a valid VTOC. a new disk group.q. Output format: [Device_Name] c1t2d0 Encapsulate this device? [y. To leave the disk available for future use. select a disk group name that does not yet exist.n. make sure that the disk meets the following requirements:‐ .n.?] (default: n) n The selected disks will be added to the disk group rootdg with default disk names. Output format: [Device_Name] c1t2d0 Continue operation? [y.q.Disks with a name . If there is data on the disk that should NOT be destroyed you should encapsulate the existing disk partitions as volumes instead of adding the disk as a new disk.?] (default: y) y You can choose to add this disk to an existing disk group. Encapsulation preserves any existing data on the disk when the disk is placed under volume manager control. specify a disk group name of "none".?] (default: n) 2.n.q. Add or initialize other disks? [y.n. To create a new disk group. vfstab information is updated automatically but it is worthwhile to check vfstab if changes are proper as any discrepancy in vfstab may cause system boot failure on next reboot.One or more disks separated by space can be selected for adding into volume manager. Which disk group [<group>.none.n. which are already present in the system with data but without volume manager . Also the old device names needs to be changed in applications/scripts to reflect the new volume name.?] (default: y) Add disk as a spare disk for rootdg? [y.n.q.?] (default: n) y Initializing device c1t2d0. c1t2d0 Continue with operation? [y.q. Data on these disks are not disturbed and if these disks meets certain volume manager requirements these are added under volume manager.?] (default: rootdg) Use a default disk name for the disk? [y.2 Encapsulate one or more disks This is used to bring the disk under volume manager .list. or leave the disk available for use by future add or replacement operations.q.n. but does not appear to have been initialized for the Volume Manager. Here is the disk selected.?] (default: y) n c1t2d0 Instead of encapsulating. To reduce the chance of encapsulation failure.q.
More than one disk or pattern may be entered at the prompt. or a series of disks and/or controllers (with optional targets).n. It has a small amount of free space (at the beginning or end of the disk) that does not belong to any partition It has two free partitions It has an s2 slice that represents the whole disk One of the most common application is encapsulation of root disk to bring it under volume manager and then mirror it to have an alternate boot disk . Disk encapsulation requires a reboot for the changes to take effect. Which disk group [<group>. Here are some disk selection examples: all: all disks c3 c4t2: all disks on both controller 3 and controller 4. If <pattern‐list> consists of multiple items.all.q.list.?] c2t5d0 <pattern‐list> can be a single disk.?] (default: y) y You can choose to add this disk to an existing disk group or to a new disk group. Output format: [Device_Name] c2t5d0 Continue operation? [y.q. To create a new disk group.list. Here is the disk selected.n.q.?] (default: y) The selected disks will be encapsulated and added to the rootdg disk group with default disk names. This adds the disks to a disk group and replaces existing partitions with volumes. ok>eeprom use‐nvramrc?=true Procedure for encapsulating a disk for volume manager use is as follows: Select menu item 2 (Encapsulate one or more disks) from the vxdiskadm main menu and follow the prompts :‐ Encapsulate one or more disks Menu: VolumeManager/Disk/Encapsulate Use this operation to convert one or more disks to use the Volume Manager. those items must be separated by white space. c2t5d0 Continue with operation? [y.n. The EEPROM variable use‐nvramrc? must be set to true and an alternate boot disk alias name needs to be defined to access the second boot disk by an alternate alias name in case primary disk fails.q. select a disk group name that does not yet exist.?] (default: rootdg) Use a default disk name for the disk? [y.q. target 2 c3t4d0: a single disk Select disk devices to encapsulate: [<pattern‐list>.?] (default: y) y .
. .q.n.?] (default: y) y The disk device c2t5d0 will be encapsulated and added to the disk group rootdg with the disk name disk01. for the following reason: <vxvm:vxslicer: ERROR: Unsupported disk layout.n. If this happens. or manually created swap devices. The encapsulation operation failed with the following error: It is not possible to encapsulate c2t5d0. The following disk has been selected for encapsulation. However since a diskgroup must have at least one disk you can not remove all the disks from a disk group . The first stage of encapsulation has completed successfully. Remove a disk Menu: VolumeManager/Disk/RemoveDisk Use this operation to remove a disk from a disk group. Output format: [Device_Name] c2t5d0 Continue with encapsulation? [y.3 Remove a disk This option is used to remove a disk from a disk group provided there is no active volume using this disk . This is the same name that you gave to the disk when you added the disk to the disk group. To remove all disks from a diskgroup you have to disable the volume group with the exception of rootdg disk group which can not be disabled . This operation takes. Encapsulation may fail if there is not enough free space available on the disk to accommodate volume manager. Select menu item 3 (Remove a disk) from the vxdiskadm main menu.list.?] disk01 Requested operation is to remove disk disk01 from group rootdg. databases. Enter disk name [<disk>. The c2t5d0 disk has been configured for encapsulation. You should now reboot your system at the earliest possible opportunity.q.> Hit RETURN to continue.q. the procedure above will end abruptly with an error message as above . 2.?] (default: n) n The disk device c2t5d0 will be encapsulated and added to the disk group rootdg with the disk name disk01. The encapsulation will require two or three reboots which will happen automatically after the next reboot. Encapsulate other disks? [y. a disk name. If there are some volumes using the disk the those have to be either moved to some other disk or removed if they are no longer needed. as input. You will need to update any other references such as backup scripts. To reboot execute the command: shutdown ‐g0 ‐y ‐i6 This will update the /etc/vfstab file so that volume devices are used to mount the file systems on this disk device.
q. This changes the state for the disk name to a removed disk. If there are any initialized disks that are not part of a disk group.?] (default: y) Removal of disk disk01 is complete. The replacement disk can be a newly added disk or already available disk in the other disk groups Select menu item 4 (Remove a disk for replacement) from the vxdiskadm main menu.n.q.n. The removed disk will be replaced with disk device c1t1d0.q. The following devices are available as replacements: c1t1d0 You can choose one of these disks now. Enter disk name [<disk>.?] (default: n) .list.?] (default: c1t1d0) Requested operation is to remove disk disk02 from group rootdg. You have to decide if data is needed or not needed and answer the prompts as asked . Proceeding to replace disk02 with device c1t1d0.n. Remove a disk for replacement Menu: VolumeManager/Disk/RemoveForReplace Use this menu operation to remove a physical disk from a disk group. Disk replacement completed successfully. Select "none" if you do not wish to select a replacement disk. Remove another disk? [y. Remove another disk? [y.?] (default: y) Removal of disk disk02 completed successfully.q.n. Continue with operation? [y. you will be given the option of using one of these disks as a replacement. or select "none" [<device>.4 Remove a disk for replacement This option is used for removing the disk but retaining the name of the disk so that it can be used by the newly replaced disk . to replace disk02.?] disk02 Additional screens display if there are volumes associated with the disk you want to remove. while retaining the disk name.q.q. Continue with operation? [y. Choose a device.none.?] (default: n) 2.
You will be prompted for a disk name to replace and a disk device to use as a replacement. 2. or select "none" [<device>.list. To mirror volumes on a disk. Choose "none" to initialize another disk to replace disk02. These volumes can be mirrored onto another disk or onto any available disk space.5 Replace a failed or removed disk This option is used to replace a failed or removed disk .?] (default: c1t0d0s2) The requested operation is to use the initialized device c1t0d0s2 to replace the removed or failed disk disk02 in disk group rootdg. You can choose an uninitialized disk. Choose a device.?] (default: y) Replacement of disk disk02 in group rootdg with disk device c1t0d0s2 completed successfully. Replace a failed or removed disk Menu: VolumeManager/Disk/ReplaceDisk Use this menu operation to specify a replacement disk for a disk that you removed with the "Remove a disk for replacement" menu operation. make sure that the target disk has an equal or greater amount of space as the originating disk and then do the following Select menu item 6 (Mirror volumes on a disk) from the vxdiskadm main menu.6 Mirror volumes on a disk volumes can be mirrored to another disk with available space however it can not be used to mirror existing mirrors or mirrors spanning more than one sub disk .?] disk02 The following devices are available as replacements: c1t0d0s2 c1t1d0s2 You can choose one of these disks to replace disk02.q. Select a removed or failed disk [<disk>. Volumes will not be mirrored if they are . or you can choose a disk that you have already initialized using the Add or initialize a disk menu operation. Continue with operation? [y.none.2.q. or that failed during use. in which case the disk will be initialized.n. Select menu item 5 (Replace a failed or removed disk) from the vxdiskadm main menu.q. Mirror volumes on a disk Menu: VolumeManager/Disk/Mirror This operation can be used to mirror volumes on a disk. The new disk can be initialized or non initialized as this option does initialization .
list. NOTE: This operation can take a long time to complete.7 Move volumes from a disk This option is used in case the disk is to be replaced or removed and has active volumes on the disk.g. Also.?] (default: any) disk01 Note ‐ Be sure to always specify the destination disk when you are creating an alternate root disk. For example. Enter destination disk [<disk>. already mirrored.q. either permanently or for replacement. the volume manager will select space available in the disk group which might span disk and will result in boot failure from this disk. You can specify a list of disks to move volumes onto. Enter disk name [<disk>. using two consecutive move operations may move volumes from the second disk to the first. without also removing the disk.q. volumes that are comprised of more than one subdisk will not be mirrored. performance etc. Select menu item 7 (Move volumes from a disk) from the from the from the from the vxdiskadm main menu. . If you do not enter any disk media names. Also volumes can be moved to different disk groups for better space . does not prevent volumes from being moved onto the disk by future operations. Otherwise. or you can move the volumes to any available disk space in the same disk group. Specify a list of disk media names (e.. select "any".?] disk01 You can now specify a list of disks to move onto. select the name of that disk. 2. . then the volumes will be moved to any available space in the disk group.?] disk02 You can choose to mirror volumes from disk disk02 onto any available disk space.list. disk01) all on one line separated by blanks. or you can choose to mirror onto a specific disk.q. Move volumes from a disk Menu: VolumeManager/Disk/Evacuate Use this menu operation to move any volumes that are using a disk onto other disks. Use this menu immediately prior to removing a disk. NOTE: Simply moving volumes off of a disk. To mirror to a specific disk. Enter disk name [<disk>. Mirroring volumes from the boot disk will produce a disk that can be used as an alternate boot disk. To mirror to any available disk space.list. Requested operation is to move all volumes from disk disk01 in group rootdg.
Move volume vol3‐bk00 ..n. Enable access to (import) a disk group Menu: VolumeManager/Disk/EnableDiskGroup Use this operation to enable access to a disk group. the disk group will be corrupted and will become unusable.9 Disable access to (deport) a disk group Disk group is deported if disks groups ownership needs to be transferred to another system or all the disks in a disk groups needs to be freed from group. Evacuation of disk disk01 is complete. Deport a disk . Select menu item 8(Enable access to (import) a disk group) from the vxdiskadm main menu. The first part of moving a disk group is to use the "Remove access to (deport) a disk group" operation on the original host.n.q. A disk group can be imported from another host that failed without first deporting the disk group. Used in failover configurations where the ownership of a shared disk/disk group is transferred to the other system in case of failure of current system. Remove access to (deport) a disk group Menu: VolumeManager/Disk/DeportDiskGroup Use this menu operation to remove access to a disk group that is currently enabled (imported) by this system. Select menu item 9 (Remove access to (deport) a disk group) from the vxdiskadm main menu.q.?] (default: n) 2. Disks in a disk groups to be deported should not be active.. Select disk group to import [<group>.?] (default: y) Move volume vol3 .q.?] (default: list) newdg The import of newdg was successful.?] (default: n) 2. If two active hosts import a disk group at the same time. Move volumes from another disk? [y.q.. be very careful to ensure that the other host really has failed or has deported the disk group. Select another disk group? [y.list.n. This can be used as the final part of moving a disk group from one system to another.8 Enable access to (import) a disk group Used in enabling ownership of the other system to a disk group which has been deported by the other system. If two hosts share a SCSI bus. Continue with operation? [y.. Be sure that all disks in the disk group are moved between hosts.
Enable (online) a disk device Menu: VolumeManager/Disk/OnlineDisk Use this operation to enable access to a disk that was disabled with the "Disable (offline) a disk device" operation.n. Enter name of disk group [<group>. You will also be asked if the disks should be disabled (offlined).list.q.?] (default: list) newdg The requested operation is to disable access to the removable disk group named newdg. Select a disk device to enable [<address>.q. except when the disk is directly offlined. You can also use this operation to re‐scan a disk that may have been changed outside of the Volume Manager. Disable (offline) the indicated disks? [y. the Volume Manager running on the other system may have changed the disk. Also.?] (default: n) 2. NOTE: Many vxdiskadm operations re‐scan disks without user intervention.q. You will be prompted for the name of a disk group. For removable disk devices on some systems. if a disk is shared between two systems.?] (default: n) Continue with operation? [y.n.list.q.10 Enable (online) a disk device Disks which are turned offline by volume manager . This may be necessary to prevent errors if you actually remove any of the disks from the system.q. This disk group is stored on the following disks: newdg01 on device c1t1d0s2 You can choose to disable access to (also known as "offline") these disks. deport a disk group if you want to use all of the disks remaining in a disk group for some new purpose.?] c1t1d0 . This will eliminate most needs to online a disk directly. or which are to be imported can be enabled by this option. group if you intend to move the disks in a disk group to another system. Select menu item 10 (Enable (online) a disk device) from the vxdiskadm main menu. If so. you can use this operation to re‐scan the disk. For example.?] (default: y) Removal of disk group newdg was successful. Disable another disk group? [y. This operation causes disks to be scanned and find out the disk belonging to a disk group.n. it is important to disable all access to the disk before removing the disk.
Otherwise.q.?] (default: n) Any VM disk in this disk group can now use this disk as a spare in the event of a failure. Select menu item 12 (Mark a disk as a spare for a disk group) from the vxdiskadm main menu. as input. Mark a disk as a spare for a disk group Menu: VolumeManager/Disk/MarkSpareDisk Use this operation to mark a disk as a spare for a disk group. Mark another disk as a spare? [y. This operation can be applied only to disks that are not currently in a disk group. the subdisks from the failed disk are relocated to the spare disk. Enable another device? [y. Some systems do not support disks that can be removed from a system during normal operation. any suitable free space in the disk group is used. If a disk fails. NOTE: Many systems do not support disks that can be removed from a system during normal operation.list.n.n. hot‐relocation should automatically occur . This is the same name that you gave to the disk when you added the disk to the disk group. .12 Mark a disk as a spare for a disk group This is used to reserve the disk as an automatic replacement disk ( hot‐relocation) in case of another disk in the disk group fails.?] (default: n) 2.n. Select menu item 11 (Disable (offline) a disk device) from the vxdiskadm main menu. This operation takes.list. a disk name. Use this operation if you intend to remove a disk from a system without rebooting.q.q.11 Disable (offline) a disk device This option disables all access to a disk which is not part of any disk group . This is used to remove disk from volume group. Select a disk device to disable [<address>. the offline operation is not very useful. On such systems. Enter disk name [<disk>. Hot‐relocation relocates redundant subdisks to other disks and restores the affected volume manager objects and data.q.?] disk01 Marking of disk01 in rootdg as a spare disk is complete. On such systems.?] c1t1d0 Disable another device? [y.?] (default: n) 2. If a disk has already been designated as a spare in the disk group. Disable (offline) a disk device Menu: VolumeManager/Disk/OfflineDisk Use this menu operation to disable all access to a disk device by the Volume Manager.The failed disk needs to be replaced.q. the offline operation is seldom useful.
q.q. Enter disk name [<disk>.2.list. This operation takes. a disk name.13 Turn off the spare flag on a disk This is used to remove a VM Disk From the Hot‐Relocation Pool & free hot‐relocation spare disks for use as regular volume manager disks While a disk is designated as a spare. Turn‐off spare flag on another disk? [y. . the space on that disk is not used as free space for the creation of volume manager objects within its disk group and this option makes this space available.n.?] disk01 Disk disk01 in rootdg no longer marked as a spare disk. The second part of this article discusses this aspect of volume manager . as input. This is the same name that you gave to the disk when you added the disk to the disk group. Turn off the spare flag on a disk Menu: VolumeManager/Disk/UnmarkSpareDisk Use this operation to turn off the spare flag on a disk. Select menu item 13 (Turn off the spare flag on a disk) from the vxdiskadm main menu.?] (default: n) After using the vxdiskadm for configuring disks and diskgroups next step is to configure volumes and then use them for storage operations .
Veritas Volume Manager ‐ Part 2 .
Removing a Mirror 7.shrintto .shirnkby . snapshot . Shrinking a Volume 3.Displaying Volume Configuration Information General The vxassist utility in Veritas Volume Manager is used to create volumes. Creating a Volume 1.snapwait Attributes specify volumes layout disks controllar to include exclude etc Device Nodes : Default rootdg disk group. provides for the migration of data from a specified set of disks. Adding a RAID‐5 Log 8.1 Creating a Concatenated Volume 1. Removing a RAID‐5 Log 10. add mirrors and logs to existing volumes.vxassist General 1. mirror . move . Adding a DRL Log 9. Mirroring a Volume 5.Preparing a Volume for Online Backup 11.2 Creating a Striped Volume 1.1 Shrinking to a Given Length 3.growby . Removing a Volume 5. vxassist command syntax : vxassist <option> <Keyword> volume_name [attributes] Commonly used options are given below (See man vxassist for complete list of supported options) ‐g for specifying diskgroups ‐b for background operation ‐d file containing defaults for vxassist if not specified /etc/default/vxassist is used Keywords used are make .1 Extending a volume up to certain length. The default behavior of vxassist is to create volumes in the rootdg diskgroup if diskgroup is not specified . Block Device Node /dev/vx/dsk/volume_name Raw Device Node /dev/vx/rdsk/volume_name Other DiskGroups Block Device Node /dev/vx/dsk/diskgroup_name/volume_name Raw Device Node /dev/vx/rdsk/diskgroup_name/volume_name _______________________________________ . 2.2 Shrinking by a Given Length 4.1 Creating & Mirroring a New Volume 5. extend and shrink existing volumes. Extending a Volume 2.2 Extending by a Given Length 3.3 Mirroring All Volumes 6.2 Mirroring an Existing Volume 5.3 Creating a RAID‐5 Volume 2. growto . and provides facilities for the on‐line backup of existing volumes.snapstart . The default length is taken as number of blocks but this can be specified in Kilobytes orMegabytes or Gigabytes.
1. Creating a Volume : 1.1 Creating a Concatenated Volume By default. .3 Creating a RAID‐5 Volume A RAID‐5 volume contains a RAID‐5 plex that consists of two or more subdisks located on two or more physical disks. Disks can be specified from a diskgroup for a volume group but if not mentioned available disks are selected by the volume manager. Command Syntax : vxassist make volume_name length layout=raid5 To create the RAID‐5 volume appvol4 with the default stripe unit size on the default number of disks with RAID‐5 log. Only one RAID‐5 plex can exist per volume.2 Creating a Striped Volume A striped volume contains at least one plex that consists of two or more subdisks located on two or more physical disks. vxassist creates a concatenated volume using the space available on a disk or on the number of disks in a diskgroup if the volume size specified is more then the one available on a single disk. Command Syntax : vxassist make volume_name length layout=stripe To create a striped volume appvol2 with the default stripe unit size on the default number of disks #vxassist make appvol2 100m layout=stripe To create a striped volume appvol2 100MB striped volume on three specific disks. which are used to log information about data and parity being written to the volume. Command syntax : vxassist make volume_name volume_length To create a new volume appvol of 100 MB in the default disk group rootdg with available disks: #vxassist make appvol 100m To create the volume appvol of 100MB on disk03 #vxassist make appvol 100m disk03 1. A RAID‐5 volume may also contain one or more RAID‐5 log plexes. #vxassist make appvol2 100m layout=stripe disk04 disk05 disk06 1.
you risk unrecoverable data loss. Shrinking a Volume Caution ‐ Do not shrink a volume below the size of the file system.#vxassist make appvol4 100m layout=raid5. This command can be safely used on empty volumes. If you have a VxFS file system. To shrink volcat to 1300 sectors. 2.1 Shrinking to a Given Length Shrink a volume to a specific length as follows: vxassist shrinkto volume_name length Make sure you do not shrink the volume below the current size of the file system or database using the volume. Always make sure you have a good backup of the data volume to be shirnked. 3. type: #vxassist shrinkto volcat 1300 3.2 Shrinking by a Given Length Shrink a volume by a specific length as follows: vxassist shrinkby volume_name length .1 Extending a volume up to certain length. Extending a Volume Caution : If you plan to use volume size change (grow or shrink ) on a volume with data make sure you have the good backup of the volume available before carrying out such operation . If you do not shrink the file system first. you can shrink the file system and then shrink the volume. Command syntax vxassist growto volume_name length To extend vol3 upto 8000 sectors.2 Extending by a Given Length Command Syntax vxassist growby volume_name length To extend volapp by 1000 sectors. type: #vxassist growby volapp 1000 3. type: #vxassist growto vol3 8000 2. 2.
Mirroring a Volume Mirroring allow data to be written simultaneously to two disks so that in case of failure of one disk data is available from the other mirrored disk. Removing a Volume Removing a volume requires removing all references to the volumes to be removed like unmounting the volume if mounted and removing its reference from /etc/vfstab .1 Creating & Mirroring a New Volume Command Syntax : vxassist make volume_name length layout=mirror To create the mirrored volume. An active volume has to be stopped first to stop all the activities to the volume only then it can be removed Stopping Volume : Command Syntax vxvol stop volume_name To stop appvol1 #vxvol stop appvol1 Removing Volume Command Syntax vxedit ‐rf rm volume_name To remove the volume appvol1 #vxedit ‐rf rm appvol11 5. Boot disks can be mirriored to provide alternate booting disk . type: #vxassist shrinkby volapp2 8000 4. appvol22 of 100mb #vxassist make appvol22 100m layout=mirror To create a volume with Dirty Region Logging enabled #vxassist make volume_name length layout=mirror.2 Mirroring an Existing Volume . 5.log 5.To shrink volcat by 8000 sectors.
Removing a Mirror Removing a mirror involves first dissociating the plex from its volume and then removing the plex and any associated subdisks completely. RAID‐5 log plexes are used to log information about data and parity being written to the raid volume. A log plex is created for the volume by default when a raid volume is created but additional ones can be added by following command . Adding a RAID‐5 Log A RAID‐5 log maintains a copy of the data and parity being written to the volume at any given time. This copies the data and parity that was being written at the time of failure from the log to the appropriate areas of the RAID‐5 volume. Dissociate and remove the plex from its volume as follows: vxplex ‐o rm dis plex_name vxprint ‐h shows the volume and associated plexes : Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volm fsgen ENABLED 10240 ‐ ACTIVE ‐ ‐ pl volm‐01 volm ENABLED 10240 ‐ ACTIVE ‐ ‐ sd disk01‐02 volm‐01 ‐ 10240 0 ‐ ‐ ‐ pl volm‐02 volm ENABLED 10240 ‐ ACTIVE ‐ ‐ sd disk02‐03 volm‐02 ‐ 10240 0 ‐ ‐ ‐ To disassociate and remove volmir‐02 from volmir. type: #vxplex ‐o rm dis volm‐02 The output of vxprint ‐h for volm now shows volume volm with only one plex:: Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volm fsgen ENABLED 10240 ‐ ACTIVE ‐ ‐ pl volm‐01 volmir ENABLED 10240 ‐ ACTIVE ‐ ‐ sd disk01‐02 volmir‐01 ‐ 10240 0 ‐ ‐ ‐ 7.Command syntax vxassist mirror volume_name Creating a mirror of volume vol44: #vxassist mirror vol44 5.3 Mirroring All Volumes To mirror all existing volumes to available disk space /etc/vx/bin/vxmirror ‐a 6. vxassist addlog name_of_raid5_vol 8. Adding a DRL Log . If a system failure occurs.The last valid mirror plex associated with a volume cannot be removed. VxVM can replay the RAID‐5 log to resynchronize the volume.
which is attached to and synchronized with the volume to be backed up and later detached and made offline by vxassist snapshot command . use the command: vxprint ‐ht raid5_volume_name To disassociate the log plex volrd‐02 from volrd. The vxassist snapstart operation creates a write‐only backup mirror. Dissociate the log from its volume as follows: #vxplex ‐o rm dis plex_name To identify the log plex. The snapshot volume can be used by backup utilities while the original volume continues to be available for applications and users. a log plex is also created to contain the log subdisk. Only one log subdisk can exist per plex. the plex containing a log subdisk can be treated as a regular plex. To put Dirty Region Logging into effect for a volume. The following example creates a log for the mirrored volume vol03: #vxassist addlog vol03 When vxassist is used to add a log subdisk to a volume. DRL uses this information to recover only the portions of the volume that need to be recovered. 9. . DRL keeps track of the regions that have changed due to I/O writes to a mirrored volume. Removing a RAID‐5 Log Removing a RAID‐5 log involves first dissociating the log from its volume and then removing the log and any associated subdisks completely. a bitmap is written to a log to record the area of the disk that is being changed. The log plex and log subdisk can be removed using the same procedures used to remove ordinary plexes and subdisks. Preparing a Volume for Online Backup Volume manager provides an easy way to take backup of the online data by creating an offline snapshot mirror of the volume . In case of system failure. Data subdisks can be added to the log plex.Dirty region logging (DRL) is used with mirrored volume layouts. Once created. a log subdisk must be added to that volume and the volume must be mirrored. Prior to every write. by default. type: #vxplex ‐o rm dis volrd‐02 The output of vxprint ‐h for volrd now shows: Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volrd raid5 ENABLED 32 ‐ ACTIVE ‐ ‐ pl volrd‐01 volrd ENABLED 32 ‐ ACTIVE ‐ ‐ sd disk01‐02 volrd‐01 ‐ 32 0 ‐ ‐ ‐ sd disk02‐03 volrd‐01 ‐ 32 0 ‐ ‐ ‐ 10.
To avoid wasting space. Display the volume.The volume backup method described here does not apply to RAID‐5 volumes.tweety dm disk10 c1t0d0s2 sliced 559 1044400 ‐ dm disk20 c2t0d0s2 sliced 559 1044400 ‐ v pubs fsgen ENABLED ACTIVE 2288 SELECT ‐ . type: #vxassist snapshot vol8 snapvol8 You can now back up the snapshot volume by whatever means you prefer. mirror. Backing up a volume with vxassist involves the following procedure Create a snapshot mirror snapstart starts creating a online snapshot mirror of the volume using the available disk space . Command Syntax: vxassist snapstart volume_name To create a snapshot mirror of a volume called vol8. which occupies as much space as the original volume 11 Displaying Volume Configuration Information The vxprint command can be used to display information about how a volume is configured. you can then remove the snapshot volume.1025. and subdisk record information for all volumes as follows: #vxprint ‐ht Disk group: rootdg DG NAME NCONFIG NLOG MINORS GROUP‐ID DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE dg rootdg 759096729. The snapshot is completed with vxassist snapshot command when offline snapshot volume is created with a userdefined name . type #vxassist snapstart vol8 Create a snapshot volume Command Syntax vxassist snapshot volume_name new_volume_name To create a snapshot volume of vol8.
Display volume‐related information for a specific volume as follows: #vxprint ‐t volume_name To display information about vol8. dm is a disk. v is a volume. and sd is a subdisk. pl is a plex. type: #vxprint ‐t vol8 . pl pubs‐01 pubs ENABLED ACTIVE 2288 CONCAT ‐ RW sd disk10‐01 pubs‐01 disk10 0 2288 0 c0t0d0 ENA v vol8 fsgen ENABLED ACTIVE 20480 SELECT ‐ pl vol8‐01 vol8 ENABLED ACTIVE 20480 CONCAT ‐ RW sd disk10‐02 vol8‐0 disk10 2288 20480 0 c0t1d0 ENA where dg is a disk group. Each volume is listed along with its associated plex(es) and subdisk(s). The top few lines indicate the headers that match each type of output line that follows.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.