From: John Center <jlcenter15@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Hugo Mills <hugo@carfax.org.uk>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: How to convert a directory to a subvolume
Date: Mon, 2 May 2022 14:51:48 -0400 [thread overview]
Message-ID: <d0f9265f-24d0-f6a4-b502-a3ecd7f33e16@gmail.com> (raw)
In-Reply-To: <CAJCQCtSAHj78aY_uUhYrnZSshLs=YtMet6uoESTyA1ZgKvqMBw@mail.gmail.com>
root@Mariposa:/# mount | grep btrfs
/dev/sda3 on / type btrfs
(rw,relatime,space_cache=v2,autodefrag,subvolid=256,subvol=/@)
/dev/sda3 on /home type btrfs
(rw,relatime,space_cache=v2,autodefrag,subvolid=257,subvol=/@home)
/dev/sda3 on /opt type btrfs
(rw,relatime,space_cache=v2,autodefrag,subvolid=268,subvol=/@opt)
Thanks, Hugo & Chris!
-John
On 5/2/22 12:15 PM, Chris Murphy wrote:
> On Mon, May 2, 2022 at 11:37 AM John Center <jlcenter15@gmail.com> wrote:
>> Hi Chris,
>>
>> Thanks for responding! Well, I made some progress:
>>
>> root@Mariposa:/# mount /dev/sda3 /mnt
>>
>> root@Mariposa:/# btrfs subvolume create /mnt/@opt
>> Create subvolume '/mnt/@opt'
>>
>> root@Mariposa:/# btrfs subvolume list /
>> ID 256 gen 11732 top level 5 path @
>> ID 257 gen 11733 top level 5 path @home
>> ID 268 gen 11733 top level 5 path @opt
>>
>> Once I unmounted /mnt, I had to create the /opt directory again:
>>
>> root@Mariposa:/# umount /mnt
>>
>> root@Mariposa:/# mkdir opt
>>
>> Then I mounted /opt & it didn't complain:
>>
>> root@Mariposa:/# mount /opt
>> root@Mariposa:/# btrfs subvolume list /
>> ID 256 gen 11751 top level 5 path @
>> ID 257 gen 11751 top level 5 path @home
>> ID 268 gen 11733 top level 5 path @opt
>>
>> So, is this correct?
> Looks correct. You need to include something like 'mount | grep btrfs'
> to know for sure, that should show subvol and subvolid for each mount
> point.
>
>
>
>> It would have been good if there was a direct way
>> to add the level that you wanted the subvolume created & mounted with
>> the btrfs command. So if I take a snapshot of @, /opt won't be
>> included?
> Btrfs snapshots via the btrfs-progs CLI tool are not recursive. So
> whether the subvolumes are arranged in a nested or flat layout doesn't
> matter. There is a non-atomic recursive snapshot (create and remove)
> option in libbtrfs both for C API and Python bindings.
>
>
>> That'd my goal. I've been using btrfs at a very basic level,
>> added on top of an md raid1. It worked well for a number of years, but
>> then I needed to replace the disks, I thought I'd go all in on btrfs.
>>
>
next prev parent reply other threads:[~2022-05-02 18:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 20:08 How to convert a directory to a subvolume John Center
2022-04-30 20:14 ` Hugo Mills
2022-05-02 0:02 ` John Center
2022-05-02 13:16 ` Chris Murphy
2022-05-02 15:37 ` John Center
2022-05-02 16:15 ` Chris Murphy
2022-05-02 18:51 ` John Center [this message]
2022-05-01 5:05 ` Chris Murphy
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=d0f9265f-24d0-f6a4-b502-a3ecd7f33e16@gmail.com \
--to=jlcenter15@gmail.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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