Re: mount btrfs takes 30 minutes, btrfs check runs out of memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 4, 2015 at 4:28 AM, Austin S Hemmelgarn
<ahferroin7@xxxxxxxxx> wrote:
> On 2015-08-04 00:58, John Ettedgui wrote:
>>
>> On Mon, Aug 3, 2015 at 8:01 PM, Qu Wenruo <quwenruo@xxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux