昨天下班前在捣鼓关于如何使用更好的zone更快捷和方面,从目前已知的角度而言在
按照这个设置,只需要稍微改下里面的系统文件在run一下zonecfg -z 123 -f cnnjx026z011.conf 就能产生一个新的zone,然后就能换能up and running了。免去了大量配置的麻烦。
--
Alex Tu
-----------------------------------------------------------
ShangHai,China
zoneadm -z test_zone export > test_zone.conf后会到出已经设置好的zone文件,那我们现在将这个文件导出之后,进行修改。
root@cnnjx026 # more cnnjx026z011.conf
create -b
set zonepath=/local/zones/cnnjx026z011
set autoboot=true
set ip-type=shared
add fs
set dir=/app
set special=/app
set type=lofs
add options rw
add options nodevices
end
add fs
set dir=/env
set special=/env
set type=lofs
add options rw
add options nodevices
end
add fs
set dir=/var/home
set special=/var/home
set type=lofs
add options rw
add options nodevices
end
add net
set address=147.128.38.11/24
set physical=nxge0
set defrouter=147.128.38.1
end
add rctl
set name=zone.max-swap
add value (priv=privileged,limit=2147483648,action=deny)
end
add attr
set name=machine
set type=string
set value=sun4v
end
add dedicated-cpu
set ncpus=1
end
add capped-memory
set physical=2G
end
捣鼓完批量安装后,是捣鼓备份。 最近有位同事被开了,主要还是备份的原因,做IT还是得好好备份天天向上啊。
用fssnap创建snapshot的时候出现错误
# fssnap -F ufs -o bs=/snaps/usr.back.file /usr snapshot error: Invalid backing file path |
根据sun网站上的说法是因为使用了大分区,而不是对各个文件实现单独的文件系统分区,所以单独的创建snapshot备份是不行了。 那就只能用ufsdump来备份了
ufsdump相对来说比较便利,但是需要我去手动停掉需要备份的空间,会有些不利。之后用ufsresore.
bash-3.00# ufsdump 0f /var/zone.ufsdump /opt/zone/zone
DUMP: Date of this level 0 dump: Wed Dec 23 11:27:20 2009
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rdsk/c1t0d0s0 (ecnshpcnserv:/) to /var/zone.ufsdump.
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Writing 32 Kilobyte records
DUMP: Estimated 6469068 blocks (3158.72MB).
DUMP: Dumping (Pass III) [directories]
DUMP: Dumping (Pass IV) [regular files]
DUMP: 6422974 blocks (3136.22MB) on 1 volume at 9635 KB/sec
DUMP: DUMP IS DONE
但是在ufsrestore的情况下就出现了点问题,主要是交互式的比较麻烦
bash-3.00# ufsrestore -xf /var/zone.ufsdump /opt/zone/zone
Warning: ./opt: File exists
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
set owner/mode for '.'? [yn] set owner/mode for '.'? [yn] y
Directories already exist, set modes anyway? [yn] y
首先是不能恢复到原目录,只能恢复到另外的目录,还需要在研究下
--
Alex Tu
-----------------------------------------------------------
ShangHai,China
评论