DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
[Next] [Previous] [Top] [Contents] [Index]

VxVM User's Guide

Menu Interface Operations

Chapter 13


Introduction

This chapter describes the menu-driven interface known as Volume Manager Support Operations (or vxdiskadm). vxdiskadm is used to perform physical and logical device administration.

This chapter provides the following information on performing disk and volume operations using vxdiskadm:

Starting vxdiskadm

To start vxdiskadm, enter:

	vxdiskadm 
vxdiskadm starts up and displays its main menu containing the operations available to you.

The vxdiskadm Main Menu

The following is the vxdiskadm main menu:

	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 

The vxdiskadm menu provides access to the following operations:

Disk Operations

This section describes the disk operations available with vxdiskadm.

When performing disk administration, it is important that you recognize the difference between a device name and a disk name.

The device name (sometimes referred to as devname or disk access name) is the location of the disk. The syntax of a device name is c#b#t#d#s#, where:

The full pathname of a device is /dev/dsk/devicename. In this document, only the device name is listed and /dev/dsk is assumed. An example of a device name is c0b0t0d0s7.

The disk name (sometimes referred to as disk media name) is an administrative name for the disk, such as disk01. If you do not assign a disk name, the disk name defaults to disk## if the disk is being added to rootdg (where ## is a sequence number). Otherwise, the default disk name is groupname##, where groupname is the name of the disk group to which the disk is added.

Bringing Physical Disks Under Volume Manager Control

When you add a disk to a system that is running Volume Manager, you need to put the disk under Volume Manager control so that the Volume Manager can control the space allocation on the disk.

Unless another disk group is specified, VxVM places new disks in the default disk group, rootdg. Instructions on creating additional disk groups are provided later in this chapter.

The method by which you place a disk under Volume Manager control depends on the circumstances:

When initializing or encapsulating multiple disks at once, it is possible to exclude certain disks or certain controllers. To exclude disks, list the names of the disks to be excluded in the file /etc/vx/disks.exclude before the initialization or encapsulation. Similarly, you can exclude all disks on specific controllers from initialization or encapsulation by listing those controllers in the file /etc/vx/cntrls.exclude.

The sections that follow provide detailed examples of how to use vxdiskadm to place disks under VxVM control in various ways and circumstances.


Note: A disk must be added to the system (using diskadd) before it can be placed under Volume Manager control.

If you attempt to place an unformatted disk under Volume Manager control through vxdiskadm, the initialization will begin as normal, but will quit with a message that informs you that the disk does not appear to be valid and may not be formatted. If this happens, you need to format the disk properly and then attempt to place the disk under VxVM control again.


Placing a Disk Under VxVM Control

This section describes how to place a formatted disk under Volume Manager control. This disk might be brand new or might have been used outside VxVM before.


Note: Initialization does not preserve any data on disks.


Initialize a single disk for Volume Manager use as follows:

1. Select menu item 1 (Add or initialize one or more disks) from the vxdiskadm main menu.

2. At the following prompt, enter the disk device name of the disk to be added to VxVM control (or enter list for a list of disks):

		Add or initialize disks
		Menu: VolumeManager/Disk/AddDisks
	 
		Use this operation to add one or more disks to a disk group. 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. The
		selected disks may also be added to a disk group as spares. The
		selected disks may also be initialized without adding them to a 
		disk group leaving the disks available for use as replacement
 		disks.
 
		More than one disk or pattern may be entered at the prompt. Here 
		are some disk selection examples:
 
 		all:				all disks
 		c3 c4b0t2:			all disks on both controller 3 and controller
 						4, bus 0, target 2
 		c3b0t4d0:			a single disk

	Select disk devices to add:
	[<pattern-list>,all,list,q,?] list 

<pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, those items must be separated by white space.

If you enter list at the prompt, vxdiskadm displays a list of the disks available to the system, followed by a prompt at which you should enter the device name of the disk to be added:

		DEVICE         DISK         GROUP        STATUS
		c0b0t0d0       rootdisk     rootdg       online
		c0b0t1d0       disk02       rootdg       online
		c0b0t3d0       -            -            online
		c1b0t0d0       disk10       rootdg       online
		c1b0t1d0       -            -            online
		c1b0t2d0       -            -            error
		c1b0t3d0       -            -            error
		.
		.
		.
		c3b0t0d0       -            -            error
		c3b0t1d0       disk33       rootdg       online
		c3b0t2d0       disk34       rootdg       online
		c3b0t3d0       disk35       rootdg       online
	 	
		Select disk devices to add:                                          
		[<pattern-list>,all,list,q,?] c1b0t2d0 

All disks attached to the system are recognized by the Volume Manager and displayed here.

The word error in the STATUS line tells you that a disk has not yet been added to Volume Manager control. These disks may or may not have been initialized before. The disks that are listed with a disk name and disk group cannot be used for this operation, as they are already under Volume Manager control.

3. To continue with the operation, enter y (or press Return) at the following prompt:

  		Here is the disk selected.  Output format: [Device_Name]

 		 c1b0t2d0

		Continue operation? [y,n,q,?] (default: y) y  

4. At the following prompt, specify the disk group to which the disk should be added or press Return to accept rootdg:

		You can choose to add this disk to an existing disk group, a
		new disk group, or leave the disk available for use by future
		add or replacement operations.  To create a new disk group,
 		select a disk group name that does not yet exist.  To leave the
 		disk available for future use, specify a disk group name of
 		"none".

	Which disk group [<group>,none,list,q,?] (default: rootdg) 

