Monday, May 03, 2010
Wednesday, February 11, 2009
OpenSolaris Bible - Free Chapters
Labels: opensolaris, ZFS
Tuesday, February 10, 2009
Wednesday, January 28, 2009
Sun Tech Days 2009, Lab Instructions
Wednesday, October 15, 2008
The Ultimate ZFS Tutorial in Video
Wanna to learn more about ZFS, here are some useful links:
- ZFS Learning Centre
- ZFS at opensolaris.org
- ZFS Best Practice Guide
- ZFS Evil Tuning Guide
- ZFS in Bigadmin
- ZFS on desktop, will be available in opensolaris 2008.11
- My 2 cents
Labels: ZFS
Sunday, May 18, 2008
Sun Open Storage
The importance of OpenSolaris as a storage operating system has really emerged with the new and updated storage features, such as ZFS, NFS, pNFS, Shared QFS, Storage Archive Manager, Honeycomb fixed content management, Availability Suite, iSCSI, etc. OpenSolaris is now being embedded in storage appliances or used on hybrid server/storage devices to manage very large collections of data.
A White Paper: What is Open Storage describes the concept, cost saving and value proposition of having open standard for the storage software stack
(Click here to view image from original site). Sun claims that open storage architecture offers 90 percent less $/GB storage compared to a closed storage architecture.
With the advance features in hardware and softwware like: OpenSolaris, ZFS, Common Internet File System (CIFS) server, other storage projects and Sun Fire X4500 (a.k.a Thumper), it is not hard to envisage how all these pieces fit together to realise an open standard storage.
There is another article in Sun Developers Network describing how to Set Up an OpenSolaris Storage Server in 10 Minutes or Less. BTW, a new startup company, Nexenta Systems, has been developing open source based storage software solutions.
Also, a video featuring
Sun's Andy Bechtolsheim, Matt Baier, and
Jeff Bonwick join
John Fowler
to discuss advancements in Open Storage.
Labels: opensolaris, storage, ZFS
Friday, April 18, 2008
ZFS Rocks
Those interested to implement ZFS should read this ZFS Best Practice Guide. As for most of my implementations, I prefer to do it this way,
- use 2 disks (from different controller) to be mirrored with SVM (Solaris Volume Manager)
- the rest of the 46 disks in one zpool
- raidz (raid-5 equivalent) group of 6 disks across all the controllers
- strip across 7 raidz groups
- 4 disks as spare
- you will get 16TB usable space in a 24TB raw box
- weekly zfs scrub in crontab to examine all data and verify checksum
If you configure probably, you don't even have to open up the box to replace any hard disk for the life time of the Sun Fire X4500, hopefully.
Below videos will definitely show off ZFS:
ZFS is Smashing Baby
CSI:Munich
Thursday, May 10, 2007
ZFS Adaptive Replacement Cache (ARC) relinquishes memory
All servers' CPU/Memory/Disks/Network are monitored using SNMP. Something strange happens in the X4500 server 'cos the memory utilisation keep going up. Although the server has 16GB memory, it is definitely not a good sign for a production server. This seems to indicate some form of memory leak in the system. However, we are not delopying any application except Samba which comes with Solaris 10 anyway. I don't think Samba or Solaris itself has some serious memory leaking issue, so where does the memory go ?
After some searching in the Internet, I found the answer to the problem. ZFS Best Practices Guide explained that "The ZFS adaptive replacement cache (ARC) tries to use most of a system's available memory to cache file system data. The default is to use all of physical memory except 1 Gbyte. As memory pressure increases, the ARC relinquishes memory.". So, how true is this ? Let's find out.
I am lucky to have an identical X4500 for testing to verify that the Solaris kernel indeed do free up memory. I wrote a script to create a 200MB file (dd if=/dev/urandom of=/zfs/`perl -e 'print time()'` bs=1024 count=204800 > /dev/null 2>&1) in the ZFS file systems and run that for every minute as a cron job. SAR (system activity reporter) is enabled and configured to collect SAR info every 5 minutes.
sar -r of the freemem (average pages available to user processes) is plotted using Gnuplot. BTW, the size of a page in Solaris 10 x86 is 4096 (run pagesize to get the system page size). As you can see, it relinquishes memory when it is about 2GB freemem.
If we continue to run the test for hours, the freemem looks like this. BTW, the CPU utilisation is about 5% (0% usr, 5% sys) throughout.
Tuesday, April 03, 2007
ZFS with history
Below is the output of the zpool history for my previous blog
# zpool history zpool History for 'zpool': 2007-03-27.14:46:10 zpool create zpool raidz2 /zdisk/z01 /zdisk/z02 /zdisk/z03 /zdisk/z04 /zdisk/z05 /zdisk/z06 raidz2 /zdisk/z07 /zdisk/z08 /zdisk/z09 /zdisk/z10 /zdisk/z11 /zdisk/z12 raidz2 /zdisk/z13 /zdisk/z14 /zdisk/z15 /zdisk/z16 /zdisk/z17 /zdisk/z18 spare /zdisk/z19 /zdisk/z20 2007-03-27.14:47:06 zfs create zpool/zfs_iscsi 2007-03-27.14:47:21 zfs create zpool/zone_brandz 2007-03-27.14:48:06 zfs set shareiscsi=on zpool/zfs_iscsi 2007-03-27.14:49:36 zfs set shareiscsi=off zpool/zfs_iscsi 2007-03-27.14:50:07 zfs create -V 20m zpool/zfs_iscsi/v20m 2007-03-27.14:50:31 zfs set shareiscsi=on zpool/zfs_iscsi/v20m 2007-03-27.15:17:20 zfs destroy -f zpool/zfs_iscsi/v20m 2007-03-27.15:18:45 zfs create -V 20m zpool/zfs_iscsi/vol20m 2007-03-27.15:19:03 zfs set shareiscsi=on zpool/zfs_iscsi/vol20m 2007-03-27.16:05:09 zfs set volsize=100m zpool/zfs_iscsi/vol20m 2007-03-27.16:05:23 zfs set reservation=100m zpool/zfs_iscsi/vol20m 2007-03-27.16:25:17 zfs create zpool/zfs_samba 2007-03-27.16:55:31 zfs rename zpool/zfs_iscsi/vol20m zpool/zfs_iscsi/vol100m 2007-03-27.17:51:24 zpool scrub zpool 2007-03-27.17:53:23 zpool replace zpool /zdisk/z18 /zdisk/z18new 2007-03-28.11:31:24 zpool scrub zpool
IMO, it is a very nice feature 'cos it captures the life cycle of the ZFS pool (almost). It would be even better if this information is written to the OS so that it can really cover the whole life cycle, including the 'zpool destroy'.
Thursday, March 29, 2007
Solaris Express (Build 59), iSCSI vs Samba
I understand that you need to create volume from the ZFS pool, see zfs(1M) man page for details.
Here are the commands, with 100MB volume created
# cd /zdisk
# for i in z{0,1}{1,2,3,4,5,6,7,8,9} z20
do
mkfile 100m $i
done
# zpool create zpool \
raidz2 /zdisk/z0{1,2,3,4,5,6} \
raidz2 /zdisk/z0{7,8,9} /zdisk/z1{0,1,2} \
raidz2 /zdisk/z1{3,4,5,6,7,8} \
spare /zdisk/z19 /zdisk/z20
:
: iSCIS setup
:
# zfs create zpool/zfs_iscsi
# zfs create -V 100m zpool/zfs_iscsi/v100m
# zfs set shareiscsi=on zpool/zfs_iscsi/v100m
:
: samba setup
:
# zfs create zpool/zfs_samba
# chmod 777 /zpool/zfs_samba/
# cat /etc/sfw/smb.conf
[global]
netbios name = netra
server string = Netra T1 200
security = share
workgroup = WORKGROUP
load printers = No
interfaces = eri0
bind interfaces only = Yes
guest account = nobody
[NAS]
comment = NAS for Windows
path = /zpool/zfs_samba
writable = Yes
printable = No
browseable = No
create mode = 0640
directory mode = 0750
guest only = Yes
# svcadm enable samba
# iscsitadm list target
Target: zpool/zfs_iscsi/vol100m
iSCSI Name: iqn.1986-03.com.sun:02:e39429ef-4e77-486d-b48b-8bd8c8f05dfe
Connections: 0
In Windows you need to do the following:
- Iinstall ISCSI Initiator.
- After installation, you will see "iSCSI Initiator" in the Control Panel.
- Launch iSCSI Initiator, add "Target Portals" under the "Discovery" tab.
- You should be able to see an entry in the Volume/Mount Point/Device under the "Bound Volumes/Devices" tab.
- Go the "My Computer" and right-click to launch "Manage"
- In the "Computer Management", you can see your Disk under the "Disk Management".
- Go ahead to partition and format it.
- A Drive with 100MB
It took 10.6s to copy a 20MB from my Dell Latitude D510 notebook to the server using Samba. As for iSCSI, it tooks 2.6s only, 4 times better!!
Friday, March 23, 2007
ZFS on 48 Disks without X4500
So, how to simulate an environment with 48 disks using an old Sun Netra T1 105. My T1 configuration is:
- Memory: 256 MB
- Disk: 2x 18GB (all partitions are mirrored)
- CPU: 1x 440MHz UltraSPARC-IIi
- Patch: Recommended and Security Patch, Mar 12 2007, especially for these patches
- 124204 - zfs memory leak for large file
- 120068 - vulnerability in telnetd
Make 48 disks (files) with mkfile (1M)
# mkdir /zdisk
# cd /zdisk
# for i in c{0,1,2,3,4,5}t{0,1,2,3,4,5,6,7}d0
do
mkfile 100m $i
done
# ls /zdisk
c0t0d0 c0t5d0 c1t2d0 c1t7d0 c2t4d0 c3t1d0 c3t6d0 c4t3d0 c5t0d0 c5t5d0
c0t1d0 c0t6d0 c1t3d0 c2t0d0 c2t5d0 c3t2d0 c3t7d0 c4t4d0 c5t1d0 c5t6d0
c0t2d0 c0t7d0 c1t4d0 c2t1d0 c2t6d0 c3t3d0 c4t0d0 c4t5d0 c5t2d0 c5t7d0
c0t3d0 c1t0d0 c1t5d0 c2t2d0 c2t7d0 c3t4d0 c4t1d0 c4t6d0 c5t3d0
c0t4d0 c1t1d0 c1t6d0 c2t3d0 c3t0d0 c3t5d0 c4t2d0 c4t7d0 c5t4d0
Create a RAIDZ2 (double parity) with 7 sets of 6 HDDs RAIDZ2. You can see every RAIDZ2 group cuts across all the controllers, thanks to Joyeur blog
# zpool create zpool \
raidz2 /zdisk/c{0,1,2,3,4,5}t0d0 \
raidz2 /zdisk/c{0,1,2,3,4,5}t1d0 \
raidz2 /zdisk/c{0,1,2,3,4,5}t2d0 \
raidz2 /zdisk/c{0,1,2,3,4,5}t3d0 \
raidz2 /zdisk/c{0,1,2,3,4,5}t4d0 \
raidz2 /zdisk/c{0,1,2,3,4,5}t5d0 \
raidz2 /zdisk/c{0,1,2,3,4,5}t6d0 \
spare /zdisk/c{0,1,2,3,4,5}t7d0
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
zpool 3.91G 288K 3.91G 0% ONLINE -
# zpool status
pool: zpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
zpool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t0d0 ONLINE 0 0 0
/zdisk/c1t0d0 ONLINE 0 0 0
/zdisk/c2t0d0 ONLINE 0 0 0
/zdisk/c3t0d0 ONLINE 0 0 0
/zdisk/c4t0d0 ONLINE 0 0 0
/zdisk/c5t0d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t1d0 ONLINE 0 0 0
/zdisk/c1t1d0 ONLINE 0 0 0
/zdisk/c2t1d0 ONLINE 0 0 0
/zdisk/c3t1d0 ONLINE 0 0 0
/zdisk/c4t1d0 ONLINE 0 0 0
/zdisk/c5t1d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t2d0 ONLINE 0 0 0
/zdisk/c1t2d0 ONLINE 0 0 0
/zdisk/c2t2d0 ONLINE 0 0 0
/zdisk/c3t2d0 ONLINE 0 0 0
/zdisk/c4t2d0 ONLINE 0 0 0
/zdisk/c5t2d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t3d0 ONLINE 0 0 0
/zdisk/c1t3d0 ONLINE 0 0 0
/zdisk/c2t3d0 ONLINE 0 0 0
/zdisk/c3t3d0 ONLINE 0 0 0
/zdisk/c4t3d0 ONLINE 0 0 0
/zdisk/c5t3d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t4d0 ONLINE 0 0 0
/zdisk/c1t4d0 ONLINE 0 0 0
/zdisk/c2t4d0 ONLINE 0 0 0
/zdisk/c3t4d0 ONLINE 0 0 0
/zdisk/c4t4d0 ONLINE 0 0 0
/zdisk/c5t4d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t5d0 ONLINE 0 0 0
/zdisk/c1t5d0 ONLINE 0 0 0
/zdisk/c2t5d0 ONLINE 0 0 0
/zdisk/c3t5d0 ONLINE 0 0 0
/zdisk/c4t5d0 ONLINE 0 0 0
/zdisk/c5t5d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t6d0 ONLINE 0 0 0
/zdisk/c1t6d0 ONLINE 0 0 0
/zdisk/c2t6d0 ONLINE 0 0 0
/zdisk/c3t6d0 ONLINE 0 0 0
/zdisk/c4t6d0 ONLINE 0 0 0
/zdisk/c5t6d0 ONLINE 0 0 0
spares
/zdisk/c0t7d0 AVAIL
/zdisk/c1t7d0 AVAIL
/zdisk/c2t7d0 AVAIL
/zdisk/c3t7d0 AVAIL
/zdisk/c4t7d0 AVAIL
/zdisk/c5t7d0 AVAIL
errors: No known data errors
Let's go for a test drive with ZFS. First, I will create a zfs file system (zfs1) without compression (by default) and try to simulate a corrupted disk. We then 'scrub' it and 'replace' the corrupted disk with a new disk. You can see the MD5 hash of the file created before the corruption is the same throughout the whole process (before corruption, after corruption, replace faulty disk)
=
# zfs create zpool/zfs1
# dd if=/dev/urandom of=/zpool/zfs1/somefile.bin bs=1024 count=1000
1000+0 records in
1000+0 records out
# digest -a md5 /zpool/zfs1/somefile.bin
c61163bc590222cfbc0576b933b9ba53
# dd if=/dev/zero of=/zdisk/c5t6d0 bs=1024 count=10
10+0 records in
10+0 records out
# zpool scrub zpool
# zpool status
pool: zpool
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://www.sun.com/msg/ZFS-8000-4J
scrub: resilver stopped with 0 errors on Fri Mar 23 08:54:20 2007
config:
NAME STATE READ WRITE CKSUM
zpool DEGRADED 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t0d0 ONLINE 0 0 0
/zdisk/c1t0d0 ONLINE 0 0 0
/zdisk/c2t0d0 ONLINE 0 0 0
/zdisk/c3t0d0 ONLINE 0 0 0
/zdisk/c4t0d0 ONLINE 0 0 0
/zdisk/c5t0d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t1d0 ONLINE 0 0 0
/zdisk/c1t1d0 ONLINE 0 0 0
/zdisk/c2t1d0 ONLINE 0 0 0
/zdisk/c3t1d0 ONLINE 0 0 0
/zdisk/c4t1d0 ONLINE 0 0 0
/zdisk/c5t1d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t2d0 ONLINE 0 0 0
/zdisk/c1t2d0 ONLINE 0 0 0
/zdisk/c2t2d0 ONLINE 0 0 0
/zdisk/c3t2d0 ONLINE 0 0 0
/zdisk/c4t2d0 ONLINE 0 0 0
/zdisk/c5t2d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t3d0 ONLINE 0 0 0
/zdisk/c1t3d0 ONLINE 0 0 0
/zdisk/c2t3d0 ONLINE 0 0 0
/zdisk/c3t3d0 ONLINE 0 0 0
/zdisk/c4t3d0 ONLINE 0 0 0
/zdisk/c5t3d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t4d0 ONLINE 0 0 0
/zdisk/c1t4d0 ONLINE 0 0 0
/zdisk/c2t4d0 ONLINE 0 0 0
/zdisk/c3t4d0 ONLINE 0 0 0
/zdisk/c4t4d0 ONLINE 0 0 0
/zdisk/c5t4d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t5d0 ONLINE 0 0 0
/zdisk/c1t5d0 ONLINE 0 0 0
/zdisk/c2t5d0 ONLINE 0 0 0
/zdisk/c3t5d0 ONLINE 0 0 0
/zdisk/c4t5d0 ONLINE 0 0 0
/zdisk/c5t5d0 ONLINE 0 0 0
raidz2 DEGRADED 0 0 0
/zdisk/c0t6d0 ONLINE 0 0 0
/zdisk/c1t6d0 ONLINE 0 0 0
/zdisk/c2t6d0 ONLINE 0 0 0
/zdisk/c3t6d0 ONLINE 0 0 0
/zdisk/c4t6d0 ONLINE 0 0 0
spare DEGRADED 0 0 0
/zdisk/c5t6d0 UNAVAIL 0 0 0 corrupted data
/zdisk/c0t7d0 ONLINE 0 0 0
spares
/zdisk/c0t7d0 INUSE currently in use
/zdisk/c1t7d0 AVAIL
/zdisk/c2t7d0 AVAIL
/zdisk/c3t7d0 AVAIL
/zdisk/c4t7d0 AVAIL
/zdisk/c5t7d0 AVAIL
errors: No known data errors
# digest -a md5 /zpool/zfs1/somefile.bin
c61163bc590222cfbc0576b933b9ba53
# mkfile 100m /zdisk/newdisk
# zpool replace zpool /zdisk/c5t6d0 /zdisk/newdisk
# zpool status
pool: zpool
state: DEGRADED
scrub: resilver completed with 0 errors on Fri Mar 23 08:57:26 2007
config:
NAME STATE READ WRITE CKSUM
zpool DEGRADED 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t0d0 ONLINE 0 0 0
/zdisk/c1t0d0 ONLINE 0 0 0
/zdisk/c2t0d0 ONLINE 0 0 0
/zdisk/c3t0d0 ONLINE 0 0 0
/zdisk/c4t0d0 ONLINE 0 0 0
/zdisk/c5t0d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t1d0 ONLINE 0 0 0
/zdisk/c1t1d0 ONLINE 0 0 0
/zdisk/c2t1d0 ONLINE 0 0 0
/zdisk/c3t1d0 ONLINE 0 0 0
/zdisk/c4t1d0 ONLINE 0 0 0
/zdisk/c5t1d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t2d0 ONLINE 0 0 0
/zdisk/c1t2d0 ONLINE 0 0 0
/zdisk/c2t2d0 ONLINE 0 0 0
/zdisk/c3t2d0 ONLINE 0 0 0
/zdisk/c4t2d0 ONLINE 0 0 0
/zdisk/c5t2d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t3d0 ONLINE 0 0 0
/zdisk/c1t3d0 ONLINE 0 0 0
/zdisk/c2t3d0 ONLINE 0 0 0
/zdisk/c3t3d0 ONLINE 0 0 0
/zdisk/c4t3d0 ONLINE 0 0 0
/zdisk/c5t3d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t4d0 ONLINE 0 0 0
/zdisk/c1t4d0 ONLINE 0 0 0
/zdisk/c2t4d0 ONLINE 0 0 0
/zdisk/c3t4d0 ONLINE 0 0 0
/zdisk/c4t4d0 ONLINE 0 0 0
/zdisk/c5t4d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t5d0 ONLINE 0 0 0
/zdisk/c1t5d0 ONLINE 0 0 0
/zdisk/c2t5d0 ONLINE 0 0 0
/zdisk/c3t5d0 ONLINE 0 0 0
/zdisk/c4t5d0 ONLINE 0 0 0
/zdisk/c5t5d0 ONLINE 0 0 0
raidz2 DEGRADED 0 0 0
/zdisk/c0t6d0 ONLINE 0 0 0
/zdisk/c1t6d0 ONLINE 0 0 0
/zdisk/c2t6d0 ONLINE 0 0 0
/zdisk/c3t6d0 ONLINE 0 0 0
/zdisk/c4t6d0 ONLINE 0 0 0
spare DEGRADED 0 0 0
replacing DEGRADED 0 0 0
/zdisk/c5t6d0 UNAVAIL 0 0 0 corrupted data
/zdisk/newdisk ONLINE 0 0 0
/zdisk/c0t7d0 ONLINE 0 0 0
spares
/zdisk/c0t7d0 INUSE currently in use
/zdisk/c1t7d0 AVAIL
/zdisk/c2t7d0 AVAIL
/zdisk/c3t7d0 AVAIL
/zdisk/c4t7d0 AVAIL
/zdisk/c5t7d0 AVAIL
errors: No known data errors
# zpool status
pool: zpool
state: ONLINE
scrub: resilver completed with 0 errors on Fri Mar 23 08:57:26 2007
config:
NAME STATE READ WRITE CKSUM
zpool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t0d0 ONLINE 0 0 0
/zdisk/c1t0d0 ONLINE 0 0 0
/zdisk/c2t0d0 ONLINE 0 0 0
/zdisk/c3t0d0 ONLINE 0 0 0
/zdisk/c4t0d0 ONLINE 0 0 0
/zdisk/c5t0d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t1d0 ONLINE 0 0 0
/zdisk/c1t1d0 ONLINE 0 0 0
/zdisk/c2t1d0 ONLINE 0 0 0
/zdisk/c3t1d0 ONLINE 0 0 0
/zdisk/c4t1d0 ONLINE 0 0 0
/zdisk/c5t1d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t2d0 ONLINE 0 0 0
/zdisk/c1t2d0 ONLINE 0 0 0
/zdisk/c2t2d0 ONLINE 0 0 0
/zdisk/c3t2d0 ONLINE 0 0 0
/zdisk/c4t2d0 ONLINE 0 0 0
/zdisk/c5t2d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t3d0 ONLINE 0 0 0
/zdisk/c1t3d0 ONLINE 0 0 0
/zdisk/c2t3d0 ONLINE 0 0 0
/zdisk/c3t3d0 ONLINE 0 0 0
/zdisk/c4t3d0 ONLINE 0 0 0
/zdisk/c5t3d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t4d0 ONLINE 0 0 0
/zdisk/c1t4d0 ONLINE 0 0 0
/zdisk/c2t4d0 ONLINE 0 0 0
/zdisk/c3t4d0 ONLINE 0 0 0
/zdisk/c4t4d0 ONLINE 0 0 0
/zdisk/c5t4d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t5d0 ONLINE 0 0 0
/zdisk/c1t5d0 ONLINE 0 0 0
/zdisk/c2t5d0 ONLINE 0 0 0
/zdisk/c3t5d0 ONLINE 0 0 0
/zdisk/c4t5d0 ONLINE 0 0 0
/zdisk/c5t5d0 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
/zdisk/c0t6d0 ONLINE 0 0 0
/zdisk/c1t6d0 ONLINE 0 0 0
/zdisk/c2t6d0 ONLINE 0 0 0
/zdisk/c3t6d0 ONLINE 0 0 0
/zdisk/c4t6d0 ONLINE 0 0 0
/zdisk/newdisk ONLINE 0 0 0
spares
/zdisk/c0t7d0 AVAIL
/zdisk/c1t7d0 AVAIL
/zdisk/c2t7d0 AVAIL
/zdisk/c3t7d0 AVAIL
/zdisk/c4t7d0 AVAIL
/zdisk/c5t7d0 AVAIL
errors: No known data errors
# digest -a md5 /zpool/zfs1/somefile.bin
c61163bc590222cfbc0576b933b9ba53
Now I am going to create another ZFS file system with compression on. You can see the time taken to create such a big file (1GB) in a compressed file system is only 51.112 seconds vs 49.419 seconds without compression. Also the MD5 hash of the same file under the 2 file systems are the same.
# time dd if=/dev/urandom of=/zpool/zfs1/bifile.bin bs=1024 count=100000 100000+0 records in 100000+0 records out real 0m49.419s user 0m0.701s sys 0m41.169s # zfs get compression zpool/zfs1 NAME PROPERTY VALUE SOURCE zpool/zfs1 compression off local # zfs create zpool/zfs2 # zfs set compression=on zpool/zfs2 # time dd if=/dev/urandom of=/zpool/zfs2/bifile.bin bs=1024 count=100000 100000+0 records in 100000+0 records out real 0m52.112s user 0m0.697s sys 0m40.897s # cp /zpool/zfs1/bifile.bin /zpool/zfs2/bifile.bin-copy-zfs1 # digest -a md5 /zpool/zfs1/bifile.bin b15a3f71dd6ffb937c9cbf508cb442ff # digest -a md5 /zpool/zfs2/bifile.bin-copy-zfs1 b15a3f71dd6ffb937c9cbf508cb442ff
Solaris 10 rocks, ZFS on Solaris 10 rocks++.
PS. I also explored the IP filter on the T1 so that I can implement host-based firewall for my customer. The article, Using Solaris IP Filters, is a very good starting point. It is pretty easy to implement and I tried that out with Samba.





