Thanks for you explanation Fajar. However, take a look on the next lines:

# available ZFS in the system

root@sct-caszonesrv-07:~# zfs list
NAME                         USED  AVAIL  REFER  MOUNTPOINT
opt                          532M  34.7G   290M  /opt
opt/zones                    243M  34.7G    32K  /opt/zones
opt/zones/sct-scw02-shared   243M  34.7G   243M  /opt/zones/sct-scw02-shared
static                       104K  58.6G    34K  /var/www/

# creating a file in /root (UFS)

root@sct-caszonesrv-07:~# dd if=/dev/zero of=file.bin count=1024 bs=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.0545957 s, 19.2 MB/s
root@sct-caszonesrv-07:~# pwd

# enable compression in some ZFS zone

root@sct-caszonesrv-07:~# zfs set compression=on opt/zones/sct-scw02-shared

# copying the previos file to this zone

root@sct-caszonesrv-07:~# cp /root/file.bin /opt/zones/sct-scw02-shared/root/

# checking the file size in the origin dir (UFS) and the destination one (ZFS with compression enabled)

root@sct-caszonesrv-07:~# ls -lh /root/file.bin
-rw-r--r-- 1 root root 1.0M Jul 10 13:21 /root/file.bin

root@sct-caszonesrv-07:~# ls -lh /opt/zones/sct-scw02-shared/root/file.bin
-rw-r--r-- 1 root root 1.0M Jul 10 13:22 /opt/zones/sct-scw02-shared/root/file.bin

# the both files has exactly the same cksum!

root@sct-caszonesrv-07:~# cksum /root/file.bin
3018728591 1048576 /root/file.bin

root@sct-caszonesrv-07:~# cksum /opt/zones/sct-scw02-shared/root/file.bin
3018728591 1048576 /opt/zones/sct-scw02-shared/root/file.bin

So... I don't see any size variation with this test.
Actually I tried the same with compression=gzip/gzip-6 or even gzip-9 and is always the same. I understand it shouldn't be?

What am I missing or doing wrong?

More info about the system:

root@sct-caszonesrv-07:~# cat /etc/release
                    Oracle Solaris 10 8/11 s10x_u10wos_17b X86
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
                            Assembled 23 August 2011

I will face my fear. I will permit it to pass over me and through me.
And when it has gone past I will turn the inner eye to see its path.
Where the fear has gone there will be nothing. Only I will remain.
zfs-discuss mailing list

Reply via email to