From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0ED94C76192 for ; Wed, 17 Jul 2019 07:52:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E28A221743 for ; Wed, 17 Jul 2019 07:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727513AbfGQHwp convert rfc822-to-8bit (ORCPT ); Wed, 17 Jul 2019 03:52:45 -0400 Received: from rincewind.allchangeplease.de ([85.214.210.89]:58956 "EHLO mail.allchangeplease.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbfGQHwo (ORCPT ); Wed, 17 Jul 2019 03:52:44 -0400 X-Greylist: delayed 411 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Jul 2019 03:52:44 EDT Received: from [192.168.178.50] (dslb-178-008-198-034.178.008.pools.vodafone-ip.de [178.8.198.34]) by mail.allchangeplease.de (Postfix) with ESMTPSA id 682251E95 for ; Wed, 17 Jul 2019 09:45:51 +0200 (CEST) To: linux-btrfs@vger.kernel.org References: <20190716232456.GA26411@tik.uni-stuttgart.de> From: =?UTF-8?Q?Bernhard_K=c3=bchnel?= Openpgp: preference=signencrypt Autocrypt: addr=bkue@allchangeplease.de; prefer-encrypt=mutual; keydata= mQGiBEIt8+0RBACMhYuXdcDegppIKcMEeXZi87ChQbj+MZkdQdVdRTlfzs7GlscWL1tOB3Up OIHPtEkTp8NM1V093dMcpz1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DUXZuJt4NewPurc1zRXqFnBuLP7r+t8UsCxerexoeUOQ3A4WWwR0PUQGJoI1bF3EseS7yywU KRLkWfqRi5qZWBZmexMOdyMiTd4+bqKrzT/J/7pXX87B84iqXbPm7RKQCQdxTbR3CwMbi5jz hdG1MsBmkgZ/ntNOEG4PLp3f4kzgLrD4mP40cANv4YV22H9vefEE7Z3KqDvH7ObpOpSfMJks QvyPSnIr8YZcpPWhyOxDBWR7MmJN1ffSYs4KFshruaA/9fZfFgU906rlGQ116KyBplS1z8aj HVdQ0zFWAQ779TQSmlOISQQYEQIACQUCQi3z/QIbDAAKCRBpM8hPnu8vqS+zAJ9bcTKdIkhS iUSXPsNcpudm+QS6TwCfWpIKOyQENBso+FUELB/x5pjz0Ko= Subject: Re: how do I know a subvolume is a snapshot? Message-ID: <1858db2d-8683-0ba9-cc13-9e654a1fa810@allchangeplease.de> Date: Wed, 17 Jul 2019 09:45:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190716232456.GA26411@tik.uni-stuttgart.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: de-DE Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Am 17.07.2019 um 01:24 schrieb Ulli Horlacher: > How do I know that /mnt/tmp/ss is a snapshot? > I cannot see a snapshot identifier. >From the btrfs-subvolume man page: >       A snapshot is a subvolume like any other, with given initial content. By default, snapshots are created >       read-write. File modifications in a snapshot do not affect the files in the original subvolume. I believe the usual practice is to create snapshots with the -r flag and follow some naming convention (e.g. place them in a common .snapshots folder named by date), but you're free to switch between read-only and read-write mode for a snapshot at any time using the btrfs property command. That allows for some intereresting feats: e.g. there's no guarantee that a (now) read-only snapshot actually reflects the source's state at creation time (if someone modified it and re-applied the ro flag). On the other hand, reverting to a snapshotted state may be as easy as making the snapshot rw and changing the mount options to use it's subvolid - no need to copy any files back and forth. If there is a specific reason why you want to discern snapshots from other subvolumes (verification/auditing/forensics?), maybe you can get help here by elaborating further on that. Bernhard Kühnel