Sie sind auf Seite 1von 109

VERITAS

Volume Manager
Basic Administration and Trouble shooting
Storage Management Issues
 1. Storage H/W from multiple vendors.
 2. Data Growth.
 3. Management Pressure to increase
efficiency.
 4. Dissimilar Apps with diff storage
resource needs.
 5. Budget and cost control.
Storage Virtualization
 Storage Virtulation is the process of
taking multiple physical storage devices
and combining them into logical
(Virtual) Storage device that are
presented to the operating system,
applications and users.
 Benefit: Greater IT Productivity through
the automation of manual task. Etc.
Storage Virtualization Types:
 Storage Based.
 Host Based. Veritas Volume Manager
 Network Based.
What is Volume Manger?
 VERITAS Volume Manager (VxVM) is
an online storage management tool that
provides a logical volume management
layer which overcomes the physical
restrictions of hardware disk devices by
spanning volumes across multiple
spindles.
What is Volume Manger?

 Through the support of RAID


redundancy techniques, VxVM protects
against disk and hardware failures,
while providing the flexibility to extend
the capabilities of existing hardware.
Types of Objects

 Physical Storage Objects

 Logical or Virtual Objects


Physical Storage Objects
Logical or Virtual Objects
Disk Groups
VM Disks
Sub Disks
Plexes
Volumes
How Volume Manager Works?
How Volume Manager Works?. . .

 1. Volume Manager removes all of the


partition table entries from the VTOC,
except for partition table entry 2 (backup
slice). Partition table entry 2 contains the
entire disk, including the VTOC, and is
used to determine the size of the disk.
How Volume Manager Works?. . .

 2. Volume Manager then rewrites the VTOC


and creates two partitions on the physical
disk. One partition contains the private
region, and the other contains the public
region.
How Volume Manager Works?. . .

 Volume Manager updates the VTOC with


information about the removal of the
existing partitions and the addition of the
new partitions during the initialization
process.
How Volume Manager Works?. . .

 Private region: The private region stores information, such as


disk headers, configuration copies, and kernel logs, that
Volume Manager uses to manage virtual objects. The private
region represents a small management overhead.
The minimum size for the private region is 1024 sectors (512K)
for disks with active configuration databases, but VxVM uses
2048 sectors (1024K) by default. This default value is rounded
up to the next cylinder boundary.

 The maximum size for the private region is 524288 blocks


(512K sectors).
Which disks do you want to place
under Volume Manager control?
Do you want to exclude any disks from
Volume Manager control?
Do you want to suppress dynamic
multipathing on any disks?
When you place disks under Volume Manager
control, do you want to preserve or eliminate data
in existing file systems and partitions?
When you place disks under Volume Manager
control, do you want to preserve or eliminate data
in existing file systems and partitions?. . .

 When you place a disk under Volume


Manager control, you can either
preserve the data that exists on the
physical disk (encapsulation) or
eliminate all of the data on the physical
disk (initialization).
Encapsulation

 Saving the data on a disk brought under


Volume Manager control is called disk
encapsulation
Initialization

 Eliminating all of the data on a physical


disk brought under Volume Manager
control is called disk initialization
 Any disks that are encapsulated or
initialized during installation are placed in
the disk group rootdg. If disks are left alone
during installation, they can be placed
under Volume Manager control later and
assigned to disk groups other than rootdg.
Do you want to place the system root
disk under Volume Manager control?
 Existing /, /usr, and /var partitions are converted
to volumes without removing the partitions.
 Other partitions are converted to volumes, and
then partitions are removed.
 The existing swap area is converted to a volume. If
there is insufficient space for the private region on
the boot disk, Volume Manager takes sectors from
the swap area of the disk, which makes the private
region overlap the public region. The swap
partition remains the same size, and the swap
volume is resized to be smaller than the swap
partition.
 The /etc/system and /etc/vfstab files are modified.
VxVM Licensing

 # vxlicense –c ;Adding a
license a key

 # vxlicense –p ;Viewing
installed license keys
Managing Disks
Placing a Disk Under Volume
Manager Control
Placing a Disk Under Volume
Manager Control. . .
Placing a Disk Under Volume
Manager Control . . .
 # vxdisksetup -i c1t0d0

 The -i option writes a disk header to the


disk, making the disk directly usable
 # vxdg -g newdg adddisk
newdg02=c2t0d0
Removing a disk
 If a disk is no longer needed in a disk group, you can
remove the disk. After you remove a disk from a disk
group, the disk cannot be accessed. When removing a
disk from a disk group, you have two options:
 Move the disk to the free disk pool. With this option, the
disk remains under Volume Manager control.
 Send the disk back to an uninitialized state. With this
option, the disk is no longer under Volume Manager
control.
 You cannot remove the last disk in a disk group. To
remove the last disk in a disk group, the disk group must
be destroyed. The last disk in the rootdg disk group can
never be removed.
 # vxdg -g newdg rmdisk