5. At the following prompt, either press Return to accept the default disk name or enter a disk name:

		Use a default disk name for the disk? [y,n,q,?] (default: y) 
6. When vxdiskadm asks whether this disk should become a hot-relocation spare, enter n (or press Return):

		Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) n 

7. To continue with the operation, enter y (or press Return) at the following prompt:

  		The selected disks will be added to the disk group rootdg with
 		default disk names.

  			c1b0t2d0

		Continue with operation? [y,n,q,?] (default: y) y 

8. If you are sure that there is no data on this disk, enter n to avoid encapsulation. When vxdiskadm asks if you want to initialize the disk instead, enter y:

		The following disk device has a valid VTOC, but does not appear
 		to have been initialized for the Volume Manager.  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.
  		Output format: [Device_Name]

  			c1b0t2d0

		Encapsulate this device? [y,n,q,?] (default: y) n

  			c1b0t2d0

		Instead of encapsulating, initialize? [y,n,q,?] (default: n) y 

Messages similar to the following should now confirm that disk c1b0t2d0 is being placed under Volume Manager control. You are also given the option of performing surface analysis.

 	 	Initializing device c1b0t2d0.

		Perform surface analysis (highly recommended)
	 	[y,n,q,?] (default: y) n

	 	Adding disk device c1b0t2d0 to disk group rootdg with disk
	 	name disk39. 
9. At the following prompt, indicate whether you want to continue to initialize more disks (y) or return to the vxdiskadm main menu (n):

		Add or initialize other disks? [y,n,q,?] (default: n) 

Placing Multiple Disks Under VxVM Control

This section describes how to place multiple disks under Volume Manager control simultaneously. The set of disks might consist of all disks on the system, all disks on a controller, selected disks, or a combination thereof.

Depending on the circumstances, some of the specified disks might be handled differently to others. For example, some may be initialized, while others may be encapsulated.


Note: Initialization does not preserve any data on disks.


When initializing or encapsulating multiple disks at once, it is possible to exclude certain disks or certain controllers. To exclude disks, list the names of the disks to be excluded in the file /etc/vx/disks.exclude before the initialization or encapsulation. Similarly, you can exclude all disks on specific controllers from initialization or encapsulation by listing those controllers in the file /etc/vx/cntrls.exclude.

Place multiple disks under VxVM control at once as follows:

1. Select menu item 1 (Add or initialize one or more disks) from the vxdiskadm main menu.

2. At the following prompt, enter the pattern-list for the disks to be added to VxVM control. In this case, enter c3 to indicate all disks on controller 3:

		Add or initialize disks
		Menu: VolumeManager/Disk/AddDisks
	 
			Use this operation to add one or more disks to a disk group.
 			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. The selected disks may also be added to a disk
			group as spares. The selected disks may also be initialized
 			without adding them to a disk group leaving the disks
 			available for use as replacement disks.

			More than one disk or pattern may be entered at the prompt.
 			Here are some disk selection examples:

 			all:				all disks
  			c3 c4b0t2:			all disks on both controller 3 and
 							controller 4, bus 0, target 2
  			c3b0t4d0:			a single disk

		Select disk devices to add:
		[<pattern-list>,all,list,q,?] c3 

where <pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, those items must be separated by white space.

If you do not know the address (device name) of the disk to be added, enter list at the prompt for a complete listing of available disks.

3. To continue the operation, enter y (or press Return) at the following prompt:

 		Here are the disks selected.  Output format: [Device_Name]

  			c3b0t0d0 c3b0t1d0 c3b0t2d0 c3b0t3d0

		Continue operation? [y,n,q,?] (default: y) y

4. To add these disks to the default disk group, rootdg, enter y (or press Return) at the following prompt:

  		You can choose to add these disks to an existing disk group, a
 		new disk group, or you can leave these disks available for use
 		by future add or replacement operations.  To create a new disk
  		group, select a disk group name that does not yet exist.  To
  		leave the disks available for future use, specify a disk group
  		name of "none".

	Which disk group [<group>,none,list,q,?] (default: rootdg) y 

5. To allow vxdiskadm to use default disk names for each of the disks, enter y (or Press Return) at the following prompt:

		Use default disk names for these disks? [y,n,q,?] (default: y) y
6. At the following prompt, enter n to indicate that these disks should not be used as hot-relocation spares:

		Add disks as spare disks for rootdg? [y,n,q,?] (default: n) n
7. To continue with the operation, enter y (or press Return) at the following prompt:

  		The selected disks will be added to the disk group rootdg with
  		default disk names.
 		
  		c3b0t0d0 c3b0t1d0 c3b0t2d0 c3b0t3d0
 		
	Continue with operation? [y,n,q,?] (default: y) y 
8. The following prompt lists any disks that have already been initialized for VxVM use; enter Y to indicate that all of these disks should be used now:

		The following disk devices appear to have been initialized 
		already.
  		The disks are currently available as replacement disks.
 		Output format: [Device_Name]

  		c3b0t1d0 c3b0t2d0 c3b0t3d0

	Use these devices? [Y,N,S(elect),q,?] (default: Y) Y 

Note that this prompt allows you to indicate "yes" or "no" for all of these disks (Y or N) or to select how to handle each of these disks on an individual basis (S).

If you are sure that you want to reinitialize all of these disks, enter Y at the following prompt:

  The following disks you selected for use appear to already have
  been initialized for the Volume Manager.  If you are certain the
  disks already have been initialized for the Volume Manager, then
  you do not need to reinitialize these disk devices.
  Output format: [Device_Name]
 
  c3b0t1d0 c3b0t2d0 c3b0t3d0
 
