Le 21 déc. 09 à 19:28, Matthew Ahrens a écrit :

Gaëtan Lehmann wrote:
Hi,
On opensolaris, I use du with the -b option to get the uncompressed size of a directory):
 r...@opensolaris:~# du -sh /usr/local/
 399M    /usr/local/
 r...@opensolaris:~# du -sbh /usr/local/
 915M    /usr/local/
r...@opensolaris:~# zfs list -o space,refer,ratio,compress data/ local NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD REFER RATIO COMPRESS data/local 228G 643M 249M 394M 0 0 394M 2.51x on
 r...@opensolaris:~# which du
 /usr/gnu/bin/du
but on Solaris 10, there is no such option.
So what is the best way to get the uncompressed size of a directory on Solaris 10?

Install GNU du on solaris 10?

That's an option of course, but I'd prefer something that I can use installing any extra program.

Although the answer will be just as (in)accurate as GNU du on solaris 10. Note that it reports the compression ratio as 915/399 = 2.29x, actual is 2.51x. This could be due to sparse files, or metadata like directories, whose "apparent size" (st_size) is not what GNU du expects.

At least it gives a not so bad estimation :-)

And the compression ratio includes the data in the snapshots, so it may be inaccurate in that case also.
The actual compression ratio, given on the last snapshot, is 2.41x.

Gaëtan

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

Attachment: PGP.sig
Description: Ceci est une signature électronique PGP

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to