newdg02

 vxdiskunsetup –C c1t0d0
Managing Disk Group
 A disk group is created when you place at least one
disk in the disk group. When you add a disk to a disk
group, a disk group entry is added to the private
region header of that disk. Because a disk can only
have one disk group entry in its private region header,
one disk group does not "know about" other disk
groups, and therefore disk groups cannot share
resources, such as disk drives, plexes, and volumes. A
volume with a plex can belong to only one disk group,
and subdisks and plexes of a volume must be stored in
the same disk group.
 When you add a disk to a disk group,
VxVM assigns the disk media name to
the disk and maps this name to the disk
access record. In addition, the host name
is also recorded in the private region.
This information is written to the private
region of the disk.
Creating Disk Group
 # vxdg init newdg \
newdg01=c1t1d0s2
Designating a Disk As a
Hot-Relocation Spare

 vxedit -g diskgroup set


spare=on|off datadg02
Making a Disk Group Unavailable
 # umount /filesystem1

 # umount /filesystem2

 # vxdg deport newdg


Importing a Deported Disk Group
Moving Disk Groups between
Systems
Renaming a Disk Group
 # vxdg -n mktdg deport datadg
 # vxdg import mktdg
 # vxvol -g mktdg startall

(or)

 # vxdg deport datadg


 # vxdg -n mktdg import datadg
 # vxvol -g mktdg startall
Destroying a Disk Group

 # vxdg destroy newdg


Viewing Disk Group Information
Selecting a Volume Layout
Concatenated Layout
Striped Layout
Mirrored Layout
RAID-5
Creating a Concatenated Volume
 # vxassist -g datadg make
datavol 10g

 # vxassist -g datadg make


datavol layout=nostripe 10g

 # vxassist -g datadg make


datavol 10g datadg02 datadg03
Creating a Striped Volume

 # vxassist -g acctdg make


payvol 20m layout=stripe

 # vxassist -g acctdg make


expvol 20m layout=stripe
ncol=3 stripeunit=64K
acctdg01 acctdg02 acctdg03
Creating a RAID-5 Volume

 # vxassist -g acctdg make


expvol 20m layout=raid5

 # vxassist -g acctdg make


expvol 20m layout=raid5
stripeunit=32K acctdg01
acctdg02 acctdg03 acctdg04
Creating a Mirrored Volume

 # vxassist -g datadg make datavol


5g layout=mirror

 # vxassist -g datadg make datavol


5g layout=stripe,mirror
Estimating Volume Size

 # vxassist -g datadg maxsize

 # vxassist -g datadg maxsize


layout=raid5

 vxassist -g datadg maxgrow


datavol
Displaying Volume information

 # vxprint –Aht
 # vxprint –g rootdg
 # vxprint –dt
 # vxprint –st
 # vxprint –pt
 # vxprint -vt
Removing a Volume
Removing a Volume . . .

 # vxassist -g datadg remove


volume datavol

 # vxedit –g datadg –rf rm


datavol
Adding Mirror
Adding Mirror . . .
 # vxassist -g datadg mirror datavol

 # vxassist -g datadg mirror datavol


datadg03
Removing a Mirror
 # vxassist -g datadg remove mirror
datavol datadg02

(or)

 # vxplex -g datadg dis datavol-02

 # vxedit -g datadg -rf rm \


datavol-02
Adding File System to a Volume

 # newfs
dev/vx/rdsk/datadg/datavol

 # mount
/dev/vx/dsk/datadg/datavol
/data
Volume Maintenance . . .
Managing Volume Tasks
Disk Encapsulation
 On a Solaris system VxVM uses the volume table of contents
(VTOC) to determine disk size (partition 2), then creates two
partitions on the physical disk:

 One partition contains the private region. The private region


stores VxVM information, such as disk headers,
configuration copies, and kernel logs. Slice 3 is used for
Private Region.
The other partition contains the public region. The public
region is used for storage space allocation and is always
associated with Slice 4.
Root Disk Encapsulation
Encapsulating Root
VxVM Daemons
 vxconfigd
 When a system is booted, the command vxdctl enable is
automatically executed to start the VxVM configuration
daemon, vxconfigd. VxVM reads the /etc/vx/volboot file to
determine disk ownership, then automatically imports rootdg
and all other disk groups owned by this host.

 vxconfigd reads the kernel log to determine the state of


VxVM objects. vxconfigd reads the configuration database
on the disks, then uses the kernel log to update the state
information of the VM objects.
VxVM Daemons . . .

 vxiod
 vxiod—VxVM I/O kernel threads provide
extended I/O operations without blocking
calling processes. By default, 10 I/O threads
are started at boot time, and at least one I/O
thread must continue to run at all times.
VxVM Daemons . . .

 vxrelocd
 vxrelocd is the hot relocation daemon that
