12132017Headline:

Veritas Volume Manager Basic Volume Creation using vxmake

Creating 50M Volume

Creating Sub Disks.

Use the vxmake command to create VxVM objects, such as subdisks:

# vxmake [-g diskgroup] sd subdisk diskname,offset,length
where subdisk is the name of the subdisk, diskname is the disk name, offset is the starting point (offset) of the subdisk within the disk, and length is the length of the subdisk.

For example, to create a subdisk named appdisk5-01 in the disk group, mydg, that starts at the beginning of disk appdisk5 and has a length of 102400 sectors, use the following command:

bash-3.2# vxmake -g appdg sd appdisk5-01 appdisk5,0,102400

bash-3.2# vxprint -hg appdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg appdg appdg – – – – – –

dm appdisk4 disk_4 – 2031232 – – – –
dm appdisk5 disk_5 – 2031232 – – – –
dm appdisk6 disk_6 – 2031232 – – – –
dm appdisk7 disk_7 – 2031232 – – – –

sd appdisk5-01 – ENABLED 102400 – – – –

v vol1 fsgen ENABLED 204800 – ACTIVE – –
pl vol1-01 vol1 ENABLED 204800 – ACTIVE – –
sd appdisk4-01 vol1-01 ENABLED 204800 0 – – –

bash-3.2# vxmake -g appdg sd appdisk5-02 appdisk5,102400,204800

bash-3.2# vxprint -hg appdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg appdg appdg – – – – – –

dm appdisk4 disk_4 – 2031232 – – – –
dm appdisk5 disk_5 – 2031232 – – – –
dm appdisk6 disk_6 – 2031232 – – – –
dm appdisk7 disk_7 – 2031232 – – – –

sd appdisk5-01 – ENABLED 102400 – – – –
sd appdisk5-02 – ENABLED 204800 – – – –

v vol1 fsgen ENABLED 204800 – ACTIVE – –
pl vol1-01 vol1 ENABLED 204800 – ACTIVE – –
sd appdisk4-01 vol1-01 ENABLED 204800 0 – – –

Creating Plex and associating with subdisks

Associating a subdisk with a plex places the amount of disk space defined by the subdisk at a specific offset within the plex. The entire area that the subdisk fills must not be occupied by any portion of another subdisk. There are several ways that subdisks can be associated with plexes, depending on the overall state of the configuration.

If you have already created all the subdisks needed for a particular plex, to associate subdisks at plex creation, use the following command:

# vxmake [-g diskgroup] plex plex sd=subdisk,…
For example, to create the plex home-1 and associate subdisks mydg02-01, mydg02-00, and mydg02-02 with plex home-1, all in the disk group, mydg, use the following command:

# vxmake -g mydg plex home-1 sd=mydg02-01,mydg02-00,mydg02-02

Creating plex
bash-3.2# vxmake -g appdg plex vol2-01 sd=appdisk5-01

bash-3.2# vxprint -hg appdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg appdg appdg – – – – – –

dm appdisk4 disk_4 – 2031232 – – – –
dm appdisk5 disk_5 – 2031232 – – – –
dm appdisk6 disk_6 – 2031232 – – – –
dm appdisk7 disk_7 – 2031232 – – – –

sd appdisk5-02 – ENABLED 204800 – – – –

pl vol2-01 – DISABLED 102400 – – – –
sd appdisk5-01 vol2-01 ENABLED 102400 0 – – –

v vol1 fsgen ENABLED 204800 – ACTIVE – –
pl vol1-01 vol1 ENABLED 204800 – ACTIVE – –
sd appdisk4-01 vol1-01 ENABLED 204800 0 – – –

Create Volume
bash-3.2# vxmake -g appdg vol vol2 plex=vol2-01

bash-3.2# vxprint -htg appdg

dg appdg default default 19000 1459878188.22.solariscluster1

dm appdisk4 disk_4 auto 65536 2031232 –
dm appdisk5 disk_5 auto 65536 2031232 –
dm appdisk6 disk_6 auto 65536 2031232 –
dm appdisk7 disk_7 auto 65536 2031232 –

sd appdisk5-02 – appdisk5 102400 204800 – disk_5 ENA

v vol1 – ENABLED ACTIVE 204800 SELECT – fsgen
pl vol1-01 vol1 ENABLED ACTIVE 204800 CONCAT – RW
sd appdisk4-01 vol1-01 appdisk4 0 204800 0 disk_4 ENA

v vol2 – DISABLED EMPTY 102400 ROUND – gen
pl vol2-01 vol2 DISABLED EMPTY 102400 CONCAT – RW
sd appdisk5-01 vol2-01 appdisk5 0 102400 0 disk_5 ENA

bash-3.2# vxvol -g appdg start vol2
bash-3.2# vxprint -hg appdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg appdg appdg – – – – – –

dm appdisk4 disk_4 – 2031232 – – – –
dm appdisk5 disk_5 – 2031232 – – – –
dm appdisk6 disk_6 – 2031232 – – – –
dm appdisk7 disk_7 – 2031232 – – – –

sd appdisk5-02 – ENABLED 204800 – – – –

v vol1 fsgen ENABLED 204800 – ACTIVE – –
pl vol1-01 vol1 ENABLED 204800 – ACTIVE – –
sd appdisk4-01 vol1-01 ENABLED 204800 0 – – –

v vol2 gen ENABLED 102400 – ACTIVE – –
pl vol2-01 vol2 ENABLED 102400 – ACTIVE – –
sd appdisk5-01 vol2-01 ENABLED 102400 0 – – –

bash-3.2# mkdir /opt/testvol2

bash-3.2# mkfs -F vxfs /dev/vx/rdsk/appdg/vol2
version 9 layout
102400 sectors, 51200 blocks of size 1024, log size 1024 blocks
rcq size 1024 blocks
largefiles supported
bash-3.2# mount -F vxfs /dev/vx/dsk/appdg/vol2 /opt/testvol2
bash-3.2# df | grep -i testvol2
/opt/testvol2 (/dev/vx/dsk/appdg/vol2): 96054 blocks 12004 files

What Next

Recent Articles

Leave a Reply

Submit Comment