Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Dec 2010 09:33:00 +0200
From:      Andrei Kolu <antik@bsd.ee>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>, freebsd-current@freebsd.org, freebsd-fs@freebsd.org
Subject:   Re: Next ZFSv28 patchset ready for testing.
Message-ID:  <AANLkTinP7HUgZ1hD2nURXu5sMBYxQqmrLuyY069=WvhO@mail.gmail.com>
In-Reply-To: <AANLkTimds6gLxqSRhr7_WPzQXTjqqME63O0Aw5FK=G3p@mail.gmail.com>
References:  <20101213214556.GC2038@garage.freebsd.pl> <20101213231208.GK2038@garage.freebsd.pl> <AANLkTimds6gLxqSRhr7_WPzQXTjqqME63O0Aw5FK=G3p@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/12/15 Andrei Kolu <antik@bsd.ee>:
> 2010/12/14 Pawel Jakub Dawidek <pjd@freebsd.org>
>>
>> On Mon, Dec 13, 2010 at 10:45:56PM +0100, Pawel Jakub Dawidek wrote:
>> > Hi.
>> >
>> > The new patchset is ready for testing:
>> >
>> > =A0 =A0 =A0 http://people.freebsd.org/~pjd/patches/zfs_20101212.patch.=
bz2
>>
>> You can also download the whole source tree already patched from here:
>>
>> =A0 =A0 =A0 =A0http://people.freebsd.org/~pjd/zfs_20101212.tbz
>>
>
> # uname -a
> FreeBSD freebsd9.raidon.eu 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Tue Dec
> 14 14:37:01 EET 2010
> root@freebsd9.raidon.eu:/usr/obj/usr/src/sys/GENERIC =A0amd64
>
> Create files filled with zeroes:
> # mkfile 512m disk1 disk2 disk3 disk4
> #=A0zpool create andmed raidz /home/antik/disk{1,2,3,4}
> # zpool status andmed
> =A0pool: andmed
> =A0state: ONLINE
> =A0scan: none requested
> config:
>
> =A0 =A0 =A0 =A0NAME =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 STATE =A0 =A0 REA=
D WRITE CKSUM
> =A0 =A0 =A0 =A0andmed =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ONLINE =A0 =A0 =A0 =
0 =A0 =A0 0 =A0 =A0 0
> =A0 =A0 =A0 =A0 =A0raidz1-0 =A0 =A0 =A0 =A0 =A0 =A0 ONLINE =A0 =A0 =A0 0 =
=A0 =A0 0 =A0 =A0 0
> =A0 =A0 =A0 =A0 =A0 =A0/home/antik/disk1 =A0ONLINE =A0 =A0 =A0 0 =A0 =A0 =
0 =A0 =A0 0
> =A0 =A0 =A0 =A0 =A0 =A0/home/antik/disk2 =A0ONLINE =A0 =A0 =A0 0 =A0 =A0 =
0 =A0 =A0 0
> =A0 =A0 =A0 =A0 =A0 =A0/home/antik/disk3 =A0ONLINE =A0 =A0 =A0 0 =A0 =A0 =
0 =A0 =A0 0
> =A0 =A0 =A0 =A0 =A0 =A0/home/antik/disk4 =A0ONLINE =A0 =A0 =A0 0 =A0 =A0 =
0 =A0 =A0 0
>
> errors: No known data errors
>
> Now let's try to scrub:
> # zpool scrub andmed
>
> Fatal trap 12: page fault while in kernel mode
> cpuid =3D 1; apic id =3D 01
> fault virtual address =3D 0x1fb8007b
> fault code =3D supervisor read data, page not present
> instruction pointer =3D 0x20:0xffffffff812967d2
> stack pointer =3D 0x20:0xffffff80ee605548
> frame pointer =3D 0x28:0xffffff80ee605730
> code segment =3D base 0x0, limit 0xfffff, type 0x1b
> =A0=3D DPL 0, pres1, long 1, def32 0, gran 1
> processor eflags =3D interrupt enabled, resume, IOPL =3D 0
> current process =3D 2081 (initial thread)
> [ thread pid 2081 tid 100121 ]
> Stopped at =A0vdev_file_open+0x92: =A0testb =A0$0x20,0x7b(%rax)
>
>
> Similar problem on FreeBSD 8.1:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D153126
>

Workaround in FreeBSD would be mounting file based devices as block devices=
:

# mdconfig -f disk1
md0
# mdconfig -f disk2
md1
# mdconfig -f disk3
md2
# mdconfig -f disk4
md3

# zpool create andmed raidz md{0,1,2,3}
# zpool scrub andmed
# zpool status
 pool: andmed
state: ONLINE
scan: scrub repaired 0 in 0h0m with 0 errors on Wed Dec 15 15:57:34 2010
config:

       NAME        STATE     READ WRITE CKSUM
       andmed      ONLINE       0     0     0
         raidz1-0  ONLINE       0     0     0
           md0     ONLINE       0     0     0
           md1     ONLINE       0     0     0
           md2     ONLINE       0     0     0
           md3     ONLINE       0     0     0

errors: No known data errors

---------------------------------------------------------------------------=
-------------
Deduplication is nice:)

# zfs dedup=3Don peegel

# zpool set dedupditto=3D100 peegel

# zpool get all peegel | grep dedup
peegel  dedupditto     100         local
peegel  dedupratio     1.45x       -

# zdb -DD peegel
DDT-sha256-zap-duplicate: 535 entries, size 284 on disk, 153 in core
DDT-sha256-zap-unique: 446 entries, size 316 on disk, 183 in core

DDT histogram (aggregated over all DDTs):

bucket              allocated                       referenced
______   ______________________________   ______________________________
refcnt   blocks   LSIZE   PSIZE   DSIZE   blocks   LSIZE   PSIZE   DSIZE
------   ------   -----   -----   -----   ------   -----   -----   -----
    1      446   7.27M   3.92M   3.92M      446   7.27M   3.92M   3.92M
    2      534   5.91M   3.25M   3.25M    1.04K   11.8M   6.50M   6.50M
    4        1     512     512     512        4      2K      2K      2K
Total      981   13.2M   7.17M   7.17M    1.48K   19.1M   10.4M   10.4M

dedup =3D 1.45, compress =3D 1.83, copies =3D 1.00, dedup * compress / copi=
es =3D 2.66

---------------------------------------------------------------------------=
-------------
Now, I am trying to add cache devices to pool:

# zpool add andmed cache da0 da1

looks like this command just hangs- system is responsible but pool is
not accessible. How long it would take to cache data? I see no I/O
operations going on. No error messages either.
---------------------------------------------------------------------------=
-------------
PS: All this file based disk stuff I am trying to do is purely for
entertainment purposes and of course for demonstration of technology.


Andrei



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinP7HUgZ1hD2nURXu5sMBYxQqmrLuyY069=WvhO>