From owner-freebsd-fs@freebsd.org Tue Sep 19 16:14:11 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47E7AE1B241 for ; Tue, 19 Sep 2017 16:14:11 +0000 (UTC) (envelope-from juan@kognito.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4B261B9F for ; Tue, 19 Sep 2017 16:14:10 +0000 (UTC) (envelope-from juan@kognito.com) Received: by mail-lf0-x22b.google.com with SMTP id 80so131713lfy.4 for ; Tue, 19 Sep 2017 09:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kognito-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=ZtVzt6iyY7ui+3tKJ2vjTA/yBAwnFVGv5MzQ4cR3VHI=; b=qGpv1yRX24gZ0DduX8N9cDvAnjTgskSaa9nRuwrqfKWoMVTePHGssBj/6shK3XCxDX +ZJbzvyE5urvMkiCAyJTLpCnh8qGL4g6R++zoLTxwrJ+XnXz9QaSDBHY13u1rUFsyR8P rGVTs8rnGtRj8FyCo1TCF0QgGBMeQE3WaibhA2n+kLVmi1EUKQyWkuCQr0VxrgfuOlqX NWqzCRQThHIvqrzIYGdqbMAO9Xu9phNe01qKE1ntAx5RND6zIoxyDVsjFiF7BTv1Bej1 U8K0PKxijeRXv2kcVgWQXkMMddZEb5/yNptFyweq8R8V77jDrVOewlPQYv7G90ccqos5 VzxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZtVzt6iyY7ui+3tKJ2vjTA/yBAwnFVGv5MzQ4cR3VHI=; b=GWdyzfE295fA41h4K6NL8fGNVpd3QFo0iuTxFLTxBNuzgNucJYYclgH2vr3DgnUd2t 0w6AR+yJDxiQfrwMQcFA7gPb24e7EY5odQUG7w9hbu1TDl+xUVaeE1tFxho2f8/5SsiT Q4MAIhg4BzPL3uk976zyncFQpRBKHdbfux6xG2635CrvwUg6YDfACUFJk43Uv6anOO0S jJ7y1sjuOlFIKJbw7FGmiKpMoU1vPK+l54qnrPDvO6dSx9Qhq3ZB02kCmoGvKjeTDtPU FtuVjlxsoZJ2sGHl5D6jBHZhgxzJUr5Lx+MwCHql0BreJ77itDb9JGVio7Ib635bCjOs R7IA== X-Gm-Message-State: AHPjjUhD3LH889zRqnyn+4F1oSSTY0314LLQSZPylwCmdLxFiwlyn5Ku 9hPet5LfR3K/AdrIz6fBI51HUeOfvrKeo7c1rwnaQpY= X-Google-Smtp-Source: AOwi7QDpNw0fWQBECq2HKkyrz8+IBV8Wxsauu+PbNXaB4C94X3Xltx0SCxtIvIcsGsVBOt9PV4cISrs0m8adxnUiFfA= X-Received: by 10.25.39.202 with SMTP id n193mr851958lfn.131.1505837647579; Tue, 19 Sep 2017 09:14:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.44.77 with HTTP; Tue, 19 Sep 2017 09:13:36 -0700 (PDT) From: Juan Manuel Palacios Date: Tue, 19 Sep 2017 12:13:36 -0400 Message-ID: Subject: Trying to understand confusing 'zfs diff' output To: freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:14:11 -0000 Hi everyone, I'm trying to understand a result I'm seeing when comparing the diff of two local ZFS snapshots that were successfully replicated to a remote pool over SSH against the diff of their remote counterparts. The latter shows three files as having been deleted, while the local diff of the exact same two snapshots doesn't. Following are those diffs, with empty lines entered manually into the local diff where the remote one shows the deleted files; moreover, lines right above & below this confusing part of the diffs have been trimmed for brevity's sake, since they were identical across both outputs. 1) Local diff (FreeBSD 10.3-RELEASE-p21 system): -> zfs diff zroot/mysql@automated_2017-07-31_23:45:04-EDT zroot/mysql@automated_2017-08-01_23:45:03-EDT | gawk '{ match($2, /\/(.*)/, matches); printf "%s\t%s\n", $1, matches[1]; }' (trimmed) M mysql/data/knet@002dlrs/lrs_providers.ibd M mysql/data/snap/sessions.ibd M mysql/data/knet@002dlrs/sessions.ibd M mysql/data/leads/demo_requests.ibd M mysql/tmp/nk-dev.sql.gz M mysql/data/knet/account_manager_memberships.ibd (trimmed) 2) Remote diff (FreeBSD 10.3-RELEASE-p19 system): -> zfs diff backup/mysql@automated_2017-07-31_23:45:04-EDT backup/mysql@automated_2017-08-01_23:45:03-EDT | gawk '{ match($2, /\/mnt\/backup\/(.*)/, matches); printf "%s\t%s\n", $1, matches[1]; }' (trimmed) M mysql/data/knet@002dlrs/lrs_providers.ibd - mysql/tmp/nk-dump--2017-07-19_01:32:16-EDT.sql M mysql/data/snap/sessions.ibd M mysql/data/knet@002dlrs/sessions.ibd M mysql/data/leads/demo_requests.ibd M mysql/tmp/nk-dev.sql.gz - mysql/replication/mysql-bin.001241 - mysql/replication/mysql-bin.001242 M mysql/data/knet/account_manager_memberships.ibd (trimmed) So, as I was saying, the remote diff shows these three files as having been deleted, because they were: 1) Locally: -> ls -l /mysql/.zfs/snapshot/automated_2017-07-31_23\:45\: 04-EDT/tmp/nk-dump--2017-07-19_01\:32\:16-EDT.sql -rw-r--r-- 1 jmpp jmpp 46M Jul 19 01:32 /mysql/.zfs/snapshot/ automated_2017-07-31_23:45:04-EDT/tmp/nk-dump--2017-07-19_01:32:16-EDT.sql -> ls -l /mysql/.zfs/snapshot/automated_2017-08-01_23\:45\: 03-EDT/tmp/nk-dump--2017-07-19_01\:32\:16-EDT.sql ls: /mysql/.zfs/snapshot/automated_2017-08-01_23:45:03- EDT/tmp/nk-dump--2017-07-19_01:32:16-EDT.sql: No such file or directory 2) On the remote pool: -> ls -l /mnt/backup/mysql/.zfs/snapshot/automated_2017-07-31_ 23\:45\:04-EDT/tmp/nk-dump--2017-07-19_01:32:16-EDT.sql -rw-r--r-- 1 1001 1001 48288840 Jul 18 22:32 /mnt/backup/mysql/.zfs/ snapshot/automated_2017-07-31_23:45:04-EDT/tmp/nk-dump-- 2017-07-19_01:32:16-EDT.sql -> ls -l /mnt/backup/mysql/.zfs/snapshot/automated_2017-08-01_ 23\:45\:03-EDT/tmp/nk-dump--2017-07-19_01:32:16-EDT.sql ls: /mnt/backup/mysql/.zfs/snapshot/automated_2017-08-01_ 23:45:03-EDT/tmp/nk-dump--2017-07-19_01:32:16-EDT.sql: No such file or directory And so for the other two files. So, my question is, if the remote diff is correct in showing these files as having been deleted between the two snapshots (it *is* correct in doing that, right?), why does the local diff not show it also? Thanks in advance for any help! -- Juan Palacios Senior Software Architect 135 West 26th St l 12th Floor l NY, NY 10001 212.675.9234 l 646.217.3677 Register for our upcoming webinar with The Healthy Minds Network and AUCCCD: Trends in Higher Education Mental Health: Research Highlights Connect with us!