首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

IBM AFS 副分区虚拟化-2

IBM AFS 副分区虚拟化-2

将分区从测试服务器 pghafs03.rchland.ibm.com 移动到 pghafs02.rchland.ibm.com 的步骤示例      当前 pghafs03 上安装有 6 个副分区(/vicepa 到 /vicepf)。        
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@pghafs03] > mount
node       mounted        mounted over    vfs       date        options
-------- ---------------  ---------------  ------ ------------ ---------------
          /dev/hd4         /                jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/hd2         /usr             jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/hd9var      /var             jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/hd3         /tmp             jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/hd1         /home            jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/hd11admin   /admin           jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /proc            /proc            procfs Mar 11 08:15 rw
          /dev/hd10opt     /opt             jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/livedump    /var/adm/ras/livedump jfs2 Mar 11 08:15 rw,log=/dev/hd8
          /dev/lvvarlog    /var/log         jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/lvafslogs   /usr/afs/logs    jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/lvscm       /opt/IBM/SCM     jfs2   Mar 11 08:15 rw,log=/dev/hd8
          /dev/ramdisk0    /usr/vice/cache  jfs    Mar 11 08:15 rw,nointegrity
          AFS              /afs             afs    Mar 11 08:17 rw
          /dev/fslv00      /testvg          jfs    Mar 19 08:30 rw,log=/dev/loglv06
          /dev/lv01        /vicepa          jfs    May 24 00:47 rw,log=/dev/loglv01
          /dev/lv02        /vicepb          jfs    May 24 00:47 rw,log=/dev/loglv02
          /dev/lv03        /vicepc          jfs    May 24 00:47 rw,log=/dev/loglv03
          /dev/lv04        /vicepd          jfs    May 24 00:47 rw,log=/dev/loglv04
          /dev/lv05        /vicepe          jfs    May 24 00:47 rw,log=/dev/loglv05
          /dev/lv00        /vicepf          jfs    May 24 00:47 rw,log=/dev/loglv00
          [root@pghafs03] >




  • 向文件服务器发送一个 SIGUSR1,将 pghafs03 手动标记为 VBUSY。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    [root@pghafs03] > ps -ef | grep server
    root  7274520  8781978   0   May 24      -  0:01
    /usr/afs/bin/volserver -log -p 16
    root  8781978        1   0   Mar 12      -  0:06
    /usr/afs/bin/bosserve
    rroot 13041896  8781978   0   May 24      -  0:04
    /usr/afs/bin/fileserver -hr 24 -L -m 1 -cb 128000 -rxpck
    2500 -p 256 -udpsize 1048576 -implicit rl -nojumbo
    -seclog -vc 1200 -s 1800 -l 1200 -b 180
    [root@pghafs03] > kill -SIGUSR1 13041896
    [root@pghafs03] >

    FileLog:Mon May 27 00:56:23 2013 Marked fileserver as VBUSY for partition movement

    Clients start getting VBUSY message.
    afs: Waiting for busy volume 536894431 (indira.e.1) in
    cell test36.transarc.com
    afs: Waiting for busy volume 536894431 (indira.e.1) in
    cell test36.transarc.com




  • 运行 vos detachpart -fromserver fileserver1 -partition          all -cell punetest 命令,从 pghafs03 分离分区。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    [root@pghafs03] > vos detachpart -fromserver pghafs03
    -partition all -c test36
    vos detachpart: Parsing all partitions...
    vos detachpart: Detaching all partitions from server
    pghafs03...please check logs for successful completion
    [root@pghafs03] >
    All volumes will be marked as offline.
    [root@pghafs03] > vos exam 536892892 -c  test36
    atd.virt.f.691 536892892 RW 2
    K Off-line
    pghafs03.rchland.ibm.com /vicepf
    RWrite 536892892   ROnly 0 Backup 0
    MaxQuota 100000 K
    Creation    Tue Mar 19 10:43:01 2013
    Last Update Tue Mar 19 10:48:38 2013
    Last Access Tue Apr 9 06:53:54  2013
    0 accesses in the past day (i.e., vnode references)
    RWrite: 536892892
    number of sites -> 1
    server pghafs03.rchland.ibm.com partition /vicepf RW Site
    [root@pghafs03] >
    FileLog:Mon May 27 00:56:36 2013
    vos detachpart : Making all
    volumes offline...
    Mon May 27 00:56:36 2013 VShutdown:shutting down on-
    line volumes...
    Mon May 27 00:56:36 2013 VShutdown: complete.
    Mon May 27 00:56:36 2013 vos detachpart : Made all
    volumes offline...




  • 从 pghafs03 卸载所有 SAN 副分区。
    • 运行脚本,从 pghafs03 卸载副分区。
    • 确保从 pghafs03 卸载了所有副分区。
  • 在 pghafs02 上安装所有 SAN 副分区。
    • 运行脚本,安装 pghafs02 的副分区。
    • 确保在 pghafs02 上安装了所有副分区。
  • 在 pghafs02 上重启 fs  实例。
    1
    2
    3
    [root@pghafs03] > bos restart -server pghafs02 -instance
    fs -c test36
    [root@pghafs03] >




  • 运行 vos attachpart -fromserver fileserver1 -toserver fileserver2 -partition all -cell punetest  命令,将分区连接到 pghafs02。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    [root@pghafs03] > vos attachpart -fromserver pghafs03
    -toserver pghafs02 -partition all -c test36
    vos attachpart: Parsing all partitions...
    vos attachpart: Attached all partitions to server
    pghafs02 from server pghafs03... please check logs for
    successful completion
    [root@pghafs03]>
    FileLog:
    Mon May 27 01:00:45 2013 vos attachpart : breaking all
    callbacks for each and every volumes...
    Mon May 27 01:00:45 2013 VBreakAllCallBack_r: breaking
    callback on all volumes...
    Mon May 27 01:00:45 2013 VBreakAllCallBack_r: complete.
    Mon May 27 01:00:45 2013 vos attachpart : after breaking
    all callbacks for each and every volumes...




  • 向文件服务器发送一个 SIGUSR2,取消 pghafs03 的 VBUSY 标记。            
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    [root@pghafs03] > ps -ef |grep server
    root 7274520 8781978 0 May 24 - 0:02
    /usr/afs/bin/volserver -log -p 16
    root 8781978       1 0 Mar 12 - 0:06
    /usr/afs/bin/bosserver
    root 13041896 8781978 0 May 24 - 0:04
    /usr/afs/bin/fileserver -hr 24 -L -m 1 -cb 128000 -rxpck
    2500 -p 256 -udpsize 1048576 -implicit rl -nojumbo
    -seclog -vc 1200 -s 1800 -l 1200 -b 180
    [root@pghafs03] >kill -SIGUSR2 13041896
    [root@pghafs03] >

    FileLog:
    Mon May 27 01:01:32 2013 Unmarked fileserver from VBUSY
    as partition movement is done




  • 关闭 pghafs03 上的 fs  实例。
    1
    2
    3
    4
    5
    6
    [root@pghafs03] > bos shutdown -server
    pghafs03 -instance fs -c test36
    [root@pghafs03] > ps -ef| grep server
    root 8781978 1 0 Mar 12 - 0:06
    /usr/afs/bin/bosserver
    [root@pghafs03]>




