Hi,everybody. I am Yao Lu,from Chongqing,China. This is my first article in blog.sun.com. I want to show you some little demo about Solaris Dtrace,Zone,ZFS. If you are a beginner for Solaris,it is useful for you. You can use these simple demos to experience the new feature of Solaris.
Zone:
Zones provide a new isolation primitive for the Solaris OS, which is secure, flexible, scalable and lightweight: virtualized OS services which look like different Solaris instances.
bash-3.00# zonecfg -z test-zone
zonecfg:test-zone> create
zonecfg:test-zone>set zonepath=/export/home/test-zone
zonecfg:test-zone> add net
zonecfg:test-zone:net> set physical=bge0
zonecfg:test-zone:net> set address=129.158.163.232
zonecfg:test-zone:net> end
zonecfg:test-zone> verify
zonecfg:test-zone> commit
zonecfg:test-zone> exit
bash-3.00# zonecfg -z test-zone info
zoneadm -z test-zone install
bash-3.00# zoneadm list -cv
bash-3.00# zoneadm -z test-zone boot
bash-3.00# zoneadm list -cv
bash-3.00# zlogin test-zone
bash-3.00# ifconfig -a
ZFS:
The Solaris ZFS offers a dramatic advance in data management with an innovative approach to data integrity, tremendous performance improvements, and a welcome integration of file system and volume management capabilities.
mkfile –n
mkfile –n
mkfile –n
mkfile –n
mkfile –n
zpool create pool raidz /file1 /file2 /file3 /file4 /file5
zfs create pool/first
zpool list
SUN University Tech Day Demo(Chengdu,China) :
In addition,I have taken part in Sun University Tech Day in Chengdu,China,2007. The speaker,Alex Peng,shows us a demo about ZFS.He made a zpool by using some U disks,and he copied a xxx.mp3 into the zpool. The XXX.mp3 has been played. Then he demounted the U disks one by one until only one U disk was in the zpool,But the music could be still playing.
Demo:
rmformat (display U disk id, for example,c0t0d0,c0t0d1……)
zpool create –f upool raidz cxtxdx……….
ls –l /upool
cp /desktop/xxx.mp3 /upool/
realplay/upool/xxx.mp3 &
Dtrace:
DTrace is a comprehensive dynamic tracing framework for the Solaris™ Operating Environment. DTrace provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.
Make a file ,and filename is ‘hello.d’
BEGIN
{
trace(“hello,SUN”);
exit(0);
}
DTrace –s hello.d
DTrace –l
DTrace –l|wc -l
Yao Lu
e-mail:luyaochrist@163.com
Thank you very much!