Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3205958
  • 博文数量: 443
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 5679
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-08 12:30
个人简介

欢迎加入IT云增值在线QQ交流群:342584734

文章分类

全部博文(443)

文章存档

2022年(1)

2021年(1)

2015年(2)

2014年(1)

2013年(1)

2012年(4)

2011年(19)

2010年(32)

2009年(2)

2008年(4)

2007年(31)

2006年(301)

2005年(42)

2004年(2)

分类:

2006-04-13 12:02:58

/etc/vx/bin/vxdisksetup -i c1t100d0
/etc/vx/bin/vxdisksetup -i c1t101d0
/etc/vx/bin/vxdisksetup -i c1t102d0
/etc/vx/bin/vxdisksetup -i c1t103d0
Initializes the physical devices c1t100d0 c1t101d0 c1t102d0 c1t103d0 as VM disks

vxdg init mydg c1t100d0s2 c1t101d0s2 c1t102d0s2 c1t103d0s2
creates a VM disk group containing the VM disks c1t100d0 c1t101d0 c1t102d0 c1t103d0

vxassist make martin 100m
makes a volume called martin using any disk

vxassist make martin 100m disk10
makes a volume called martin using disk10

vxassist make martin 100m layout=stripe disk07 disk08
creates a 100mb striped volume called martin using disks7 and 8

vxassist mirror martin disk05 disk06
uses disks5 and 6 ro make a mirror on volume called martin

vxassist make martin 50m layout=mirror
makes a 50Mb mirror using any 2 disks

vxassist make martin 50m layout=mirror disk05 disk06
makes a 50mb mirror using disks 5 and 6

vxassist make martin 50m layout=mirror,stripe disk05 disk06 disk07 disk08
makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8

vxassist make martin 50m layout=mirror,stripe,log disk05 disk06 disk07 disk08
makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8 and uses a 
log subdisk

vxassist make martin 100m layout=raid5
makes a 100m raid5 volume

vxdg list 
lists all diskgroups

vxdisk list
lists all disks under VM control and which group their in

vxdisk list disk01
lists the properties of disk01

vxprint -vt 
vxprint -l volume_name
vxprint -vl

display's info about the volumes

vxprint -lp
vxprint -l plex_name
displays info about plexes

vxprint -st
vxprint -l disk##-##
displays info about subdisks

ssaadm display -p c#
show disk iops over 10 seconds...

vxtrace vol
traces all i/o on a volume..

vxstat -d
to report disk stats

vxdg free
displays the free space on the disks

to list all volumes on your primary boot disk enter
vxprint -t -v -e 'aslist.aslist.sd_disk="boot_disk_name"'

vxassist maxgrow vol
tells you how much you can grow a volume by

vxdisk rm c#t#d#s2
to remove a disk so it's out of vm control

vxedit -rf rm martin
removes a volume called martin and plex(es) and subdisks though

To remove a volume (Version 3.X ONLY)
vxassist -g  remove volume 

To destroy an imported disk group (Version 3.X ONLY)
vxdg destroy 

/usr/sbin/vxedit -g rootdg rename disk12 disk09 
to rename disk12 to disk09 in the rootdg

vxedit rm disk10 
to remove a greyed out or obsolete disk in this case disk10
or to remove a disk from a diskgroup

vxdisk clearimport c#t#d#s#
to allow a disk to be imported after a server crash

vxdg -g razadg rmdisk test
to remove a disk called test from a dg called razadg

vxdg -g razadg adddisk test=c1t3d3  
to add disk c1t3d3 to a dg called razadg calling the disk test, use vxdisk list
to determine what disks are free :)

vxedit -g rootdg set spare=on disk09
sets disk09 in the rootdg as a hotspare.

vxmirror rootdisk disk01
mirrors all the volumes on the root disk to disk01

vxmirror -g datadg data01 data10
mirrors all the volumes in datadg on disk data01 to disk data10