Reinitialize these devices? [Y,N,S(elect),q,?] (default: Y) Y 

9. vxdiskadm now indicates that one of the disks on controller 3 is a candidate for encapsulation; enter y (or press Return) to encapsulate this disk:

		The following disk device has a valid VTOC, but does not appear
 		to have been initialized for the Volume Manager. 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. Output format: [Device_Name]

  		c3b0t0d0

		Encapsulate this device? [y,n,q,?] (default: y) y 

Encapsulation allows you to add an active disk to Volume Manager control and preserve the data on that disk.


Note: Disk encapsulation requires that you reboot the system and may require a few subsequent reboots. You will be prompted for these operations, as necessary.


vxdiskadm now confirms those disks that are being initialized and added to VxVM control with messages similar to the following:

 		Initializing device c3b0t1d0.

  		Initializing device c3b0t2d0.

  		Initializing device c3b0t3d0.

  		Adding disk device c3b0t1d0 to disk group rootdg with disk
  		name disk33.
 	
  		Adding disk device c3b0t2d0 to disk group rootdg with disk
  		name disk34.  
	
  		Adding disk device c3b0t3d0 to disk group rootdg with disk
  		name disk35.
	
In addition to the output displayed above, you should see prompts that give you the option of performing surface analysis.

10. vxdiskadm then confirms any disks that have been selected for encapsulation and prompts you for permission to proceed with the encapsulation; enter y (or press Return) to continue encapsulation:

  		The following disk has been selected for encapsulation.
  		Output format: [Device_Name]

  		c3b0t0d0

		Continue with encapsulation? [y,n,q,?] (default: y) y 

vxdiskadm now displays an encapsulation status and informs you that you must perform a shutdown and reboot as soon as possible:

 		The disk device c3b0t0d0 will be encapsulated and added to the
 		disk group rootdg with the disk name disk38.

  		The first stage of encapsulation has completed successfully.
  		You should now reboot your system at the earliest possible
 		opportunity.
 
  		The encapsulation will require two or three reboots which will
 		happen automatically after the next reboot.  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.  You will
 		need to update any other references such as backup scripts,
 		databases, or manually created swap devices.

11. At the following prompt, indicate whether you want to continue to initialize more disks (y) or return to the vxdiskadm main menu (n):

		Add or initialize other disks? [y,n,q,?] (default: n) 

Encapsulating a Disk for VxVM Use

This section describes how to encapsulate a disk for VxVM use. Encapsulation preserves any existing data on the disk when the disk is placed under VxVM control.

To reduce the chance of encapsulation failure, make sure that the disk:

Encapsulate a disk for VxVM use as follows:

1. Select menu item 2 (Encapsulate one or more disks) from the vxdiskadm main menu.

2. At the following prompt, enter the disk device name for the disks to be encapsulated:

	Encapsulate one or more disks
	Menu: VolumeManager/Disk/Encapsulate
 
  		Use this operation to convert one or more disks to use the
 		Volume  Manager. This adds the disks to a disk group and
 		replaces existing partitions with volumes.  Disk encapsulation
 		requires a reboot for the changes to take effect.
 
  		More than one disk or pattern may be entered at the prompt.
  		Here are some disk selection examples:
 
  		all:				all disks
  		c3b0 c4b0t2:			all disks on both controller 3 and controller
 						4, bus 0, target 2
  		c3b0t4d0:			a single disk
 
	Select disk devices to encapsulate:                                  
	[<pattern-list>,all,list,q,?] c2b0t5d0 

Where <pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, those items must be separated by white space.

If you do not know the address (device name) of the disk to be encapsulated, enter l or list at the prompt for a complete listing of available disks.

3. To continue the operation, enter y (or press Return) at the following prompt:

 		Here is the disk selected.  Output format: [Device_Name]

  		c2b0t5d0

	Continue operation? [y,n,q,?] (default: y) y 

4. To add the disk to the default disk group, rootdg, press Return at the following prompt:

 	 	You can choose to add this disk to an existing disk group or to
	  	a new disk group.  To create a new disk group, select a disk
 		group name that does not yet exist.
 	
	Which disk group [<group>,list,q,?] (default: rootdg) 

5. At the following prompt, either press Return to accept the default disk name or enter a disk name:

		Use a default disk name for the disk? [y,n,q,?] (default: y) 

6. To continue with the operation, enter y (or press Return) at the following prompt:

  		The selected disks will be encapsulated and added to the rootdg
  		disk group with default disk names.

  		c2b0t5d0

	Continue with operation? [y,n,q,?] (default: y) y 

7. To confirm that encapsulation should proceed, enter y (or press Return) at the following prompt:

  		The following disk has been selected for encapsulation.  Output
 		format: [Device_Name]

  		c2b0t5d0

	Continue with encapsulation? [y,n,q,?] (default: y) y 

A message similar to the following confirms that the disk is being encapsulated for VxVM use and tells you that a reboot is needed:

 		The disk device c2b0t5d0 will be encapsulated and added to the
 			disk group  rootdg with the disk name disk01.
 
  			The c2b0t5d0 disk has been configured for encapsulation.
 
  			The first stage of encapsulation has completed successfully.
			You should now reboot your system at the earliest possible
			opportunity.
 
  			The encapsulation will require two or three reboots which
 			will happen automatically after the next reboot.  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.  You
 			will need to update any other references such as backup
 			scripts, databases, or manually created swap devices.

