From: Justus Seifert <justus.seifert@dergleichrichter.de>
To: Neal Becker <ndbecker2@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: [newb] move /home to subvolume
Date: Mon, 01 Jun 2015 15:57:56 +0200 [thread overview]
Message-ID: <556C64E4.9070101@dergleichrichter.de> (raw)
In-Reply-To: <mkhl70$fnu$1@ger.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1827 bytes --]
On 01.06.2015 15:03, Neal Becker wrote:
> So I think what I need to do is:
>
> 1. boot off some rescue media
> 2. mount the target btrfs volume (e.g., /mnt/sysimage/root)
> 3. mv exising home (mv /mnt/sysimage/home /mnt/sysimage/oldhome)
> 4. create new subvolume (btrfs subvolume create /mnt/sysimage/home)
> 5. move all the files from /mnt/sysimage/oldhome /mnt/sysimage/home - not
> sure easiest way to do this step
> 6. edit /mnt/sysimage/etc/fstab to mount new /home
>
> I have another machine, setup more or less this way:
> UUID=7246327b-1905-4fe2-9b6b-b9376017264f / btrfs
> subvolid=5,subvol=root00 0 0
> UUID=2c04be93-34c1-4016-ba41-60fd9fd90616 /boot ext4
> defaults 1 2
> UUID=7246327b-1905-4fe2-9b6b-b9376017264f /home btrfs
> subvol=home 0 0
>
>
>
> Vytautas D wrote:
>
>> as far as I know, you can't do this, you need to temporary move /home
>> somewhere else, create /home subvolume and copy everything back.
>>
>> -
>> Vytas
>>
>> On Mon, Jun 1, 2015 at 1:36 PM, Neal Becker <ndbecker2@gmail.com> wrote:
>>> I have everything under /:
>>>
>>> sudo btrfs subvolume list /
>>> ID 257 gen 65795 top level 5 path root
>>>
>>> I want to move /home onto it's own subvolume. I hope I can do this while
>>> the root device is mounted.
>>>
>>> What is the procedure?
>>>
>>> I tried first to create a subvolume for /home at the top-level, but
>>> couldn't figure out the syntax:
>>>
>>> [nbecker@nbecker2 ~]$ sudo btrfs subvolume create /home
>>> [sudo] password for nbecker:
>>> ERROR: '/home' exists
>>>
i think you can speed up step 5 there by not using mv but cp
--reflink=auto and deleting the old copy once you are done. reflinks
are shared between subvolumes.
justus
[-- Attachment #1.2: justus_seifert.vcf --]
[-- Type: text/x-vcard, Size: 181 bytes --]
begin:vcard
fn:Justus Seifert
n:Seifert;Justus
adr:;;;Dresden;Saxony;;Germany
email;internet:justus.seifert@dergleichrichter.de
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-01 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 12:36 [newb] move /home to subvolume Neal Becker
2015-06-01 12:57 ` Vytautas D
2015-06-01 13:03 ` Neal Becker
2015-06-01 13:57 ` Justus Seifert [this message]
2015-06-01 14:09 ` Austin S Hemmelgarn
2015-06-01 18:18 ` Chris Murphy
[not found] ` <CAG3t+pEHqATjGFUQrLn__O5-ByW4oX6MWjQiYh9GpgfqdKKiyg@mail.gmail.com>
2015-06-01 19:13 ` Chris Murphy
2015-06-01 23:03 ` Neal Becker
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=556C64E4.9070101@dergleichrichter.de \
--to=justus.seifert@dergleichrichter.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=ndbecker2@gmail.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