Chinaunix首页 | 论坛 | 博客
  • 博客访问: 55783
  • 博文数量: 21
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-11 08:40
个人简介

努力过着轻松日子的苦逼IT工程师……

文章分类

全部博文(21)

文章存档

2013年(21)

我的朋友

分类: LINUX

2013-09-03 10:02:06

Problem



How to migrate data off an old array onto a new array without changing disk group or volume names

Solution



Moving data from "oldarray" to "newarray"

1.  Connect the newarray to the Sun server.

2.  Verify that Solaris and VERITAS can see the disks in newarray. You can use 'vxdisk list' to see the disks in VERITAS, they should be listed in "error" at this time.  (Figure 1)

Figure 1    
dali:/root # vxdisk list
DEVICE       TYPE      DISK         GROUP        STATUS
c0t0d0s2     sliced    rootdisk     rootdg       online
c1t3d0s2     sliced    disk01       testdg       online
c1t4d0s2     sliced    disk02       testdg       online
c1t6d0s2     sliced    disk03       testdg       online
c2t3d0s2     sliced     -              -         error
c2t4d0s2     sliced     -              -         error
c2t5d0s2     sliced     -              -         error

3.  Determine amount of disk space needed for each disk group using 'vxprint -ht'  (Figure 2)

Figure 2
dg testdg       default      default  124000   1041977977.1239.dali

dm disk01       c1t3d0s2     sliced   4763     35830250 -
dm disk02       c1t4d0s2     sliced   4763     35830250 -
dm disk03       c1t5d0s2     sliced   4763     35830250 -

v  vol01        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk01-01    vol01-01     disk01   0        205820   0         c1t3d0   ENA

v  vol02        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol02-01     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk02-01    vol02-01     disk02   0        205820   0         c1t4d0s2 ENA

v  vol03        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol03-01     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk03-01    vol03-01     disk03   0        205820   0         c1t5d0   ENA

The test output shows that each volume is 100 mg.  So a total of 300 mg of disk space is needed from the new array.

3.1 Do vxdisksetup for disks which you need to get under VXVM control from new disk array.
   
        # vxdisksetup -i

4.  Add the necessary amount of disks from the newarray to each disk group as determined by step 3

vxdg -g adddisk =

Repeat this step until all the disks are added to the disk group.

          vxdg -g testdg adddisk disk04=c2t3d0
          vxdg -g testdg adddisk disk05=c2t4d0

5.  Mirror the oldarray plexes against the newarray disks so there is now a plex made up of disks from the newarray  (Figure 3)

vxassist -g mirror alloc=,

          vxassist -g testdg mirror vol01 alloc=disk04
          vxassist -g testdg mirror vol02 alloc=disk04
          vxassist -g testdg mirror vol03 alloc=disk04,disk05

Figure 3
dg testdg       default      default  124000   1041977977.1239.dali

dm disk01       c1t3d0s2     sliced   4763     35830250 -
dm disk02       c1t4d0s2     sliced   4763     35830250 -
dm disk03       c1t5d0s2     sliced   4763     35830250 -
dm disk04       c2t3d0s2     sliced   4763     35830250 -
dm disk05       c2t4d0s2     sliced   4763     35830250 -

v  vol01        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk01-01    vol01-01     disk01   0        205820   0         c1t3d0   ENA
pl vol01-02     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-01    vol01-01     disk04   0        205820   0         c2t3d0   ENA

v  vol02        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol02-01     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk02-01    vol02-01     disk02   0        205820   0         c1t4d0s2 ENA
pl vol02-02     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-02    vol02-02     disk04   205820   205820   0         c2t3d0   ENA

v  vol03        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol03-01     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk03-01    vol03-01     disk03   0        205820   0         c1t5d0   ENA
pl vol03-02     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-03    vol03-02     disk04   411640   102910   0         c2t3d0   ENA
sd disk05-01    vol03-02     disk05   0        102910   0         c2t4d0   ENA



6.  Break off the oldarray plexes

  vxplex -g dis  (Figure 4)


vxplex -g testdg dis vol01-01
vxplex -g testdg dis vol02-01
vxplex -g testdg dis vol03-01
 


Figure 4
dg testdg       default      default  124000   1041977977.1239.dali

dm disk01       c1t3d0s2     sliced   4763     35830250 -
dm disk02       c1t4d0s2     sliced   4763     35830250 -
dm disk03       c1t5d0s2     sliced   4763     35830250 -
dm disk04       c2t3d0s2     sliced   4763     35830250 -
dm disk05       c2t4d0s2     sliced   4763     35830250 -