8. At the following prompt, indicate whether you want to encapsulate more disks (y) or return to the vxdiskadm main menu (n):

		Encapsulate other disks? [y,n,q,?] (default: n) n 

Under some circumstances, encapsulation of a disk may fail. Encapsulation often fails because there is not enough free space available on the disk to accommodate VxVM. If this happens, the procedure outlined above will end abruptly with an error message such as the following:

  	The disk device c2b0t5d0 will be encapsulated and added to the
 	disk group rootdg with the disk name disk01.
 
  	The encapsulation operation failed with the following error:
  	
  	It is not possible to encapsulate c2b0t5d0, for the following
 	reason:
     <vxvm:vxslicer: ERROR: Unsupported disk layout.>   

	Hit RETURN to continue. 

Adding a Disk for Future Use

If you wish to add a disk to Volume Manager control for future use, follow the steps outlined in "Bringing Physical Disks Under Volume Manager Control." However, when you are asked to name a disk group, enter none instead of selecting rootdg or typing in a disk group name. The disk is then initialized as before, but is reserved for use at some later time. It cannot be used until it is added to a disk group.

Note that this type of "spare disk" should not be confused with a hot-relocation spare disk.

Reinitializing a Disk for VxVM Use

This section describes how to reinitialize a disk that has already been initialized for VxVM use at some time in the past.

If the disk you wish to add has been used before, but not with VxVM, you can do either of the following:

Reinitialize a disk for VxVM use as follows:

1. Select menu item 1 (Add or initialize one or more disks) from the vxdiskadm main menu.

2. At the following prompt, enter the disk device name of the disk to be added to VxVM control:

	Add or initialize disks
	Menu: VolumeManager/Disk/AddDisks
 
		Use this operation to add one or more disks to a disk group.
 		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. The selected disks may also be added to a disk group
 		as spares. The selected disks may also be initialized without
 		adding them to a disk group leaving the disks available for use
 		as replacement disks.
 
		More than one disk or pattern may be entered at the prompt. Here
 		are some disk selection examples:
 
  		all:				all disks
  		c3 c4b0t2:			all disks on both controller 3 and controller
 						4, target 2
  		c3b0t4d0:			a single disk

	Select disk devices to add:
	[<pattern-list>,all,list,q,?] c1b0t3d0 

Where <pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, those items must be separated by white space.

If you do not know the address (device name) of the disk to be added, enter l or list at the prompt for a complete listing of available disks.

3. To continue with the operation, enter y (or press Return) at the following prompt:

 		Here is the disk selected.  Output format: [Device_Name]

  		c1b0t3d0

	Continue operation? [y,n,q,?] (default: y) y 

4. At the following prompt, specify the disk group to which the disk should be added or press Return to accept rootdg:

  		You can choose to add this disk to an existing disk group, a
  		new disk group, or leave the disk available for use by future
  		add or replacement operations.  To create a new disk group,
 		select a disk group name that does not yet exist.  To leave the
 		disk available for future use, specify a disk group name of
 		"none".

	Which disk group [<group>,none,list,q,?] (default: rootdg) 

5. At the following prompt, either press Return to accept the default disk name or enter a disk name:

		Use a default disk name for the disk? [y,n,q,?] (default: y) 

6. When vxdiskadm asks whether this disk should become a hot-relocation spare, enter n (or press Return):

		Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) n 

7. To continue with the operation, enter y (or press Return) at the following prompt:

  		The selected disks will be added to the disk group rootdg with
  		default disk names.

  		c1b0t3d0

	Continue with operation? [y,n,q,?] (default: y) y 
	
8. The following prompt indicates that this disk has been previously initialized for future VxVM use; enter y to confirm that you now want to use this disk:

  		The following disk device appears to have been initialized
 		already. The disk is currently available as a replacement disk.
  		Output format: [Device_Name]

  		c1b0t3d0

	Use this device? [y,n,q,?] (default: y) y 

9. To reinitialize the disk, enter y (or press Return) at the following prompt:

  		The following disk you selected for use appears to already have
  		been initialized for the Volume Manager.  If you are certain the
 		disk has already been initialized for the Volume Manager, then
 		you do not need to reinitialize the disk device.
  		Output format: [Device_Name]

  		c1b0t3d0

	Reinitialize this device? [y,n,q,?] (default: y) y 

Messages similar to the following should now confirm that this disk is being reinitialized for VxVM use:

  		Initializing device c1b0t3d0.

  		Adding disk device c1b0t3d0 to disk group rootdg with disk 
  		name disk40. 

10. At the following prompt, indicate whether you want to continue to initialize more disks (y) or return to the vxdiskadm main menu (n):

		Add or initialize other disks? [y,n,q,?] (default: n) 

Adding a VM Disk to the Hot-Relocation Pool

Hot-relocation is the ability of a system to automatically react to I/O failure by relocating redundant subdisks to other disks and restoring the affected VxVM objects and data. If a disk has already been designated as a spare in the disk group, the subdisks from the failed disk are relocated to the spare disk. Otherwise, any suitable free space in the disk group is used. Refer to Chapter 1, "Description of the Volume Manager" for more information.

To designate a disk as a spare, do the following:

1. Select menu item 12 (Mark a disk as a spare for a disk group) from the vxdiskadm main menu.

2. At the following prompt, enter a disk name (such as disk01):

		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.
  			This operation takes, as input, a disk name. This is the same
 			name that you gave to the disk when you added the disk to the
	 		disk group.
 	
		Enter disk name [<disk>,list,q,?] disk01 

