prtvtoc and fmthard 到底是干什么用的?
Label Multiple Disks by Using the prtvtoc and fmthard CommandsUse the prtvtoc and fmthard commands to label multiple disks with the same disk geometry.
Use this for loop in a script to copy a disk label from one disk and replicate it on multiple disks.
# for i in x y z
> do
> prtvtoc /dev/rdsk/cwtxdysz | fmthard -s - /dev/rdsk/cwt${i}d0s2
> done
上面的 ix y z 表示什么意思?
我想让我的两块盘c0t0d0c0t1d0 有相同的disk geometry 该写什么呢?对sol实在是不熟悉 # prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
c0t0d0为源,
用一条命令就可以
#prtvtoc /dev/rdsk/c0t0d0s2(原盘) | mfthard -s - /dev/rdsk/c0t1d0s2(目标盘) http://docs.sun.com/app/docs/doc/805-7228/6j6q7uetj?q=customizing&a=view我是按照上面这个网址作的,但是我想知道那个for i in x y z
这是在干嘛呢? 将目标盘和源盘的分区表复制为一致. x,y,z 分别代表一个raw disk
prtvtoc是读分区表
mfthard是写分区表
for i in x y z 是循环
这里还有其他的shell用法,如管道(|)和输入(-)
页:
[1]