Sun Cluster 系统管理指南(适用于 Solaris OS)

示例 — 为镜像执行联机备份 (Solstice DiskSuite/Solaris Volume Manager)

在下面的示例中,群集节点 phys-schost-1 是元集 schost-1 的属主,所以备份过程是从 phys-schost-1 执行的。 镜像 /dev/md/schost-1/dsk/d0 是由子镜像 d10d20d30 组成的。


[确定元集的属主:]
# metaset -s schost-1
Set name = schost-1, Set number = 1
Host                Owner
  phys-schost-1     Yes 
...
[锁定文件系统的写操作:] 
# lockfs -w /global/schost-1
[列出子镜像:]
# metastat -s schost-1 -p
schost-1/d0 -m schost-1/d10 schost-1/d20 schost-1/d30 1
schost-1/d10 1 1 d4s0
schost-1/d20 1 1 d6s0
schost-1/d30 1 1 d8s0
[使子镜像脱机:]
# metadetach -s schost-1 d0 d30
[解除文件系统的锁定:]
# lockfs -u /
[检查文件系统:]
# fsck /dev/md/schost-1/rdsk/d30
[将子镜像复制到备份设备中:]
# ufsdump 0ucf /dev/rmt/0 /dev/md/schost-1/rdsk/d30
  DUMP: Writing 63 Kilobyte records
  DUMP: Date of this level 0 dump: Tue Apr 25 16:15:51 2000
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/md/schost-1/rdsk/d30 to /dev/rdsk/c1t9d0s0.
  ...
  DUMP: DUMP IS DONE
[使子镜像重新联机:]
# metattach -s schost-1 d0 d30
schost-1/d0: submirror schost-1/d30 is attached
[使子镜像重新同步:]
# metastat -s schost-1 d0
schost-1/d0: Mirror
    Submirror 0: schost-0/d10
      State: Okay         
    Submirror 1: schost-0/d20
      State: Okay
    Submirror 2: schost-0/d30
      State: Resyncing
    Resync in progress: 42% done
    Pass: 1
    Read option: roundrobin (default)
...