vxdiskadm displays the following confirmation:

  		Marking of disk01 in rootdg as a spare disk is complete. 

3. At the following prompt, indicate whether you want to add more disks as spares (y) or return to the vxdiskadm main menu (n):

		Mark another disk as a spare? [y,n,q,?] (default: n) 

Any VM disk in this disk group can now use this disk as a spare in the event of a failure. If a disk fails, hot-relocation should automatically occur (if possible). You should be notified of the failure and relocation via electronic mail. After successful relocation, you may want to replace the failed disk.

Removing a VM Disk From the Hot-Relocation Pool

While a disk is designated as a spare, the space on that disk is not used as free space for the creation of VxVM objects within its disk group. If necessary, you can free a spare disk for general use by removing it from the pool of hot-relocation disks.

To verify which disks are currently designated as spares, select the list menu item from the vxdiskadm main menu. Disks that are spares should be listed with the spare flag.

To remove a disk from the hot-relocation pool, do the following:

1. Select menu item 13 (Turn off the spare flag on a disk) from the vxdiskadm main menu.

2. At the following prompt, enter the name of a spare disk (such as disk01):

		Turn off the spare flag on a disk
		Menu: VolumeManager/Disk/UnmarkSpareDisk
 
  			Use this operation to turn off the spare flag on a disk.
  			This operation takes, as input, a disk name. This is the same
  			name that you gave to the disk when you added the disk to the
  			disk group.
	
		Enter disk name [<disk>,list,q,?] disk01

vxdiskadm displays the following confirmation:

  		Disk disk01 in rootdg no longer marked as a spare disk. 

3. At the following prompt, indicate whether you want to disable more spare disks (y) or return to the vxdiskadm main menu (n):

		Turn-off spare flag on another disk? [y,n,q,?] (default: n)  

Displaying Information on Physical Disks

Displaying disk information shows you which disks are initialized, to which disk groups they belong, and the disk status. The list command displays device names for all recognized disks, the disk names, the disk group names associated with each disk, and the status of each disk.

To display disk information, do the following:

1. Select list from the vxdiskadm main menu.

2. At the following screen, enter the address of the disk you want to see or enter all for a list of all disks:

		List disk information 
		Menu: VolumeManager/Disk/ListDisk 
	
		Use this menu operation to display a list of disks. You can 
		also choose to list detailed information about the disk at 
		a specific disk device address. 
	
		Enter disk device or "all" [<address>,all,q,?] (default: all) 

		DEVICE      DISK         GROUP     STATUS 
		c0b0t0d0    rootdisk     rootdg    online 
		c1b0t0d0    disk01       rootdg    online 
		c1b0t1d0    -            -         online 
		
		Device to list in detail [<address>,none,q,?] (default: none) 

Removing a Physical Disk

Before removing a disk, make sure it contains no data, any data is no longer needed, or the data can be moved to other disks. Then remove the disk as follows:

1. Select menu item 3 (Remove a disk) from the vxdiskadm main menu.


Note: You must disable the disk group before you can remove the last disk in that group.


2. At the following prompt, enter the disk name of the disk to be removed:

		Remove a disk 
		Menu: VolumeManager/Disk/RemoveDisk 
	
		Use this operation to remove a disk from a disk group. This
		operation takes, as input, a disk name. This is the same name 
		that you gave to the disk when you added the disk to the disk
		group. 
	
		Enter disk name [<disk>,list,q,?] disk01

3. If there are any volumes on the disk, the Volume Manager asks you whether they should be evacuated from the disk. If you wish to keep the volumes, answer y. Otherwise, answer n.

4. At the following verification prompt, press Return to continue:

		Requested operation is to remove disk disk01 from group rootdg. 

		Continue with operation? [y,n,q,?] (default: y)

vxdiskadm removes the disk from the disk group and displays the following success message:

		Removal of disk disk01 is complete. 

You can now remove the disk or leave it on your system as a replacement.

5. At the following prompt, indicate whether you want to remove other disks (y) or return to the vxdiskadm main menu (n):

		Remove another disk? [y,n,q,?] (default: n) 

Disabling a Physical Disk (Taking a Physical Disk Offline)

Occasionally, you may need to take a disk offline. If the disk is corrupted, you need to take it offline and remove it. You may be moving the physical disk device to another location to be connected to another system. To take a disk offline, first remove it from its disk group, then do the following:

1. Select menu item 11 (Disable (offline) a disk device) from the vxdiskadm main menu.

2. At the following prompt, enter the address of the disk you want to disable:

		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. This operation can be applied only to 
		disks that are not currently in a disk group. Use this operation
 		if you intend to remove a disk from a system without rebooting. 

		NOTE: Many systems do not support disks that can be removed from 
      		 	a system during normal operation. On such systems, the
      			 offline operation is seldom useful. 

	Select a disk device to disable [<address>,list,q,?] c1t1d0

vxdiskadm disables the specified disk.

3. At the following prompt, indicate whether you want to disable another device (y) or return to the vxdiskadm main menu (n):

	Disable another device? [y,n,q,?] (default: n)

Enabling a Physical Disk

If you move a disk from one system to another during normal system operation, the Volume Manager does not recognize the disk automatically. Use the enable disk operation to tell the Volume Manager to scan the disk to identify the disk, and to determine if this disk is part of a disk group. Also, use this operation to re-enable access to a disk that was disabled by either the disk group deport operation or the disk device disable (offline) operation. To enable a disk, do the following:

1. Select menu item 10 (Enable (online) a disk device) from the vxdiskadm main menu.

