From: "Stefan G. Weichinger" <lists@xunil.at>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] resizing EFI partition, btrfs context
Date: Tue, 6 Oct 2015 14:50:04 +0200 [thread overview]
Message-ID: <5613C37C.5070008@xunil.at> (raw)
In-Reply-To: <CAGfcS_mds-j9wnxFXWt=g_cSaeZbcY8i8hGUgriCxT+_tvKcAA@mail.gmail.com>
Am 2015-10-06 um 14:32 schrieb Rich Freeman:
> On Tue, Oct 6, 2015 at 3:52 AM, Stefan G. Weichinger <lists@xunil.at> wrote:
>> Am 2015-10-06 um 09:45 schrieb Neil Bothwick:
>>> On Tue, 6 Oct 2015 09:35:40 +0200, Stefan G. Weichinger wrote:
>>>
>>>>> How about btrfs send/receive? I've never used them but used
>>>>> the equivalent with ZFS and it was simple to do.
>>>>
>>>> I think "btrfs-replace" is my friend. Will try that later.
>>>
>>> If you want to keep the system live, replace will do the trick, but
>>> when I tried it to replace a drive that was showing SMART errors it
>>> was VERY slow. btrfs send serialises your whole filesystem to a
>>> file so it should be much faster.
>>
>> btrfs send would also have the benefit that I won't lose the
>> source-dev in the process. btrfs-replace would "empty" my hdd, if then
>> things fail I don't have that backup again to start from.
>>
>> I just have to find out how to keep the UUID to keep the copy booting etc
>>
>> I will try that later this day, after some job work.
>>
>
> I doubt send/receive would preserve the UUID.
>
> I'd probably use btrfs-replace.
>
> If you do want to keep the same UUID via any mechanism make sure the
> original drive isn't visible or btrfs may try to use it instead of the
> new one. That is more of a concern in raid configs, but it might
> apply to single volume. Btrfs can't tell the difference between the
> active volume you unmounted yesterday and the lvm snapshot of it from
> six months ago, and will potentially try to mix-and-match them
> resulting in carnage.
>
> Btrfs does support resizing if you just want to shrink the filesystem
> and then dd it over to the new partition. Just make sure the old one
> isn't attached when you try to mount it. Just shrink your btrfs
> partition down to a size smaller than where it is going, use dd to
> copy it, then you can run btrfs resize to expand it back to the full
> size. The syntax is slightly different but it works the same as
> resize2fs, and I believe it works either online or offline.
>
> However, if you're able to figure out how to use btrfs and migrate it
> from one drive to another, you could probably just edit the UUID in
> your grub config if necessary. It just takes a text editor, and maybe
> a run of grub2-mkconfig if you're using that. You'll also want to
> update your fstab, and if you're using dracut you should update that
> as well (as long as it gets a decent UUID from the command line I
> think it will figure things out on its own though - dracut saves a
> copy of your fstab to help find things when you build it but then it
> will remount filesystems using the real fstab before it finishes).
I do a plain rsync into a new btrfs on the ssd now and edited the UUID
within copied gummiboat loader entries .... some GBs left to sync before
I can test booting!
;)
I don't use grub2 anymore, just gummiboot .. and even this might be
replaced by bootctl soon. step by step, you know.
next prev parent reply other threads:[~2015-10-06 12:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 21:36 [gentoo-user] resizing EFI partition, btrfs context Stefan G. Weichinger
2015-10-06 0:47 ` Jc García
2015-10-06 7:16 ` Stefan G. Weichinger
2015-10-06 7:28 ` Neil Bothwick
2015-10-06 7:35 ` Stefan G. Weichinger
2015-10-06 7:45 ` Neil Bothwick
2015-10-06 7:52 ` Stefan G. Weichinger
2015-10-06 8:05 ` Neil Bothwick
2015-10-06 8:09 ` Stefan G. Weichinger
2015-10-06 11:59 ` Neil Bothwick
2015-10-06 12:32 ` Rich Freeman
2015-10-06 12:50 ` Stefan G. Weichinger [this message]
2015-10-06 13:00 ` Stefan G. Weichinger
2015-10-06 17:33 ` [gentoo-user] [solved] " Stefan G. Weichinger
2015-10-06 17:51 ` Neil Bothwick
2015-10-06 17:59 ` Stefan G. Weichinger
2015-10-06 18:15 ` Stefan G. Weichinger
2015-10-06 20:40 ` Neil Bothwick
2015-10-06 20:45 ` Stefan G. Weichinger
2015-10-06 20:37 ` Neil Bothwick
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=5613C37C.5070008@xunil.at \
--to=lists@xunil.at \
--cc=gentoo-user@lists.gentoo.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