系统管理指南:设备和文件系统

使用 prtvtocfmthard 命令标记多个磁盘

使用 prtvtocfmthard 命令标记具有相同磁盘几何参数的多个磁盘。

在脚本中使用以下 for 循环,从一个磁盘复制磁盘标号,然后在多个磁盘上复制它。


# for i in x y z

> do

> prtvtoc /dev/rdsk/cwtxdysz | fmthard -s - /dev/rdsk/cwt${i}d0s2

> done

示例 12–9 标记多个磁盘

在此示例中,将来自 c2t0d0s0 的磁盘标号复制到其他四个磁盘。


# for i in 1 2 3 5

> do

> prtvtoc /dev/rdsk/c2t0d0s0 | fmthard -s - /dev/rdsk/c2t${i}d0s2

> done

fmthard:  New volume table of contents now in place.

fmthard:  New volume table of contents now in place.

fmthard:  New volume table of contents now in place.

fmthard:  New volume table of contents now in place.

#