2. At the following prompt, enter the device name of the disk to be enabled (or enter list for a list of devices):

		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. 

		You can also use this operation to re-scan a disk that may have
 		been changed outside of the Volume Manager. For example, if a
 		disk is shared between two systems, the Volume Manager running
 		on the other system may have changed the disk. If so, you can
 		use this operation to re-scan the disk. 

		NOTE: Many vxdiskadm operations re-scan disks without user
			intervention. This will eliminate most needs to online a
			disk directly, except when the disk is directly offlined.

		Select a disk device to enable [<address>,list,q,?] c1b0t1d0 

vxdiskadm enables the specified device.

3. At the following prompt, indicate whether you want to enable another device (y) or return to the vxdiskadm main menu (n):

		Enable another device? [y,n,q,?] (default: n) 

Replacing a Physical Disk

If a disk fails, you need to replace that disk with another. This operation requires disabling and removing the failed disk and installing a new disk in its place. To replace a disk, do the following:

1. Select menu item 4 (Remove a disk for replacement) from the vxdiskadm main menu.

2. At the following prompt, enter the name of the disk to be replaced (or enter list for a list of disks):

		Remove a disk for replacement 
		Menu: VolumeManager/Disk/RemoveForReplace 
	
		Use this menu operation to remove a physical disk from a disk 
		group, while retaining the disk name. 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, you will be
 		given the option of using one of these disks as a replacement.

		 Enter disk name [<disk>,list,q,?] disk02 

Additional screens display if there are volumes associated with the disk you wish to remove. You must decide whether to keep the data associated with the volumes or to allow that data to be lost when the disk is replaced. Answer any prompts accordingly.

3. At the following prompt, either select the device name of the replacement disk (from the list provided) or press Return to choose the default disk:

		The following devices are available as replacements: 
     			c1b0t1d0
	
		You can choose one of these disks now, to replace disk02. 
		Select "none" if you do not wish to select a replacement disk.
	
		Choose a device, or select "none" 
		[<device>,none,q,?] (default: c1b0t1d0)

4. At the following prompt, press Return to continue:

		Requested operation is to remove disk disk02 from group rootdg.
 		The removed disk will be replaced with disk device c1b0t1d0.
	
		Continue with operation? [y,n,q,?] (default: y) 
	
vxdiskadm displays the following success screens:

		Removal of disk disk02 completed successfully. 

		Proceeding to replace disk02 with device c1b0t1d0.

		Disk replacement completed successfully. 

5. At the following prompt, indicate whether you want to remove another disk (y) or return to the vxdiskadm main menu (n):

		Remove another disk? [y,n,q,?] (default: n) 

Replacing a Failed or Removed Disk

Disks can be removed and then replaced later. To do this, use menu item
4 (Remove a disk for replacement) to remove a disk, then do the following:

1. Select menu item 5 (Replace a failed or removed disk) from the vxdiskadm main menu.

2. Select the disk name of the disk to be replaced:

		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, or that failed during use. You will be prompted for 
		a disk name to replace and a disk device to use as a replacement
. 		You can choose an uninitialized disk, in which case the disk
 		will be initialized, or you can choose a disk that you have
 		already initialized using the Add or initialize a disk menu
 		operation.

		Select a removed or failed disk [<disk>,list,q,?] disk02 

3. vxdiskadm displays the device names of the disk devices available for use as replacement disks; enter the device name of the device of your choice or press Return to select the default device:

		The following devices are available as replacements:
	     c1b0t0d0s7 c1b0t1d0s7
	
		You can choose one of these disks to replace disk02. 
		Choose "none" to initialize another disk to replace disk02. 
	
		Choose a device, or select "none" 
		[<device>,none,q,?] (default: c1b0t0d0s7)
	
4. At the following prompt, press Return to replace the disk:

		The requested operation is to use the initialized device 
		c1b0t0d0s7 to replace the removed or failed disk disk02 in disk
 		group rootdg.

		Continue with operation? [y,n,q,?] (default: y) 

vxdiskadm displays the following success screen:

		Replacement of disk disk02 in group rootdg with disk device
 		c1b0t0d0s7 completed successfully. 

5. At the following prompt, indicate whether you want to replace another disk (y) or return to the vxdiskadm main menu (n):

		Replace another disk? [y,n,q,?] (default: n) 

Volume Operations

This section describes the volume operations that can be performed with the Volume Manager Support Operations. These volume operations are used to protect data in case of device failures.

Mirroring Volumes on a VM Disk

Mirroring the volumes on a VM disk gives you one or more copies of your volumes in another disk location. By creating mirror copies of your volumes, you protect your system against loss of data in case of a disk failure. You can use this operation on your root disk to make a second copy of the boot information available on an alternate disk. This will allow you to boot your system even if your root disk is corrupted.

To mirror volumes on a disk, make sure that the target disk has an equal or greater amount of space as the originating disk and then do the following:

1. Select menu item 6 (Mirror volumes on a disk) from the vxdiskadm main menu.

2. At the following prompt, enter the disk name of the disk whose volumes you wish to mirror:

		Mirror volumes on a disk 
		Menu: VolumeManager/Disk/Mirror 
	
		This operation can be used to mirror volumes on a disk. These
 		volumes can be mirrored onto another disk or onto any 
		available disk space. Volumes will not be mirrored if they are
 		already mirrored. Also, volumes that are comprised of more than
 		one subdisk will not be mirrored. 

		Mirroring volumes from the boot disk will produce a disk that
 		can be used as an alternate boot disk. 

		Enter disk name [<disk>,list,q,?] disk02 
	
