From: Christoph Anton Mitterer <calestyo@scientia.net>
To: Hugo Mills <hugo@carfax.org.uk>
Cc: Duncan <1i5t5.duncan@cox.net>, linux-btrfs@vger.kernel.org
Subject: Re: subvols and parents - how?
Date: Wed, 25 Nov 2015 00:38:27 +0100 [thread overview]
Message-ID: <1448408307.21291.116.camel@scientia.net> (raw)
In-Reply-To: <20151124233000.GX24333@carfax.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]
On Tue, 2015-11-24 at 23:30 +0000, Hugo Mills wrote:
> Yes, that makes sense.
Feel free to shamelessly use my idea (as well as the one to call btrfs'
RAID1 replica2 or something else)
:-O
> With a recent mv
root@heisenberg:/mnt# mv --version
mv (GNU coreutils) 8.23
=> not recent enough...
> but I think you'll find that the UUID of the subvols changes. (At
> least, I hope it does. If it doesn't, then my mental model of what
> the FS is doing is *really* screwed up).
Well... see below:
root@heisenberg:~# truncate -s 2G image
root@heisenberg:~# losetup -f image
root@heisenberg:~# mkfs.btrfs /dev/loop0
btrfs-progs v4.3
See http://btrfs.wiki.kernel.org for more information.
Performing full device TRIM (2.00GiB) ...
Label: (null)
UUID: 10e1a55c-448a-4f37-ae5c-6a7801a7f202
Node size: 16384
Sector size: 4096
Filesystem size: 2.00GiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 110.38MiB
System: DUP 12.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Number of devices: 1
Devices:
ID SIZE PATH
1 2.00GiB /dev/loop0
root@heisenberg:~# mount /dev/loop0 /mnt/
root@heisenberg:/mnt# btrfs subvolume create root
Create subvolume './root'
root@heisenberg:/mnt# btrfs subvolume create below-top
Create subvolume './below-top'
root@heisenberg:/mnt# cd root/
root@heisenberg:/mnt/root# btrfs subvolume create below-root
Create subvolume './below-root'
root@heisenberg:/mnt# btrfs subvolume list /mnt/ -pacguqt
ID gen cgen parent top level parent_uuid uuid path
-- --- ---- ------ --------- ----------- ---- ----
257 9 7 5 5 - 8fbf521e-77f9-0d49-9891-87767f98c655 root
258 8 8 5 5 - b49131e9-4207-aa42-8195-c50de5f06136 below-top
259 9 9 257 257 - 20c042be-ead8-204a-a684-94c1a770e739 <FS_TREE>/root/below-root
root@heisenberg:/mnt# mv root/below-root/ tmp
root@heisenberg:/mnt# mv below-top/ root/
root@heisenberg:/mnt# mv tmp/ below-root
root@heisenberg:/mnt# btrfs subvolume list /mnt/ -pacguqt
ID gen cgen parent top level parent_uuid uuid path
-- --- ---- ------ --------- ----------- ---- ----
257 9 7 5 5 - 8fbf521e-77f9-0d49-9891-87767f98c655 root
258 8 8 257 257 - b49131e9-4207-aa42-8195-c50de5f06136 <FS_TREE>/root/below-top
259 9 9 5 5 - 20c042be-ead8-204a-a684-94c1a770e739 below-root
root@heisenberg:/mnt#
So the UUIDs seem to stay the same (or are these other UUIDs?)
Hope I haven't ruined your day now ;-)
Cheers,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]
next prev parent reply other threads:[~2015-11-24 23:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 4:56 subvols and parents - how? Christoph Anton Mitterer
2015-11-24 8:29 ` Duncan
2015-11-24 21:25 ` Christoph Anton Mitterer
2015-11-24 21:55 ` Hugo Mills
2015-11-24 23:20 ` Christoph Anton Mitterer
2015-11-24 23:30 ` Hugo Mills
2015-11-24 23:38 ` Christoph Anton Mitterer [this message]
2015-11-27 1:02 ` Duncan
2015-12-09 4:36 ` Christoph Anton Mitterer
2015-12-09 10:53 ` Duncan
2015-12-09 19:04 ` Austin S Hemmelgarn
2015-12-10 3:56 ` Duncan
2015-12-10 12:31 ` Austin S Hemmelgarn
2015-12-12 19:58 ` Christoph Anton Mitterer
2015-11-27 2:02 ` Duncan
2015-12-09 4:38 ` Christoph Anton Mitterer
2015-12-09 11:26 ` Duncan
2015-12-10 21:13 ` subvols, ro- and bind mounts " Christoph Anton Mitterer
2015-12-10 22:36 ` S.J.
2015-12-10 23:41 ` Christoph Anton Mitterer
2015-12-11 2:32 ` Chris Murphy
2015-12-12 20:27 ` Christoph Anton Mitterer
2015-12-12 2:32 ` subvols and parents " Christoph Anton Mitterer
2015-12-12 3:07 ` Christoph Anton Mitterer
2015-12-12 10:20 ` Duncan
2015-12-09 14:49 ` Axel Burri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448408307.21291.116.camel@scientia.net \
--to=calestyo@scientia.net \
--cc=1i5t5.duncan@cox.net \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).