All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: John Ettedgui <john.ettedgui@gmail.com>
Cc: Qu Wenruo <quwenruo@cn.fujitsu.com>, btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: mount btrfs takes 30 minutes, btrfs check runs out of memory
Date: Wed, 5 Aug 2015 07:30:37 -0400	[thread overview]
Message-ID: <55C1F3DD.7020603@gmail.com> (raw)
In-Reply-To: <CAJ3TwYQgm2f4SQFOO_vgGLP0V71q+oesbjFxTjhEJnrXYLe4fQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2982 bytes --]

On 2015-08-04 13:36, John Ettedgui wrote:
> On Tue, Aug 4, 2015 at 4:28 AM, Austin S Hemmelgarn
> <ahferroin7@gmail.com> wrote:
>> On 2015-08-04 00:58, John Ettedgui wrote:
>>>
>>> On Mon, Aug 3, 2015 at 8:01 PM, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote:
>>>>
>>>> Although the best practice is staying away from such converted fs, either
>>>> using pure, newly created btrfs, or convert back to ext* before any
>>>> balance.
>>>>
>>> Unfortunately I don't have enough hard drive space to do a clean
>>> btrfs, so my only way to use btrfs for that partition was a
>>> conversion.
>>
>> If you could get your hands on a decent sized flash drive (32G or more), you
>> could do an incremental conversion offline.  The steps would look something
>> like this:
>>
>> 1. Boot the system into a LiveCD or something similar that doesn't need to
>> run from your regular root partition (SystemRescueCD would be my personal
>> recommendation, although if you go that way, make sure to boot the
>> alternative kernel, as it's a lot newer then the standard ones).
>> 2. Plug in the flash drive, format it as BTRFS.
>> 3. Mount both your old partition and the flash drive somewhere.
>> 4. Start copying files from the old partition to the flash drive.
>> 5. When you hit ENOSPC on the flash drive, unmount the old partition, shrink
>> it down to the minimum size possible, and create a new partition in the free
>> space produced by doing so.
>> 6. Add the new partition to the BTRFS filesystem on the flash drive.
>> 7. Repeat steps 4-6 until you have copied everything.
>> 8. Wipe the old partition, and add it to the BTRFS filesystem.
>> 9. Run a full balance on the new BTRFS filesystem.
>> 10. Delete the partition from step 5 that is closest to the old partition
>> (via btrfs device delete), then resize the old partition to fill the space
>> that the deleted partition took up.
>> 11. Repeat steps 9-10 until the only remaining partitions in the new BTRFS
>> filesystem are the old one and the flash drive.
>> 12. Delete the flash drive from the BTRFS filesystem.
>>
>> This takes some time and coordination, but it does work reliably as long as
>> you are careful (I've done it before on multiple systems).
>>
>>
> I suppose I could do that even without the flash as I have some free
> space anyway, but moving Tbs of data with Gbs of free space will take
> days, plus the repartitioning. It'd probably be easier to start with a
> 1Tb drive or something.
> Is this currently my best bet as conversion is not as good as I thought?
>
> I believe my other 2 partitions also come from conversion, though I
> may have rebuilt them later from scratch.
>
> Thank you!
> John
>
Yeah, you're probably better off getting a TB disk and starting with 
that.  In theory it is possible to automate the process, but I would 
advise against that if at all possible, it's a lot easier to recover 
from an error if you're doing it manually.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  reply	other threads:[~2015-08-05 11:30 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJ3TwYQXqUZiKhYc5rciTmvGX1RLkHnkQb5SSYAJ7AD+kbudag@mail.gmail.com>
2015-07-31  2:34 ` mount btrfs takes 30 minutes, btrfs check runs out of memory Qu Wenruo
2015-07-31  4:10   ` John Ettedgui
2015-08-02  5:44     ` Georgi Georgiev
     [not found]   ` <CAJ3TwYRN+1tJY+paz=qZT0_XP=r9CcTKbBgX_kZRFOWj8vSK=w@mail.gmail.com>
2015-07-31  4:52     ` Qu Wenruo
     [not found]       ` <CAJ3TwYR5g-JhjmGnZUXqLXc7qV1_=AN5_6sj54JQODbtgG9Aag@mail.gmail.com>
2015-07-31  5:40         ` Qu Wenruo
2015-07-31  5:45           ` John Ettedgui
2015-08-01  4:35             ` John Ettedgui
2015-08-01 10:05               ` Russell Coker
2015-08-04  1:39               ` Qu Wenruo
2015-08-04  1:55                 ` John Ettedgui
2015-08-04  2:31                   ` John Ettedgui
2015-08-04  3:01                   ` Qu Wenruo
2015-08-04  4:58                     ` John Ettedgui
2015-08-04  6:47                       ` Duncan
2015-08-04 11:28                       ` Austin S Hemmelgarn
2015-08-04 17:36                         ` John Ettedgui
2015-08-05 11:30                           ` Austin S Hemmelgarn [this message]
2015-08-13 22:38                             ` Vincent Olivier
2015-08-13 23:19                               ` Chris Murphy
2015-08-14  0:30                                 ` Duncan
2015-08-14  2:42                                   ` Vincent Olivier
2015-08-18 17:36                                     ` Vincent Olivier
2015-08-14  2:39                                 ` Vincent Olivier
     [not found]                             ` <CAJ3TwYSW+SvbBrh1u_x+c3HTRx03qSR6BoH5cj_VzCXxZYv6EA@mail.gmail.com>
2016-07-15  3:56                               ` Qu Wenruo
     [not found]                                 ` <CAJ3TwYRXwDVVfT0TRRiM9dEw-7TvY8qG=WvMYKczZOv6wkFWAQ@mail.gmail.com>
2016-07-15  5:24                                   ` Qu Wenruo
2016-07-15  6:56                                     ` Kai Krakow
     [not found]                                     ` <CAJ3TwYSTnQfj=qmBLtnmtXQKexMMD4x=9Gk3p3anf4uF+G26kw@mail.gmail.com>
     [not found]                                       ` <CAJ3TwYTnMPVwkrZEU-=Q_Nq+9Bn0vM3z+EFC8RP=RTyaufSoqw@mail.gmail.com>
2016-07-18  1:13                                         ` Qu Wenruo
     [not found]                                           ` <CAJ3TwYRpc_R-wVur0T6+Uy_aPVXTGpvp_ag1Ar9K2HoB0H1ySQ@mail.gmail.com>
2016-07-18  8:41                                             ` Qu Wenruo
     [not found]                                               ` <CAJ3TwYRH8JVkuv2Hu7FYb+BSwKGrq1spx079zwOF_FO1y=9NFA@mail.gmail.com>
2016-07-18  9:07                                                 ` Qu Wenruo
2016-07-18 15:31                                                   ` Duncan
     [not found]                                                   ` <CAJ3TwYS6UTkWf=PNku3RG7hPrXMKz3yhk2WqCRLix4v_VwgrmA@mail.gmail.com>
2016-07-21  8:10                                                     ` Qu Wenruo
     [not found]                                                       ` <CAJ3TwYQ47SVpbO1Pb-TWjhaTCCpMFFmijwTgmV8=7+1_a6_3Ww@mail.gmail.com>
2016-07-21  8:19                                                         ` Qu Wenruo
2016-07-21 15:47                                                           ` Graham Cobb
2017-04-10  0:52                                                             ` Qu Wenruo
2018-02-13 10:21                                                           ` John Ettedgui
2018-02-13 11:04                                                             ` Qu Wenruo
2018-02-13 11:25                                                               ` John Ettedgui
2018-02-13 11:40                                                                 ` Qu Wenruo
2018-02-13 12:06                                                                   ` John Ettedgui
2018-02-13 12:46                                                                     ` Qu Wenruo
2018-02-13 12:52                                                                       ` John Ettedgui
2018-02-13 12:26                                                                   ` Holger Hoffstätte
2018-02-13 12:54                                                                     ` Qu Wenruo
2018-02-13 16:24                                                                       ` Holger Hoffstätte
2018-02-14  0:43                                                                         ` Qu Wenruo
2016-07-15 11:29                                 ` Christian Rohmann
2016-07-16 23:53                                   ` Qu Wenruo
2016-07-18 13:42                                     ` Josef Bacik
2016-07-19  0:35                                       ` Qu Wenruo
2016-07-25 13:01                                       ` David Sterba
2016-07-25 13:38                                         ` Josef Bacik
2015-08-04 14:38                     ` Chris Murphy
2015-07-29  5:46 Georgi Georgiev
2015-07-29  6:19 ` Qu Wenruo

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=55C1F3DD.7020603@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=john.ettedgui@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.