3. At the following prompt, enter the target disk name (this disk must be the same size or larger than the originating disk):

		You can choose to mirror volumes from disk disk02 onto any
 		available disk space, or you can choose to mirror onto a
 		specific disk. To mirror to a specific disk, select the name of
 		that disk. To mirror to any available disk space, select "any". 

		Enter destination disk [<disk>,list,q,?] (default: any) disk01


Note: Be sure to always specify the destination disk when you are creating an alternate root disk. Otherwise, the Volume Manager will select a disk to be the alternate root disk; however, your system may not be able to boot from that disk.


4. At the following prompt, press Return to make the mirror:

		The requested operation is to mirror all volumes on disk disk02
 		in disk group rootdg onto available disk space on disk disk01.

		NOTE: This operation can take a long time to complete. 

		Continue with operation? [y,n,q,?] (default: y)

vxdiskadm displays the status of the mirroring operation:

		Mirror volume voltest-bk00 ... 

		Mirroring of disk disk01 is complete. 
	
5. At the following prompt, indicate whether you want to mirror volumes on another disk (y) or return to the vxdiskadm main menu (n):

		Mirror volumes on another disk? [y,n,q,?] (default: n) 

Moving Volumes from a VM Disk

Before you disable or remove a disk, you may want to move the data from that disk to other disks on the system. To do this, make sure that the target disks have sufficient space, then do the following:

1. Select menu item 7 (Move volumes from a disk) from the vxdiskadm main menu.

2. At the following prompt, enter the disk name of the disk whose volumes you wish to move:

		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, either permanently or for replacement. You can
 		specify a list of disks to move volumes onto, or you can move
 		the volumes to any available disk space in the same disk group.

		NOTE: Simply moving volumes off of a disk, without also removing
 				the disk, does not prevent volumes from being moved onto
         the disk by future operations. For example, using two
         consecutive move operations may move volumes from the 
         second disk to the first. 

		Enter disk name [<disk>,list,q,?] disk01 

After the following screen appears, you can optionally specify a list of disks to which the volume(s) should be moved.

		You can now specify a list of disks to move onto.  Specify a list
		of disk media names (e.g., disk01) all on one line separated by
 		blanks.  If you do not enter any disk media names, then the
 		volumes will be moved to any available space in the disk group.

3. At the following prompt, press Return to move the volumes:

		Requested operation is to move all volumes from disk disk01 in
 		group rootdg.

		NOTE: This operation can take a long time to complete. 

		Continue with operation? [y,n,q,?] (default: y)

As the volumes are moved from the disk, vxdiskadm displays the status of the operation:

		Move volume voltest ... 
		Move volume voltest-bk00 ... 

When the volumes have all been moved, vxdiskadm displays the following success screen:

		Evacuation of disk disk01 is complete. 

4. At the following prompt, indicate whether you want to move volumes from another disk (y) or return to the vxdiskadm main menu (n):

		Move volumes from another disk? [y,n,q,?] (default: n) 

Disk Group Operations

The following sections describe disk group operations available with the Volume Manager Support operations.

Adding a Disk to a Disk Group

You may wish to add a new disk to an already established disk group. Perhaps the current disks have insufficient space for the project or work group requirements, especially if these requirements have changed. You can add a disk to a disk group by following the steps required to add a disk. Refer to "Bringing Physical Disks Under Volume Manager Control."

Creating a Disk Group

There can be situations in which all data related to a particular set of applications of a particular group of users needs to be made accessible on another system. Examples of this are:

In such cases, it is important that the data related to particular application(s) or users be located on an identifiable set of disk drives. When these disks are moved, all data belonging to the application(s) or users on these disks, and no other data, is moved.


Note: The Volume Manager supports a default disk group, rootdg, in which all volumes are created if no further specification is given. All commands will default to rootdg as well.


A disk group can only be created along with a disk. A disk group must have at least one disk associated with it.

If you need to create a disk group in addition to rootdg, do the following:

1. Select menu item 1 (Add or initialize one or more disks) from the vxdiskadm main menu.

2. At the following prompt, enter the disk device name of the disk to be added to VxVM control:

		Add or initialize disks
		Menu: VolumeManager/Disk/AddDisks
 
			Use this operation to add one or more disks to a disk group.
 			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. The selected disks may also be added to a disk
 			group as spares. The selected disks may also be initialized
 			without adding them to a disk group leaving the disks
 			available for use as replacement disks.
 
			More than one disk or pattern may be entered at the prompt.
 			Here are some disk selection examples:
 
  			all:			all disks
  			c3c4b0t2:		all disks on both controller 3 and controller
 						4, target 2
  			c3b0t4d0:		a single disk

		Select disk devices to add:
		[<pattern-list>,all,list,q,?] c1b0t2d0 

Where <pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, those items must be separated by white space.

If you do not know the address (device name) of the disk to be added, enter l or list at the prompt for a listing of all disks.

3. To continue with the operation, enter y (or press Return) at the following prompt:

  		Here is the disk selected.  Output format: [Device_Name]

  		c1b0t2d0

	Continue operation? [y,n,q,?] (default: y) y  

4. At the following prompt, specify the disk group to which the disk should be added (anotherdg, in this case):

  		You can choose to add this disk to an existing disk group, a
 	 	new disk group, or leave the disk available for use by future
  		add or replacement operations.  To create a new disk group,
 		select a disk group name that does not yet exist.  To leave the
 		disk available for future use, specify a disk group name of
	 	"none".
 
	Which disk group [<group>,none,list,q,?] (default: rootdg)
 	anotherdg

