Stathis Kamperis
2009-Oct-26 11:25 UTC
[zfs-discuss] Retrieve per-block checksum algorithm
Greetings to everyone. I''m trying to retrieve the checksumming algorithm on a per-block basis with zdb(1M). I know it''s supposed to be ran by Sun''s support engineers only & I take full responsibility for whatever damage I cause to my machine by using it. Now. I created a tank/test filesystem, dd''ed some files, then changed the checksum to sha256 and dd''ed some more files. I retrieved the DVAs of all the files and wanted to verify that some of them are using the default and the rest the sha256 checksums. The problem is that zdb -R either returns (null), meaning that printf() has been given a NULL pointer or it returns corrupt data and there are cases where it works ok. This is a case where it fails: $ zdb -R tank:0:f076d8600:7a00:b Found vdev type: mirror DVA[0]: vdev_id 1199448952 / 4315c6bdf768bc00 DVA[0]: GANG: TRUE GRID: 00bd ASIZE: eb45ac00 DVA[0]: :1199448952:4315c6bdf768bc00:a75a00:egd DVA[1]: vdev_id 1938508981 / e19c60208f39cc00 DVA[1]: GANG: TRUE GRID: 005d ASIZE: 11fe4ac00 DVA[1]: :1938508981:e19c60208f39cc00:a75a00:egd DVA[2]: vdev_id 1231513852 / 646586e9b6609400 DVA[2]: GANG: FALSE GRID: 00e6 ASIZE: 15e953200 DVA[2]: :1231513852:646586e9b6609400:a75a00:edd LSIZE: 6efc00 PSIZE: a75a00 ENDIAN: BIG TYPE: (null) BIRTH: 2a9513965f18afd LEVEL: 24 FILL: 85adfa322e48a796 CKFUNC: (null) COMP: (null) CKSUM: 7408c0516468b934:a0f29a7c28b6c319:28280aab19d1ad3c:64607350c7ea256c $ Is it a zdb deficiency of my input is to blame? Thank you for considering. Best regards, Stathis Kamperis
Victor Latushkin
2009-Oct-26 11:42 UTC
[zfs-discuss] Retrieve per-block checksum algorithm
On 26.10.09 14:25, Stathis Kamperis wrote:> Greetings to everyone. > > I''m trying to retrieve the checksumming algorithm on a per-block basis > with zdb(1M). I know it''s supposed to be ran by Sun''s support > engineers only & I take full responsibility for whatever damage I > cause to my machine by using it. > > Now. > I created a tank/test filesystem, dd''ed some files, then changed the > checksum to sha256 and dd''ed some more files. I retrieved the DVAs of > all the files and wanted to verify that some of them are using the > default and the rest the sha256 checksums. The problem is that zdb -R > either returns (null), meaning that printf() has been given a NULL > pointer or it returns corrupt data and there are cases where it works > ok. This is a case where it fails: > > $ zdb -R tank:0:f076d8600:7a00:b > Found vdev type: mirror > DVA[0]: vdev_id 1199448952 / 4315c6bdf768bc00 > DVA[0]: GANG: TRUE GRID: 00bd ASIZE: eb45ac00 > DVA[0]: :1199448952:4315c6bdf768bc00:a75a00:egd > DVA[1]: vdev_id 1938508981 / e19c60208f39cc00 > DVA[1]: GANG: TRUE GRID: 005d ASIZE: 11fe4ac00 > DVA[1]: :1938508981:e19c60208f39cc00:a75a00:egd > DVA[2]: vdev_id 1231513852 / 646586e9b6609400 > DVA[2]: GANG: FALSE GRID: 00e6 ASIZE: 15e953200 > DVA[2]: :1231513852:646586e9b6609400:a75a00:edd > LSIZE: 6efc00 PSIZE: a75a00 > ENDIAN: BIG TYPE: (null) > BIRTH: 2a9513965f18afd LEVEL: 24 FILL: 85adfa322e48a796 > CKFUNC: (null) COMP: (null) > CKSUM: 7408c0516468b934:a0f29a7c28b6c319:28280aab19d1ad3c:64607350c7ea256c > $ > > Is it a zdb deficiency of my input is to blame? > Thank you for considering.I guess -S option can help you to get what you are looking for. Victor
Stathis Kamperis
2009-Oct-26 11:58 UTC
[zfs-discuss] Retrieve per-block checksum algorithm
2009/10/26 Victor Latushkin <Victor.Latushkin at sun.com>:> On 26.10.09 14:25, Stathis Kamperis wrote: >> >> Greetings to everyone. >> >> I''m trying to retrieve the checksumming algorithm on a per-block basis >> with zdb(1M). I know it''s supposed to be ran by Sun''s support >> engineers only & I take full responsibility for whatever damage I >> cause to my machine by using it. > I guess -S option can help you to get what you are looking for. > > VictorHi Victor; thank you for your answer. I tried with -S with no luck. I tried also different levels of verboseness (-vv/-SS, etc). E.g., $ zdb -S all:all tank/test Dataset tank/test [ZPL], ID 197, cr_txg 94447, 63.5K, 7 objects $>From what I''ve read there''s also zdb -bbbb <pool> which outputs ckalgas a side effect while doing some validation checks. E.g., objset 0 object 26 offset 0x76000 [L0 SPA space map] 1000L/c00P DVA[0]=<0:232c680400:c00> DVA[1]=<0:108f12a00:c00> DVA[2]=<0:430237ce00:c00> fletcher4 lzjb LE contiguous birth=34121 fill=1 cksum=911bd91bf9:fdcdafd76e06:1056870d1b78c0a:c623a15a8f99054a Just wondering if is doable on a per user specified block basis. Best regards, Stathis Kamperis