• Aucun résultat trouvé

Logical Volume Manager — Solaris Flavor

Dans le document Administration UNIX (Page 180-183)

UNIX Filesystem Layout

6.3 Logical Filesystem Layout

6.3.3 Logical Volume Manager — Solaris Flavor

4. Any operation typical for the disk partition is also allowed on the LV. To use an LV to hold a filesystem, the corresponding filesystem must be created and mounted:

newfs /dev/vg01/rlvol1 mkdir /mnt_dir1

mount /dev/vg01/lvol1 /mnt_dir1

HP-UX flavored LVM is discussed in greater detail in the case study in Chapter 27.

6.3.3 Logical Volume Manager — Solaris Flavor

A powerful, versatile, and up-to-date volume manager came with Sun Enterprise Volume Manager —VxVM on the Solaris 2.x platform. The original VERITAS Volume Manager is licensed to Sun Microsystems and is delivered as either optional or standard software (depending on the system configuration). VxVM builds virtual devices called volumes on top of physical disks in an extraordinarily flexible way. Volumes are composed of other

y y

VM objects that can be manipulated to make different volume configurations: to optimize performance, to provide redundancy, and to perform backup. To achieve this goal, VxVM introduced some new virtual objects.

VxVM manages the following physical and logical objects:

Physical disk and partition, in the standard UNIX sense.

VM disk— assigned to one or more physical partitions (or more precisely, to one or more physical partitions under VxVM control).

Disk group— a collection of VM disks that share a common configuration.

Subdisk — a basic logical unit to allocate disk space; a set of contiguous disk blocks. VM disks can be divided into one or more subdisks (similar to the division of physical disks into partitions).

Plexe— a new logical entity that consists of one or more subdisks, organized in way that can provide concatenation, striping, mirroring, or RAID-5; (plexes are also referred to as mirrors).

Volume — a logical disk device that appears to the filesystem as a physical partition, but does not have the physical limitations. A volume can consist of as many as 32 plexes, with one or more subdisks; the corresponding special device file identifies the volume. An arbitrary number of plexes within a volume, and the arbitrary way plexes are organized, resulted in different data storages: volumes handle single data copies, mirroring, striping, combined, or RAID-5.

The relationship between VxVM objects is presented in Figure 6.7.

Disk01-01

Relationship between VxVM objects.

Let us try to establish a functional relationship between VxVM objects and the traditional UNIX ones:

VxVM provides several kinds of user support tools to manage disk space. First, a suite of versatile VM commands is provided to accomplish any VM request. Second, a character-based, user friendly administration tool vxdiskadm enables an easy-to-use interface to manage disks. And finally, an attractive GUI visual administrator vxva presents a drag-and-drop tool for handling physical and logical entities.

The usual procedure to manage attached physical disks is:

1. Initialize all physical disks— put disks under VM control and make corresponding VM disks. For each disk:

vxdisksetup -idisk_device_file

2. Create a disk group with the first disk in it:

vxdg initdg_name vmdisk_name = disk_device_file 3. Extend a disk group with other disks:

vxdg -gdg_name adddisk vmdisk_name = disk_device_file 4. Create a volume within a disk group (including a volume layout):

vxassist -g dg_name -U fsgen make volume_name size layout =options disk_device_file(s)

5. Mirror a created volume (if requested):

vxassist -gdg_namemirrorvolume_namelayout =options disk_device_file(s) 6. Create a filesystem in the volume and mount it into a selected directory:

newfs /dev/vx/rdsk/dg_name/volume_name mkdir/mount_dir

mount /dev/vx/rdsk/dg_name/volume_name /mount_dir

VxVM fully supports all of the steps necessary to accomplish the requested task. At the very end, the filesystems have to be created in the volumes and then mounted to be used.

The same task can be accomplished in more steps by creating subdisks and plexes separ-ately. This has to be done if there are some special requests.

VxVM pays special attention to the boot disk and the root and swap partitions. VxVM is coming after UNIX installation, and the initial disk configuration is based on the traditional UNIX approach. Putting blank disks under VM control is much easier than to handle preexisting filesystems, especially crucial ones like the root filesystem and the swap partition (also /usr and /var, if they were created as separate filesystems). The special

VxVM Standard UNIX Approach

Physical disk Disk (as an accessible physical unit) Partition Disk partition

VM disk None — assigned partitions Disk group Disk (as a storage space)

Subdisk None — disk blocks

Plexe None

Volume Partition

y y

procedure to put preexisting filesystems under VM control is known as encapsulation, and VxVM also fully supports its implementation.

VxVM offers needed commands to deal with introduced entities:

vxdg Handle disks and disk groups with a number of options (subcommands) vxassist Handle disks with a number of options (subcommands)

vxdisksetup Initialize physical disks vxmake Create VM objects vxplex Handle plexes

vxsd Perform subdisk operations vxprint Print display VM information vxtrace Trace kernel VM related activities vxrecover Recover VM entities

vxinfo Identify volumes vxstat Print volume statistics vxvol Handle volumes

Some of the listed commands are utilities with many options, or rather subcommands, to fulfill different VM tasks.

Solaris-flavored LVM is also discussed in greater detail in the case study in Chapter 27.

Dans le document Administration UNIX (Page 180-183)