5. vxdiskadm confirms that no active disk group currently exists with the same name and prompts for confirmation that you really want to create this new disk group:

		There is no active disk group named anotherdg.

		Create a new group named anotherdg? [y,n,q,?] (default: y) y 
	
6. At the following prompt, either press Return to accept the default disk name or enter a disk name:

		Use a default disk name for the disk? [y,n,q,?] (default: y) 

7. When vxdiskadm asks whether this disk should become a hot-relocation spare, enter n (or press Return):

		Add disk as a spare disk for anotherdg? [y,n,q,?] (default: n) n 

8. To continue with the operation, enter y (or press Return) at the following prompt:

  		A new disk group will be created named anotherdg and the
 		selected disks will be added to the disk group with default disk
 		names.

 		c1b0t2d0

		Continue with operation? [y,n,q,?] (default: y) y 

9. The following prompt appears if this disk was previously initialized for future VxVM use; enter y to confirm that you now want to use this disk:

 		The following disk device appears to have been initialized
 		already. The disk is currently available as a replacement disk.
  		Output format: [Device_Name]

  		c1b0t2d0

		Use this device? [y,n,q,?] (default: y) y 

If you are sure you want to reinitialize the disk, enter y (or press Return) at the following prompt:

  		The following disk you selected for use appears to already have
  		been initialized for the Volume Manager.  If you are certain the
  		disk has already been initialized for the Volume Manager, then
 		you do not need to reinitialize the disk device.
  		Output format: [Device_Name]

  		c1b0t2d0

		Reinitialize this device? [y,n,q,?] (default: y) y 

Messages similar to the following should now confirm that this disk is being reinitialized for VxVM use:

  		Initializing device c1b0t2d0.

  		Creating a new disk group named anotherdg containing the disk
  		device c1b0t2d0 with the name another01.

10. At the following prompt, indicate whether you want to continue to initialize more disks (y) or return to the vxdiskadm main menu (n):

		Add or initialize other disks? [y,n,q,?] (default: n) 

Deporting a Disk Group

Use the deport disk group operation to disable access to a disk group that is currently enabled (imported) by this system. Deport a disk group if you intend to move the disks in a disk group to another system. Also, deport a disk group if you want to use all of the disks remaining in a disk group for some new purpose.

To deport a disk group, do the following:

1. Select menu item 9 (Remove access to (deport) a disk group) from the vxdiskadm main menu.

2. At the following prompt, enter the name of the disk group to be deported:

		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. Deport a disk 
		group if you intend to move the disks in a disk group to another
 		system. Also, deport a disk group if you want to use all of the
 		disks remaining in a disk group for some new purpose. 
	
		You will be prompted for the name of a disk group. You will also
 		be asked if the disks should be disabled (offlined). For 
		removable disk devices on some systems, it is important to 
		disable all access to the disk before removing the disk. 

		Enter name of disk group [<group>,list,q,?] (default: list)
 		newdg 

3. At the following prompt, enter y if you intend to remove the disks in this disk group:

		The requested operation is to disable access to the removable 
		disk group named newdg. This disk group is stored on the 
		following disks: 
    		 	newdg01 on device c1b0t1d0s7 

		You can choose to disable access to (also known as "offline")
 		these disks. This may be necessary to prevent errors if 
		you actually remove any of the disks from the system. 

		isable (offline) the indicated disks? [y,n,q,?] (default: n)

4. At the following prompt, press Return to continue with the operation:

		Continue with operation? [y,n,q,?] (default: y)

Once the disk group is deported, vxdiskadm displays the following screen:

		Removal of disk group newdg was successful. 

5. At the following prompt, indicate whether you want to disable another disk group (y) or return to the vxdiskadm main menu (n):

		Disable another disk group? [y,n,q,?] (default: n) 

Importing a Disk Group

Use this menu operation to enable access by this system to a disk group. If you wish to move a disk group from one system to another, you must first disable (deport) it on the original system, then move the disk between systems and enable (import) the disk group.

To import a disk group, do the following:

1. Select menu item 8 (Enable access to (import) a disk group) from the vxdiskadm main menu.

2. At the following prompt, enter the name of the disk group to import:

		Enable access to (import) a disk group 
		Menu: VolumeManager/Disk/EnableDiskGroup 

		Use this operation to enable access to a disk group. This can be
 		used as the final part of moving a disk group from one system to
 		another. The first part of moving a disk group is to use the
 		"Remove access to (deport) a disk group" operation on the 
		original host. 

		A disk group can be imported from another host that failed
 		without first deporting the disk group. Be sure that all disks
 		in the disk group are moved between hosts.

		If two hosts share a SCSI bus, be very careful to ensure that
 		the other host really has failed or has deported the disk group.
 		If two active hosts import a disk group at the same time, the
 		disk group will be corrupted and will become unusable. 

		Select disk group to import [<group>,list,q,?] (default: list)
 		newdg 

Once the import is complete, vxdiskadm displays the following success screen:

		The import of newdg was successful. 

3. At the following prompt, indicate whether you want to import another disk group (y) or return to the vxdiskadm main menu (n):

		Select another disk group? [y,n,q,?] (default: n) 

Exiting the Volume Manager Support Operations

When you have completed all of your disk administration activities, exit the Volume Manager Support Operations.

To exit from the Volume Manager Support Operations, select menu item q from the vxdiskadm main menu.


[Next] [Previous] [Top] [Contents] [Index]