just do it
分类: SOLARIS
2014-11-07 18:32:31
将卷停止:
# vxvol -g testgrp stop testvol
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
v testvol - DISABLED CLEAN 627048448 SELECT - fsgen
pl testvol-01 testvol DISABLED CLEAN 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
分离卷中plex:
# vxplex -g testgrp det testvol-01
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
v testvol - DISABLED CLEAN 627048448 SELECT - fsgen
pl testvol-01 testvol DETACHED STALE 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
offline卷中plex:
# vxmend -g testgrp off testvol-01
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
v testvol - DISABLED CLEAN 627048448 SELECT - fsgen
pl testvol-01 testvol DISABLED OFFLINE 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
将卷和plex分离:
# vxplex -g testgrp dis testvol-01
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
pl testvol-01 - DISABLED - 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
v testvol - DISABLED CLEAN 627048448 SELECT - fsgen
删除testvol卷:
# vxedit -g testgrp rm testvol
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
pl testvol-01 - DISABLED - 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
根据plex testvol-01重新创建卷testvol(fsgen类型):
# vxmake -g testgrp -U fsgen vol testvol plex=testvol-01
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
v testvol - DISABLED EMPTY 627048448 ROUND - fsgen
pl testvol-01 testvol DISABLED EMPTY 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
启动testvol卷:
# vxvol -g testgrp start testvol
# vxprint -g testgrp -hrt
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
dg testgrp default default 73000 1415352874.23.ts-db1
dm testgrp01 Disk_5 auto 16127 629080064 -
v testvol - ENABLED ACTIVE 627048448 ROUND - fsgen
pl testvol-01 testvol ENABLED ACTIVE 627048448 CONCAT - RW
sd testdg01-01 testvol-01 testgrp01 0 627048448 0 Disk_5 ENA
挂载卷
# mount -F vxfs /dev/vx/dsk/testgrp/testvol /test
卷中数据不会丢失
可以解决卷和plex大小不一致的问题