错误恢复虽然这里要求在移动副分区期间不应发生任何 vos 动作,但是万一出现错误,那么可以通过以下办法进行恢复。   
需要进行恢复的点有很多。本节将了解其中一些恢复点。
案例 1
  • 案例        1:假设我们希望在运行步骤 2 后恢复此时 fileserver1 处于 busy            模式,所有卷被标记为脱机。要从这一点进行恢复,可以执行以下任一步骤:
    • 运行 bos restart fileserver1 -instance fs -cell punetest 命令。
    • 运行 vos attachpart -fromserver fileserver1 -toserver fileserver1 -partition all-cell punetest  命令,也就是说,将信号发送给接收方和发送方文件服务器是相同的,通过向 fileserver1 发送一个 SIGUSR2,取消对 fileserver1 的 busy 模式的标记。
    您可以执行以下任一步骤,将卷再次标记为在线。
  • 案例 2:假设我们希望在运行步骤 3 后执行恢复 此时 fileserver1 处于 busy 模式下,所有卷均脱机,我们已卸载了分区。要从这一点恢复,我们可以再次安装分区并执行  中提到的任意一个步骤。
  • 案例 3:假设我们希望在运行步骤 4 后执行恢复此时 fileserver1 处于 busy 模式下,所有卷均处于脱机状态,我们已从 fileserver1 卸载了分区,并挂载了 fileserver2 的分区。要从这一点恢复,可以执行以下任意步骤之一:从 fileserver2 卸载分区,将它们安装回 fileserver1,然后执行  中提到的两个步骤中的任意一个。或者,执行剩余的步骤(步骤 5 到步骤 8)。
    • 从 fileserver2 卸载分区,挂载回 fileserver1,执行  中提到的两个步骤中的任意一个。
    • 或者,执行剩余的步骤(步骤 5 到步骤 8)。
结束语 IBM AFS 的 SAN 存储虚拟化使得管理员能够监视有硬件问题或高负荷下运行的文件服务器的健康状况,然后非常轻松地在文件服务器之间迁移副分区,客户端任务不会受到影响,也不需要重启文件服务器。
返回列表