vxassist -g rootdg mirror vol01 disk03
mirrors vol01 (in rootdg) to disk03


vxassist mirror martin

will mirror the volume martin


to make a mirror manually try

 /usr/sbin/vxmake -g rootdg sd disk03-01 dm_name=disk03 dm_offset=0 len=81920 
to create a subdisk on disk03 callin the subdisk disk03-01 the len 81920 is
81920sectors x 512bytes =40M 

vxmake plex martin-02 sd=disk03-01
creates a plex called martin-02 using subdisk disk03-01

vxplex att martin martin-02
attaches the plex martin-02 to volume martin

this shows how you how much you can grow a volume by..
vxassist maxgrow vol01
Volume vol01 can be extended by 18245632 to 18450432 (9009Mb)

vxassist growto martin 2000
grows a volume to 2000 512byte sectors

vxassist growby martin 2000
increases the volume martin by 2000 512byte sectors


vxassist shrinkto vol_name 1000
will shrink a volume by 1000 sectors,
make sure you don't shrink a volume below the current
size of the filesystem

vxassist shrinkby vol_name 1000
shrinks a volume by 1000 sectors

vxvol set len=100000 vol_name
will change the length to 100000 sectors
it cannot increase the volume unless spce is available in the
plexes (use vxassist)


vxsd -s SIZE split orignal_sd newdisk newdisk
this will split an existing subdisk in 2 of the specified SIZE

vxsd join sd1 sd2 new_sd
joins subdisk1 and subdisk1 to create a new subdisk

ssaadm -t 1|2|3 stop|start controller #
so start/stop disk trays...

vxrecover -s vol_name 
will start a volume

vxrecover -s
will start all volumes

vxvol maint vol_name
puts a volume in to maintenance mode

vxmend off plex_name
to offline a plex

vxplex att vol_name plex_name
attches and starts the plex in a volume

vxmend on plex_name
to start plex in volume

if the volume won't start up try
vxinfo volume_name 

vxedit set user=martin group=techies mode=0666 volume
sets the owner as martin the group as techies and the mode to rw-rw-rw
on a volume

vxvol rdpol round volume
sets a round robin read policy on a volume

vxvol rdpol prefer vol_name plex_anme
sets a prefered plex to read from.

vxedit set comment="message" disk01-01
sets the comment field to testing

vxedit set putil01="go away" vol01
sets the putil01 to "go away"

vxrecover -b vol
well bring stale plexes back online, -b indcates background job

vxassist move volume !disk10
move the voume to a disk other than disk10

vxmend fix clean plex_name
sets the plax toa clean state so you can start vol and access data

vxsd aslog vol01-01 disk02-01
adds a log disk (disk02-01) to the volume vol01-01

vxassist addlog volume_name
creates a log disk for a raid5 volume.

there are dome variables you can set for debugging

S_DEBUG - prints info when running mode sense command
P_DEDUG - prints info for each ext library function called
I_DEBUG prints progress during get status function
O_DEBUG prints when files are opened

vxsd mv disk03-01 disk05-01
moves the contents of subdisk disk03-01 to disk05-01
then moves  subdisk disk05-01 into the plex where subdisk disk03-01
once lived, leaving disk03-01 to your mercy :)


to make a subdisk

vxmake sd disk02-02 disk02,0,8000
this would create a subdisk called disk02-02 at the start of disk02
and would be 8000blocks (4000k) long.
if you wanted to create another subdisk on this disk the offset would be
8000 as this is where the next free space would be onthe disk so...
vxmake sd disk02-02 disk02,8000,8000 would create another 8000block
subdisk.



vxdiskadd c#t#d#
to add bring a new disk under vm control

or you can try...
vxdisksetup -i c#t#d#  

vxvol -g dg volname stop
this stops a volume


vxprint -ht volume
to display info a stripe looks like this..
V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE

v  martin       fsgen        ENABLED  ACTIVE   204800   SELECT    martin-01
pl martin-01    martin       ENABLED  ACTIVE   205776   STRIPE    4/128    RW
sd disk04-01    martin-01    disk04   0        51408    0/0       c1t1d2   ENA
sd disk05-01    martin-01    disk05   0        51408    1/0       c1t2d0   ENA
sd disk02-01    martin-01    disk02   0        51408    2/0       c1t3d0   ENA
sd disk03-01    martin-01    disk03   0        51408    3/0       c1t4d0   ENA

a mirror like this...

vxprint -ht martin
Disk group: rootdg

V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE

v  martin       fsgen        ENABLED  ACTIVE   204800   SELECT    martin-01
pl martin-01    martin       ENABLED  ACTIVE   205776   STRIPE    4/128    RW
sd disk04-01    martin-01    disk04   0        51408    0/0       c1t1d2   ENA
sd disk05-01    martin-01    disk05   0        51408    1/0       c1t2d0   ENA
sd disk02-01    martin-01    disk02   0        51408    2/0       c1t3d0   ENA
sd disk03-01    martin-01    disk03   0        51408    3/0       c1t4d0   ENA
pl martin-02    martin       ENABLED  TEMPRMSD 205632   CONCAT    -        WO
sd disk10-01    martin-02    disk10   0        205632   0         c1t1d3   ENA

a raid5 like this...

unix# vxprint -ht martin
Disk group: rootdg

V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE

v  martin       raid5        ENABLED  ACTIVE   40992    RAID      -
pl martin-01    martin       ENABLED  ACTIVE   42336    RAID      4/32     RW
sd disk04-01    martin-01    disk04   0        14112    0/0       c1t1d2   ENA
sd disk06-01    martin-01    disk06   0        14112    1/0       c1t1d4s2 ENA
sd disk05-01    martin-01    disk05   0        14112    2/0       c1t2d0   ENA
sd disk02-01    martin-01    disk02   0        14112    3/0       c1t3d0   ENA
pl martin-02    martin       ENABLED  LOG      2016     CONCAT    -        RW
sd disk03-01    martin-02    disk03   0        2016     0         c1t4d0   ENA


vxplex -o rm dis plex deletes a plex, or volume if used
with -f

vxplex det plex-0#
detach's one half of the plex..


if a volume is unstartable try

try to start it by  setting one of the plexes in a mirror to CLEAN using
vxmend mirror  plex_name

if this doesn't get the plex back into a kernel state of enabled
try

vxplex att vol_name plex_name

to dissociate a subdisk try
vxsd dis disk##-##

remove a subdisk by
vxedit rm disk##-##

this command show's you what the lagest stripe you 
can currently have ?
vxassist maxsize layout=stripe
Maximum volume size: 17833984 (8708Mb)

same again for raid5
vxassist maxsize layout=raid5
Maximum volume size: 12300288 (6006Mb)

To convert a mirrored-stripe to a striped-mirror
vxassist -g  convert  layout=stripe-mirror

To convert a striped-mirror to a mirrored-stripe
vxassist -g  convert  layout=mirror-stripe

To convert a striped mirror to a RAID 5.
vxassist -g  relayout  layout=raid5

To change the number of columns, in a RAID 5, to 5
vxassist -g  relayout  ncol=5

To list current tasks
vxtask list

To continue to display current tasks
vxtask monitor

To pause task 256
vxtask pause 256

To resume task 256
vxtask resume 256

To abort task 256
vxtask abort 256

To change the stripe unit size to 25K
vxassist -g  relayout  stwidth=25k

To continue a discontinued relayout operation (process must be stopped)
vxrelayout -g  start 

To reverse a discontinured relayout operstion (process must be stopped)
vxrelayout -g  reverse 

To get the status of a layout operation
vxrelayout -g  status 

To upgrade an older disk to support v3.x relayout operations
vxdg -t 60 upgrade 

阅读(3090) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~