monitors events that affect data redundancy. If
redundancy failures are detected, vxrelocd
automatically relocates affected data from
mirrored or RAID-5 subdisks to spare disks or
other free space within the disk group. vxrelocd
also notifies the system administrator by e-mail
of redundancy failures and relocation activities.
How Does vxconfigd Work?

 The VxVM configuration daemon must be


running in order for configuration changes
to be made to the VxVM configuration
database. If vxconfigd is not running, VxVM
will operate properly, but configuration
changes are not allowed.
vxconfigd Modes
 Enabled

Enabled is the normal operating mode in


which most configuration operations are
allowed. Disk groups are imported, and
VxVM begins to manage device nodes stored
in /dev/vx/dsk and /dev/vx/rdsk.
 Disabled

In the disabled mode, most operations are not


allowed. vxconfigd does not retain configuration
information for the imported disk groups and does
not maintain the volume and plex device
directories. Certain failures, most commonly the
loss of all disks or configuration copies in the
rootdg disk group, will cause vxconfigd to enter the
disabled state automatically.
 Booted

The booted mode is part of normal system startup,


prior to checking the root file system. The booted
mode imports the rootdg disk group and waits for a
request to enter the enabled mode. Volume device
node directories are not maintained, because it may
not be possible to write to the root file system.
The vxdctl Utility

 vxconfigd is invoked by startup scripts


during the boot procedure. To manage some
aspects of vxconfigd, you can use the vxdctl
utility.
 # vxdctl mode
 mode: enabled
 This command displays the status of the
configuration daemon. If the configuration
daemon is not running, it must be started in order
to make configuration changes. Disk failures are
also configuration changes.
 If vxconfigd is running, but not enabled, the
following message is displayed:
 mode: disabled

 To enable the configuration daemon, you


type:
 # vxdctl enable
 mode: not-running

 # vxconfigd

 Once started, vxconfigd automatically


becomes a background process.
 # vxdctl stop

 To send a kill -9 to vxconfigd:

 # vxdctl -k stop
Types of VxVM Disks
 A sliced disk is a disk that has separate slices
for the public and private regions.
 A NOPRIV disk is a disk that does not
contain a private region
 CDS DIsk
Disk Failure: Permanent disk
failure:
 When a disk is corrupted and no longer
usable, the disk must be logically and
physically removed, and then replaced with a
new disk. With permanent disk failure, data
on the disk is lost.

Example: VTOC is damaged.


Temporary disk failure
 Temporary disk failure: When
communication to a disk is interrupted, but
the disk is not damaged, the disk can be
logically removed, then reattached as the
replacement disk. With temporary (or
intermittent) disk failure, data still exists on
the disk.

Example: Power is disrupted.


Impact of Disk Failure

 VxVM is designed to protect your system


from the impact of disk failure through a
feature called hot relocation. The hot-
relocation feature of VxVM automatically
detects disk failures and restores redundancy
to failed VxVM objects by moving subdisks
from failed disks to other disks.
 Note: Hot relocation is only performed for
redundant (mirrored or RAID-5) subdisks on
a failed disk. Nonredundant subdisks on a
failed disk are not relocated, but the system
administrator is notified of the failure.
Partial Disk Failure

 When a partial disk failure occurs (that is, a failure


affecting only some subdisks on a disk), redundant
data on the failed portion of the disk is relocated.
Existing volumes on the unaffected portions of the
disk remain accessible. With partial disk failure,
the disk is not removed from VxVM control and is
labeled as FAILING, rather than as FAILED.
Before removing a FAILING disk for replacement,
you must evacuate any remaining volumes on the
disk.
How Does Hot Relocation Work?

 The vxrelocd daemon starts during system


startup and monitors VxVM for failures
involving disks, plexes, or RAID-5 subdisks.
When a failure occurs, vxrelocd triggers a
hot-relocation attempt and notifies the
system administrator, through e-mail, of
failures and any relocation and recovery
actions.
 The vxrelocd daemon is started from the
S95vxvm-recover file. The argument to
vxrelocd is the list of people to e-mail notice
of a relocation (default is root). To disable
vxrelocd, you can place a "#" in front of the
line in the S95vxvm-recover file.
 The hot-relocation feature is enabled by
default. No system administrator action is
needed to start hot relocation when a failure
occurs.
Setting Up Spare Disks

 vxedit -g datadg set spare=on datadg03

 vxedit -g datadg set spare=off datadg03


Reserving Disks
 A spare disk is not the same as a reserved disk. You
can reserve a set of disks for special purposes, such
as to avoid general use of a particularly slow or a
particularly fast disk

 # vxedit set reserve=on datadg05

 # vxedit set reserve=off datadg05


 After you type this command, vxassist does
not allocate space from the selected disk
unless that disk is specifically mentioned on
the vxassist command line.
 # vxassist make vol03 20g
datadg05

 overrides the reservation and creates a 20-


MB volume on datadg05. However, the
command
 # vxassist make vol04 20g

does not use datadg05, even if there is no free


space on any other disk.
Replace a failed disk

Das könnte Ihnen auch gefallen