pl vol01-01     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk01-01    vol01-01     disk01   0        205820   0         c1t3d0   ENA

pl vol02-01     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk02-01    vol02-01     disk02   0        205820   0         c1t4d0s2 ENA

pl vol03-01     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk03-01    vol03-01     disk03   0        205820   0         c1t5d0   ENA

v  vol01        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol01-02     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-01    vol01-01     disk04   0        205820   0         c2t3d0   ENA

v  vol02        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol02-02     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-02    vol02-02     disk04   205820   205820   0         c2t3d0   ENA

v  vol03        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol03-02     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-03    vol03-02     disk04   411640   102910   0         c2t3d0   ENA
sd disk05-01    vol03-02     disk05   0        102910   0         c2t4d0   ENA

7.  Verify you broke off the plexes that contain the oldarray disks by using vxprint -ht.  If you are not satisfied with the new array, you will be able to reattach the plex.

8.  When you are confident that the new array is stable,  remove the disassociated plexes.  

********WARNING:  THE VXEDIT COMMAND IS DESTRUCTIVE.  IT IS NOT REVERSABLE.  IF YOU ARE NOT COMFORTABLE WITH THIS STEP, PLEASE CALL VERITAS TECHNICAL SERVICES TO HELP YOU WITH THE PROCESS********

  vxedit -g -rf rm  (Figure 5)

vxedit -g testdg -rf rm vol01-01
vxedit -g testdg -rf rm vol02-01
vxedit -g testdg -rf rm vol03-01

Figure 5
dg testdg       default      default  124000   1041977977.1239.dali

dm disk01       c1t3d0s2     sliced   4763     35830250 -
dm disk02       c1t4d0s2     sliced   4763     35830250 -
dm disk03       c1t5d0s2     sliced   4763     35830250 -
dm disk04       c2t3d0s2     sliced   4763     35830250 -
dm disk05       c2t4d0s2     sliced   4763     35830250 -

v  vol01        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol01-02     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-01    vol01-01     disk04   0        205820   0         c2t3d0   ENA

v  vol02        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol02-02     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-02    vol02-02     disk04   205820   205820   0         c2t3d0   ENA

v  vol03        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol03-02     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk04-03    vol03-02     disk04   411640   102910   0         c2t3d0   ENA
sd disk05-01    vol03-02     disk05   0        102910   0         c2t4d0   ENA

9.  Then remove the disks from the old array so that the old array can be disconnected
vxdg -g rmdisk
vxdg -g testdg rmdisk disk01
vxdg -g testdg rmdisk disk02
vxdg -g testdg rmdisk disk03
10.  Power the server off to remove the old array.
11.  Boot it back up with a reconfigure reboot to clean up the device tree.
12.  Finally, as an option, clean up the vxprint by renaming each of the plexes, disks and subdisks so it looks like your original vxprint
vxedit -g rename
Rename the plex:
vxedit -g testdg rename vol01-02 vol01-01
vxedit -g testdg rename vol02-02 vol02-01
vxedit -g testdg rename vol03-02 vol03-01

Rename the disk:

vxedit -g testdg rename disk04 disk01
vxedit -g testdg rename disk05 disk02

Rename the subdisks:

vxedit -g testdg rename disk04-01 disk01-01
vxedit -g testdg rename disk04-02 disk01-02
vxedit -g testdg rename disk04-03 disk01-03
vxedit -g testdg rename disk05-01 disk02-01

13.  Then you can do a vxprint -ht to compare it to your first vxprint. The only difference should be the c#t#d# in sd column 8 that are now on the new array. (Figure 6)

Figure 6
dg testdg       default      default  124000   1041977977.1239.dali

dm disk01       c2t3d0s2     sliced   4763     35830250 -
dm disk02       c2t4d0s2     sliced   4763     35830250 -

v  vol01        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk01-01    vol01-01     disk01   0        205820   0         c2t3d0   ENA

v  vol02        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol02-01     vol02        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk01-02    vol02-02     disk01   205820   205820   0         c2t3d0   ENA

v  vol03        -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol03-01     vol03        ENABLED  ACTIVE   205820   CONCAT    -        RW
sd disk01-03    vol03-02     disk01   411640   102910   0         c2t3d0   ENA
sd disk02-01    vol03-02     disk02   0        102910   0         c2t4d0   ENA



Legacy ID



253527


Article URL


阅读(447) | 评论(0) | 转发(0) |
0

上一篇:"Failing" status is reported for a disk in VXVM

下一篇:没有了

给主人留下些什么吧!~~