Powered By Blogger

Wednesday, December 24, 2014

How to Resize the Stripe Volume in VXVM:

How to Resize the Stripe Volume in VXVM:
Volume Manager has the following internal restrictions regarding the extension of striped volume columns:
  • Device(s) used in one column cannot be used in any other columns in that volume.
  • All stripe columns must be grown in parallel.
Use the following commands to determine if you have enough devices or free space to grow your volume.
# vxprint -htqg datadg examplevol
v examplevol - ENABLED ACTIVE 117463040 SELECT examplevol-01 fsgen
pl examplevol-01 examplevol ENABLED ACTIVE 117463296 STRIPE
3/128 RW
sd d01-01 examplevol-01 d01 0 39154432 0/0 c4t0d1 ENA
sd d02-01 examplevol-01 d02 0 39154432 1/0 c4t0d2 ENA
sd d03-01 examplevol-01 d03 0 39154432 2/0 c4t0d3 ENA

The above volume is a 3 column stripe volume. You can determine this by examining the plex line following STRIPE where you can see 3/128. This value is shown in COLUMNS/STRIPE_WIDTH format.

The disk group in this example contains the following devices:

dm d01 c4t0d1 auto 2048 60126464 -
dm d02 c4t0d2 auto 2048 60126464 -
dm d03 c4t0d3 auto 2048 60126464 -
dm d04 c4t0d4 auto 2048 60126464 -

Attempting to grow this volume using only the currently available devices will produce the following error:

# /etc/vx/bin/vxresize -g datadg examplevol +1g
VxVM vxassist ERROR V-5-1-436 Cannot allocate space to grow volume to 119560192 blocks
VxVM vxresize ERROR V-5-1-4703 Problem running vxassist command for volume examplevol, in diskgroup datadg

You can also predetermine how much space Volume Manage can extend your volume by using the following command:
# vxassist -g <dg> maxgrow <volume>

In this example, the following is the result:
# vxassist -g datadg maxgrow examplevol
VxVM vxassist ERROR V-5-1-1178 Volume examplevol cannot be extend within the given constraints

Because VM requires a unique device for each stripe, and there is only one device available for the three column volume, the grow operation cannot run. To resolve this issue you must add enough storage devices to satisfy the above constraints or use a re-layout operation to convert the volume's column count. For additional information on performing a relayout operation see the supplemental material below.

In the example, two additional devices have been added to the disk group:
dm d01 c4t0d0 auto 2048 60126464 -
dm d02 c4t0d1 auto 2048 60126464 -
dm d03 c4t0d2 auto 2048 60126464 -
dm d04 c4t0d3 auto 2048 60126464 -

dm d05 c4t0d4 auto 2048 60126464 -
dm d06 c4t0d5 auto 2048 60126464 -

And the resize operation completes without complaint:

# /etc/vx/bin/vxresize -g datadg examplevol +1g
# vxprint -htqg datadg examplevol

v examplevol - ENABLED ACTIVE 119560192 SELECT examplevol-01 fsgen
pl examplevol-01 examplevol ENABLED ACTIVE 119560320 STRIPE 3/128 RW
sd d01-01 examplevol-01 d01 0 39154432 0/0 c4t0d1 ENA
sd d04-01 examplevol-01 d04 0 699008 0/39154432 c4t0d4 ENA
sd d02-01 examplevol-01 d02 0 39154432 1/0 c4t0d2 ENA
sd d05-01 examplevol-01 d05 0 699008 1/39154432 c4t0d5 ENA
sd d03-01 examplevol-01 d03 0 39154432 2/0 c4t0d3 ENA
sd d06-01 examplevol-01 d06 0 699008 2/39154432 c4t0d6 ENA

How to Convert UFS to VXFS Filesystem

File System Conversion From UFS:

Using the relatively simple command vxfsconvert the user is able to convert a UFS file
system into a VxFS file system. The process takes about as long as an fsck run and it is not

harmful if the system crashes or faults in the meantime, i.e. the whole process is transactional.

How to Convert UFS File system to VXFS System
++++++++++++++++++++++++++++++++++++++++++++++
vxdg -g adg adddisk disk6=c1t8d0 cds=off
vxdg -g adg adddisk disk6=c1t8d0

bash-3.00# vxdisk list | grep -i adg
c1t6d0s2     auto:sliced     disk5        adg          online
c1t8d0s2     auto:sliced     disk6        adg          online
bash-3.00#

bash-3.00# vxassist -g adg maxsize
Maximum volume size: 33382400 (16300Mb)
bash-3.00# vxassist -g adg make avol 2g

