< Previous | Next > | |
Product: Volume Manager Guides | |
Manual: Volume Manager 4.1 Administrator's Guide |
Creating a Volume Using vxmakeAs an alternative to using vxassist, you can create a volume using the vxmake command to arrange existing subdisks into plexes, and then to form these plexes into a volume. Subdisks can be created using the method described in Creating Subdisks. The example given in this section is to create a RAID-5 volume using vxmake. Creating a RAID-5 plex for a RAID-5 volume is similar to creating striped plexes, except that the layout attribute is set to raid5. Subdisks can be implicitly associated in the same way as with striped plexes. For example, to create a four-column RAID-5 plex with a stripe unit size of 32 sectors, use the following command: # vxmake -g mydg plex raidplex layout=raid5 stwidth=32 \ sd=mydg00-01,mydg01-00,mydg02-00,mydg03-00 Note that because four subdisks are specified, but the number of columns is not specified, the vxmake command assumes a four-column RAID-5 plex and places one subdisk in each column. Striped plexes are created using the same method except that the layout is specified as stripe. If the subdisks are to be created and added later, use the following command to create the plex: # vxmake -g mydg plex raidplex layout=raid5 ncolumn=4 stwidth=32 Note If no subdisks are specified, the ncolumn attribute must be specified. Subdisks can be added to the plex later using the vxsd assoc command (see Associating Subdisks with Plexes). If each column in a RAID-5 plex is to be created from multiple subdisks which may span several physical disks, you can specify to which column each subdisk should be added. For example, to create a three-column RAID-5 plex using six subdisks, use the following form of the vxmake command: # vxmake -g mydg plex raidplex layout=raid5 stwidth=32 \ sd=mydg00-00:0,mydg01-00:1,mydg02-00:2,mydg03-00:0, \ mydg04-00:1,mydg05-00:2 This command stacks subdisks mydg00-00 and mydg03-00 consecutively in column 0, subdisks mydg01-00 and mydg04-00 consecutively in column 1, and subdisks mydg02-00 and mydg05-00 in column 2. Offsets can also be specified to create sparse RAID-5 plexes, as for striped plexes. Log plexes may be created as default concatenated plexes by not specifying a layout, for example: # vxmake -g mydg plex raidlog1 mydg06-00 # vxmake -g mydg plex raidlog2 mydg07-00 To create a RAID-5 volume, specify the usage type to be RAID-5 using the following command: # vxmake -g mydg -Uraid5 vol raidvol RAID-5 plexes and RAID-5 log plexes are associated with the volume raidvol using the following command: # vxmake -g mydg -Uraid5 vol raidvol \ plex=raidplex,raidlog1,raidlog2 Note Each RAID-5 volume has one RAID-5 plex where the data and parity are stored. Any other plexes associated with the volume are used as RAID-5 log plexes to log information about data and parity being written to the volume. After creating a volume using vxmake, you must initialize it before it can be used. The procedure is described in Initializing and Starting a Volume. Creating a Volume Using a vxmake Description FileYou can use the vxmake command to add a new volume, plex or subdisk to the set of objects managed by VxVM. vxmake adds a record for each new object to the VxVM configuration database. You can create records either by specifying parameters to vxmake on the command line, or by using a file which contains plain-text descriptions of the objects. The file can also contain commands for performing a list of tasks. Use the following form of the command to have vxmake read the file from the standard input: # vxmake [-g diskgroup] < description_file Alternatively, you can specify the file to vxmake using the -d option: # vxmake [-g diskgroup] -d description_file The following sample description file defines a volume, db, with two plexes, db-01 and db-02: #rectyp #name #options sd mydg03-01 disk=mydg03 offset=0 len=10000 sd mydg03-02 disk=mydg03 offset=25000 len=10480 sd mydg04-01 disk=mydg04 offset=0 len=8000 sd mydg04-02 disk=mydg04 offset=15000 len=8000 sd mydg04-03 disk=mydg04 offset=30000 len=4480 plex db-01 layout=STRIPE ncolumn=2 stwidth=16k sd=mydg03-01:0/0,mydg03-02:0/10000,mydg04-01:1/0, mydg04-02:1/8000,mydg04-03:1/16000 sd ramd1-01 disk=ramd1 len=640 comment="Hot spot for dbvol plex db-02 sd=ramd1-01:40320 vol db usetype=gen plex=db-01,db-02 readpol=prefer prefname=db-02 comment="Uses mem1 for hot spot in last 5m Note The subdisk definition for plex, db-01, must be specified on a single line. It is shown here split across two lines because of space constraints. The first plex, db-01, is striped and has five subdisks on two physical disks, mydg03 and mydg04. The second plex, db-02, is the preferred plex in the mirror, and has one subdisk, ramd1-01, on a volatile memory disk. For detailed information about how to use vxmake, refer to the vxmake(1M) manual page. After creating a volume using vxmake, you must initialize it before it can be used. The procedure is described in Initializing and Starting a Volume Created Using vxmake. |
^ Return to Top | < Previous | Next > |
Product: Volume Manager Guides | |
Manual: Volume Manager 4.1 Administrator's Guide | |
VERITAS Software Corporation
www.veritas.com |