Data replicated to new pool seems smaller. Problem?

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
I used zfs send / receive to copy data from an over-full pool to a new larger one, and the resultant one shows as being a little smaller: 17.46 TB vs. 17.57 TB. Is this something I should worry about? The compression type (lz4) and ratio (1.19) are the same.

df -c

shows somewhat fewer 1K blocks used on the new pool.

Is there a way to at least count the files on each pool, even if I can't (conveniently) do a file-by-file comparison?
 
D

dlavigne

Guest
df does not adequately display ZFS usage. Try zfs list instead.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
df does not adequately display ZFS usage. Try zfs list instead.

I executed

zfs list -t filesystem > FileList

on each pool

then

diff <Pool1>/FileList <Pool2>/FileList

and no differences were reported, so I assume that everything is OK. Correct?
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
keep in mind, that if you change things like compression on a pool, only new files written are affected. so maybe on the original pool you enabled compression at a later time leaving some files uncompressed that were now compressed when sending/receiving?
I have to admit I have problems wrapping my head around such problems too. But send/recieve a pool when you made some significant changes to your pool is a good way to really apply those changes to pool so I guess your new pool is more consistent than your old. especially if there where no errors when migrating and even the directory listings match I would not worry to much. if you want to be absoluty sure md5 your data and compare, eg. "tar -cf - datadir | md5sum" as suggested here: https://unix.stackexchange.com/ques...e-md5-sum-of-a-directorys-contents-as-one-sum
 
Top