bash-3.00# /usr/lib/fs/ufs/mkfs -F ufs /dev/vx/rdsk/adg/avol -o 2g
mkfs: bad numeric arg for nsect: "2g"
mkfs: nsect reset to default 32
mkfs: bad numeric arg for size: "-o"
mkfs: size reset to default 4194304
/dev/vx/rdsk/adg/avol:  4194304 sectors in 8192 cylinders of 16 tracks, 32 sectors
        2048.0MB in 512 cyl groups (16 c/g, 4.00MB/g, 1920 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 8256, 16480, 24704, 32928, 41152, 49376, 57600, 65824, 74048,
Initializing cylinder groups:
..........
super-block backups for last 10 cylinder groups at:
 4112608, 4120832, 4129056, 4137280, 4145504, 4153728, 4161952, 4170176,
 4178400, 4186624


bash-3.00# mkdir /avol

bash-3.00# mount /dev/vx/dsk/adg/avol /avol

bash-3.00# df -h /avol
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/adg/avol   1.9G   2.0M   1.7G     1%    /avol

bash-3.00# fstyp /dev/vx/dsk/adg/avol
ufs


bash-3.00# df -h /avol
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/adg/avol   1.9G   237M   1.5G    14%    /avol


bash-3.00# time /opt/VRTS/bin/vxfsconvert /dev/vx/rdsk/adg/avol
UX:vxfs vxfsconvert: INFO: V-3-21842: Do you wish to commit to conversion? (ynq) y
UX:vxfs vxfsconvert: INFO: V-3-21852:  CONVERSION WAS SUCCESSFUL

real    0m13.919s
user    0m0.070s
sys     0m0.296s

bash-3.00# fstyp /dev/vx/rdsk/adg/avol
vxfs


bash-3.00# fsck -F vxfs -y -o full /dev/vx/rdsk/adg/avol
super-block indicates that intent logging was disabled
cannot perform log replay
pass0 - checking structural files
pass1 - checking inode sanity and blocks
pass2 - checking directory linkage
pass3 - checking reference counts
pass4 - checking resource maps
fileset 1 au 0 imap incorrect - fix (ynq)y
fileset 999 au 0 imap incorrect - fix (ynq)y
no CUT entry for fileset 1, fix? (ynq)y
no CUT entry for fileset 999, fix? (ynq)y
au 0 emap incorrect - fix? (ynq)y
au 0 summary incorrect - fix? (ynq)y
au 1 emap incorrect - fix? (ynq)y
au 1 summary incorrect - fix? (ynq)y
au 2 emap incorrect - fix? (ynq)y
au 2 summary incorrect - fix? (ynq)y
au 3 emap incorrect - fix? (ynq)y
au 3 summary incorrect - fix? (ynq)y
au 4 emap incorrect - fix? (ynq)y
au 4 summary incorrect - fix? (ynq)y
au 5 emap incorrect - fix? (ynq)y
au 5 summary incorrect - fix? (ynq)y
au 6 emap incorrect - fix? (ynq)y
au 6 summary incorrect - fix? (ynq)y
au 7 emap incorrect - fix? (ynq)y
au 7 summary incorrect - fix? (ynq)y
au 8 emap incorrect - fix? (ynq)y
au 8 summary incorrect - fix? (ynq)y
au 9 emap incorrect - fix? (ynq)y
au 9 summary incorrect - fix? (ynq)y
au 10 emap incorrect - fix? (ynq)y
au 10 summary incorrect - fix? (ynq)y
au 11 emap incorrect - fix? (ynq)y
au 11 summary incorrect - fix? (ynq)y
au 12 emap incorrect - fix? (ynq)y
au 12 summary incorrect - fix? (ynq)y
au 13 emap incorrect - fix? (ynq)y
au 13 summary incorrect - fix? (ynq)y
au 14 emap incorrect - fix? (ynq)y
au 14 summary incorrect - fix? (ynq)y
au 15 emap incorrect - fix? (ynq)y
au 15 summary incorrect - fix? (ynq)y
au 16 emap incorrect - fix? (ynq)y
au 16 summary incorrect - fix? (ynq)y
au 17 emap incorrect - fix? (ynq)y
au 17 summary incorrect - fix? (ynq)y
au 18 emap incorrect - fix? (ynq)y
au 18 summary incorrect - fix? (ynq)y
au 19 emap incorrect - fix? (ynq)y
au 19 summary incorrect - fix? (ynq)y
au 20 emap incorrect - fix? (ynq)y
au 20 summary incorrect - fix? (ynq)y
au 21 emap incorrect - fix? (ynq)y
au 21 summary incorrect - fix? (ynq)y
au 22 emap incorrect - fix? (ynq)y
au 22 summary incorrect - fix? (ynq)y
au 23 emap incorrect - fix? (ynq)y
au 23 summary incorrect - fix? (ynq)y
au 24 emap incorrect - fix? (ynq)y
au 24 summary incorrect - fix? (ynq)y
au 25 emap incorrect - fix? (ynq)y
au 25 summary incorrect - fix? (ynq)y
au 26 emap incorrect - fix? (ynq)y
au 26 summary incorrect - fix? (ynq)y
au 27 emap incorrect - fix? (ynq)y
au 27 summary incorrect - fix? (ynq)y
au 28 emap incorrect - fix? (ynq)y
au 28 summary incorrect - fix? (ynq)y
au 29 emap incorrect - fix? (ynq)y
au 29 summary incorrect - fix? (ynq)y
au 30 emap incorrect - fix? (ynq)y
au 30 summary incorrect - fix? (ynq)y
au 31 emap incorrect - fix? (ynq)y
au 31 summary incorrect - fix? (ynq)y
au 32 emap incorrect - fix? (ynq)y
au 32 summary incorrect - fix? (ynq)y
au 33 emap incorrect - fix? (ynq)y
au 33 summary incorrect - fix? (ynq)y
au 34 emap incorrect - fix? (ynq)y
au 34 summary incorrect - fix? (ynq)y
au 35 emap incorrect - fix? (ynq)y
au 35 summary incorrect - fix? (ynq)y
au 36 emap incorrect - fix? (ynq)y
au 36 summary incorrect - fix? (ynq)y
au 37 emap incorrect - fix? (ynq)y
au 37 summary incorrect - fix? (ynq)y
au 38 emap incorrect - fix? (ynq)y
au 38 summary incorrect - fix? (ynq)y
au 39 emap incorrect - fix? (ynq)y
au 39 summary incorrect - fix? (ynq)y
au 40 emap incorrect - fix? (ynq)y
au 40 summary incorrect - fix? (ynq)y
au 41 emap incorrect - fix? (ynq)y
au 41 summary incorrect - fix? (ynq)y
au 42 emap incorrect - fix? (ynq)y
au 42 summary incorrect - fix? (ynq)y
au 43 emap incorrect - fix? (ynq)y
au 43 summary incorrect - fix? (ynq)y
au 44 emap incorrect - fix? (ynq)y
au 44 summary incorrect - fix? (ynq)y
au 45 emap incorrect - fix? (ynq)y
au 45 summary incorrect - fix? (ynq)y
au 46 emap incorrect - fix? (ynq)y
au 46 summary incorrect - fix? (ynq)y
au 47 emap incorrect - fix? (ynq)y
au 47 summary incorrect - fix? (ynq)y
au 48 emap incorrect - fix? (ynq)y
au 48 summary incorrect - fix? (ynq)y
au 49 emap incorrect - fix? (ynq)y
au 49 summary incorrect - fix? (ynq)y
au 50 emap incorrect - fix? (ynq)y
au 50 summary incorrect - fix? (ynq)y
au 51 emap incorrect - fix? (ynq)y
au 51 summary incorrect - fix? (ynq)y
au 52 emap incorrect - fix? (ynq)y
au 52 summary incorrect - fix? (ynq)y
au 53 emap incorrect - fix? (ynq)y
au 53 summary incorrect - fix? (ynq)y
au 54 emap incorrect - fix? (ynq)y
au 54 summary incorrect - fix? (ynq)y
au 55 emap incorrect - fix? (ynq)y
au 55 summary incorrect - fix? (ynq)y
au 56 emap incorrect - fix? (ynq)y
au 56 summary incorrect - fix? (ynq)y
au 57 emap incorrect - fix? (ynq)y
au 57 summary incorrect - fix? (ynq)y
au 58 emap incorrect - fix? (ynq)y
au 58 summary incorrect - fix? (ynq)y
au 59 emap incorrect - fix? (ynq)y
au 59 summary incorrect - fix? (ynq)y
au 60 emap incorrect - fix? (ynq)y
au 60 summary incorrect - fix? (ynq)y
au 61 emap incorrect - fix? (ynq)y
au 61 summary incorrect - fix? (ynq)y
au 62 emap incorrect - fix? (ynq)y
au 62 summary incorrect - fix? (ynq)y
au 63 emap incorrect - fix? (ynq)y
au 63 summary incorrect - fix? (ynq)y
fileset 1 iau 0 summary incorrect - fix? (ynq)y
fileset 999 iau 0 summary incorrect - fix? (ynq)y
free block count incorrect 0 expected 1481731 fix? (ynq)y
free extent vector incorrect fix? (ynq)y
OK to clear log? (ynq)y
flush fileset headers? (ynq)y
set state to CLEAN? (ynq)y
bash-3.00# mount -F vxfs /dev/vx/dsk/adg/avol /avol


bash-3.00# df -h /avol
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/adg/avol   2.0G   601M   1.3G    31%    /avol

bash-3.00# cd /avol
bash-3.00# ls -ltra
total 1227628
-rw-r--r--   1 joshua   sysadmin 18237552 Oct 23  2012 Firefox Setup 16.0.1.exe
-rw-r--r--   1 joshua   sysadmin 78545304 Oct 24  2012 iTunesSetup.exe
-rw-r--r--   1 joshua   sysadmin 531705856 Aug 10 20:09 openfileresa-2.99.1-x86_64-disc1.iso
drwxrwxrwx   2 root     root       12288 Dec 27 12:06 lost+found
drwxr-xr-x  33 root     root        1024 Dec 27 12:13 ..
drwxrwxrwx   3 root     root        1024 Dec 27 12:18 .