|
|
VxVM User's Guide
Add a disk by entering the command:
vxdiskadd devnamewhere devname is the device name of the disk to be added.
To add the device c1b0t0d0
to Volume Manager control, do the following:
vxdiskadd
:
vxdiskadd c1b0
t0d0
s0
suffix is not used here.
y
(or press Return) at the following prompt:
Add or initialize disks Menu: VolumeManager/Disk/AddDisks Here is the disk selected. Output format: [Device_Name] c1b0t0d0 Continue operation? [y,n,q,?] (default: y) y
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)
Use a default disk name for the disk? [y,n,q,?] (default: y)
n
(or press Return):
Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) n
y
(or press Return) at the following prompt:
The selected disks will be added to the disk group rootdg with default disk names.
c1b0t0d0
Continue with operation? [y,n,q,?] (default: y) y
y
to select encapsulation:
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]
c1b0t0d0
Encapsulate this device? [y,n,q,?] (default: y) y
The following disk has been selected for encapsulation. Output format: [Device_Name c1b0t0d0]
Continue with encapsulation? [y,n,q,?] (default: y)
The disk device c1b0t0d0 will be encapsulated and added to the disk group rootdg with the disk name disk01.
The c1b0t0d0 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.
Goodbye.
Remember to perform a shutdown and reboot as soon as convenient.
vxassist
allocates space from any disk that has free space. You may wish to reserve some set of disks for special purposes, such as to avoid general use of a particularly slow or a particularly fast disk. To reserve a disk for special purposes, enter:
vxedit set reserve=on disknameAfter you enter this command,
vxassist
will not allocate space from the selected disk unless that disk is specifically mentioned on the vxassist
command line. For example, if disk disk03
is reserved, the command:
vxassist make vol03 20m disk03overrides the reservation and creates a 20 megabyte volume on
disk03
. However, the command:
vxassist make vol04 20mdoes not use
disk03
, even if there is no free space on any other disk. To turn off reservation of a disk, enter:
vxedit set reserve=off
diskname
To add an initialized disk to a disk group, enter:
vxdiskadd devnameTo add device
c1b0t1d0
to rootdg
, do the following:
vxdiskadd
:
vxdiskadd c1b0
t1d0
vxdiskadd
displays the following message:
Add or initialize disks Menu: VolumeManager/Disk/AddDisks
Here is the disk selected. Output format: [Device_Name]
c1b0t1d0
Continue operation? [y,n,q,?] (default: y) y
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)
Use a default disk name for the disk? [y,n,q,?] (default: y)
vxdiskadd
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
y
(or press Return) at the following prompt:
The selected disks will be added to the disk group rootdg with default disk names.
c1b0t1d0
Continue with operation? [y,n,q,?] (default: y) y
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]
c1b0t1d0
Use this device? [y,n,q,?] (default: y) y
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]
c1b0t1d0 Reinitialize this device? [y,n,q,?] (default: y) y
Initializing device c1b0t1d0.
Perform surface analysis (highly recommended) [y,n,q,?] (default: y) n Adding disk device c1b0t1d0 to disk group rootdg with disk name disk03.
To confirm that the disk has been added to the disk group, enter:
vxdisk listThe Volume Manager returns a listing similar to the following:
DEVICE TYPE DISK GROUP STATUS c0b0t0d0s0 sliced rootdisk rootdg online c1b0t0d0s0 sliced disk01 rootdg online c1b0t1d0s0 sliced disk03 rootdg online
To take a physical disk offline, first remove the disk from its disk group. Then place the disk in an ''offline'' state as follows:
vxdisk offline devnameTo take the device
c1b0t1d0s0
off line, enter:
vxdisk offline c1b0t1d0s0
Removing a disk involves the following steps:
vxdg [-g groupname] rmdisk diskname
disk01
from rootdg
, enter:
vxdg rmdisk disk01
rootdg
is the default disk group, you do not need to specify it.
vxdisk rm devname
c1b0t0d0
from Volume Manager control, enter:
vxdisk rm c1b0t0d0s0
vxdisk
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 information on all disks that are defined to the Volume Manager, enter:
vxdisk listThe Volume Manager returns the following display:
DEVICE TYPE DISK GROUP STATUS c0b0t0d0s0 sliced rootdisk rootdg online c1b0t0d0s0 sliced disk01 rootdg online c1b0t1d0s0 sliced - - onlineTo display details on a particular disk defined to the Volume Manager, enter:
vxdisk list disk01
To designate a disk as a hot-relocation spare, enter:
vxedit set spare=on disknameFor example, to designate disk
disk01
as a spare, enter:
vxedit set spare=on disk01You can use the
vxdisk
list
command to confirm that this disk is now a spare; disk01
should be listed with a spare
flag.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.
To determine which disks are currently designated as spares, use the command vxdisk
list
. The output of this command should list any spare disks with the spare
flag.
To remove a spare from the hot-relocation pool, enter:
vxedit set spare=off disknameFor example, to make disk
disk01
available for normal use, enter:
vxedit set spare=off disk01
vxedit rename old_diskname new_diskname
To rename disk01
to disk03
, enter:
vxedit rename disk01 disk03To see if the name change took place, enter:
vxdisk listThe Volume Manager returns the following:
DEVICE TYPE DISK GROUP STATUS c0b0t0d0s0 sliced rootdisk rootdg online c1b0t0d0s0 sliced disk03 rootdg online c1b0t1d0s0 sliced - - online
vxdiskadm
(see Chapter 13, "Menu Interface Operations"). This makes it possible to recover from failure of your boot disk by replacing it with the mirror of the boot disk. To mirror your boot disk, do the following:
vxdiskadd
command to add the selected disk as a new disk (if it is not already added).
/etc/vx/bin/vxrootmir alternate_disk
vxrootmir
creates a mirror for rootvol
(the volume for the root file system).
/home
or /tmp
file systems. These can be mirrored separately using the vxassist
utility. For example, if you have a /home
file system on a volume homevol
, you can mirror it to alternate_disk using the command:
vxassist mirror homevol alternate_diskIf you do not have space for a copy of some of these file systems on your alternate boot disk, you can mirror them to other disks. You can also span or stripe these other volumes across other disks attached to your system.
To list all volumes on your primary boot disk, use the command:
vxprint -t -v -e 'aslist.aslist.sd_disk="boot_disk_name"'To mirror all of the simple volumes on this disk to your alternate boot disk, use the command:
/etc/vx/bin/vxmirror boot_disk_name alternate_diskOn an IBM PC or compatible machine, the system normally can be booted only from one of two drives: drive C or drive D. Your disk controllers define which drive is C and which is D. Some disk controllers allow you to configure which disks are drive C and D. Most disk controllers configure drive C to be the disk on controller 0 with SCSI target ID 0, and drive D to be the disk with SCSI target ID 1 (or the lowest SCSI target ID on the next controller if the first has only one disk connected).
If you choose an alternate boot disk that corresponds to the disk controller's recognition of drive D, you may be able to boot on that drive without having to reconfigure the hardware. Depending on the disk controller and the type of failure for the primary boot disk, booting from drive D may happen automatically.
If you do not choose drive D as the alternate boot disk, you may need to renumber the disks attached to your system to be able to boot from the alternate disk (refer to Appendix B, "Recovery," in the VERITAS Volume Manager System Administrator's Guide).
rootdg
, in which all volumes are created if no further specification is given. All commands will default to rootdg
as well.
newdg
associated with a disk, do the following:
vxdiskadd
:
vxdiskadd c1b0t1d0
Add or initialize disks Menu: VolumeManager/Disk/AddDisks Here is the disk selected. Output format: [Device_Name] c1b0t1d0 Continue operation? [y,n,q,?] (default: y)
newdg
, 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) newdg
vxdiskadd
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 newdg.
Create a new group named newdg? [y,n,q,?] (default: y) y
y
to continue.
Use a default disk name for the disk? [y,n,q,?] (default: y)
vxdiskadd
asks whether this disk should become a hot-relocation spare, enter n
(or press Return):
Add disk as a spare disk for newdg? [y,n,q,?] (default: n) n
y
(or press Return) at the following prompt:
A new disk group will be created named newdg and the selected disks will be added to the disk group with default disk names.
c1b0t1d0
Continue with operation? [y,n,q,?] (default: y) y
Initializing device c1b0t1d0. Creating a new disk group named newdg containing the disk device c1b0t1d0 with the name newdg01.
vxdisk list
The Volume Manager returns the following:
DEVICE TYPE DISK GROUP STATUS c0b0t0d0s0 sliced rootdisk rootdg online c1b0t0d0s0 sliced disk03 rootdg online c1b0t1d0s0 sliced newdg01 newdg online
Move a disk group across systems as follows:
vxdg deport diskgroup
vxdg import diskgroup
vxrecover -g diskgroup -sb
Every system running the Volume Manager must have a single rootdg
disk group. rootdg
can therefore only be moved across systems if it is renamed.
The following set of steps can be used to temporarily move the rootdg
disk group from one host to another (for repair work on the root volume, for instance) and then move it back:
vxdisk -s list
dgname: rootdg dgid: 774226267.1025.tweety
rootdg
disk group as follows:
vxdg -tC -n newdg_name import diskgroup
-t
indicates a temporary import name; -C
clears import locks (and should only be used if you are certain that the disks are not being used by any other hosts); -n
specifies a temporary name for the rootdg
to be imported (so that it does not conflict with the existing rootdg
); and diskgroup is the ID of the rootdg
disk group being imported.
rootdg
, deport it back to its original host as follows:
vxdg -h hostname deport diskgroup
rootdg
is being returned (the system's name can be confirmed with the command uname
-n
). This command removes the imported rootdg
from the importing host and returns locks to its original host. The original host will then autoimport its rootdg
on its next reboot.
Display information on existing disk groups as follows:
vxdg listThe Volume Manager returns the following listing of current disk groups:
NAME STATE ID rootdg enabled 730344554.1025.tweety newdg enabled 731118794.1213.tweety
Display more detailed information on a specific disk group (such as rootdg
) as follows:
vxdg list rootdgThe Volume Manager returns output such as the following for
rootdg
:
Group: rootdg dgid: 730344554.1025.tweety import-id: 0.1 flags: copies: nconfig=default nlog=default config: seqno=0.94553 permlen=795 free=768 templen=16 loglen=8 config disk c2b0t2d2s0 copy 1 len=795 disabled config disk c2b0t2d3s0 copy 1 len=795 disabled config disk c2b0t2d4s0 copy 1 len=795 disabled config disk c2b0t3d0s0 copy 1 len=795 state=clean online log disk c2b0t2d2s0 copy 1 len=120 disabled log disk c2b0t2d3s0 copy 1 len=120 disabled log disk c2b0t2d4s0 copy 1 len=120 disabled log disk c2b0t3d0s0 copy 1 len=120
If you need to verify the disk group ID and name associated with a specific disk (to import the disk group, for example), use the following command:
vxdisk -s list devicenameThis command provides output that includes the following information for the specified disk:
dgname: rootdg dgid: 774226267.1025.tweety