LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-05-2020, 08:01 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Rep: Reputation: 110Reputation: 110
How to migrate/convert a file system to btrfs subvolumes?


Debian lets you format the HD as btrfs at the installation stage, but of course it then creates the entire posix tree as directories, not subvolumes. The Debian installer does not offer any option to create btrfs subvolumes.

Assuming I already have a system running on btrfs, is it possible to migrate the whole thing to subvolumes, including /etc, /usr, /tmp etc?

What about the very top of the tree, so I can have snapshots of the entire tree? Is that possible?

TIA
 
Old 10-05-2020, 03:47 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,011

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
The usual way is to create what you need on another distro and then try to install over with other distro.

"The DebianInstaller can format and install to single-disk Btrfs volumes, but does not yet support multi-disk btrfs volumes nor subvolume creation (Bug #686097). Daniel Pocock has a good article on how to Install Debian wheezy and jessie directly with btrfs RAID1; however, strictly speaking it showcases Btrfs' integrated multi-device flexibility. eg: Install to a single disk, add a second disk to the volume, rebalance while converting all data and metadata to raid1 profile. "

This is the page you need to start at and follow the few links. https://wiki.debian.org/Btrfs

You are trading a fully supported ext4 filesystem for an almost fully supported filesystem. I'd say one ought to consider using the default filesystem at least for the basic distro install and then use things like zfs,btrfs and such for data.

Last edited by jefro; 10-05-2020 at 03:49 PM.
 
Old 10-05-2020, 08:40 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by jefro View Post
I'd say one ought to consider using the default filesystem at least for the basic distro install and then use things like zfs,btrfs and such for data.
Sorry for the tangent, but arguably your data is valuable, whereas the operating system can be recreated quickly. Thus my opinion is the opposite: Put root on BTRFS, and keep your data on a robust, well-tested filesystem. That's how OpenSUSE does it, too. It has the additional advantage that you can use subvolume snapshots to quickly go back to a previous operating system version after a failed update.
 
1 members found this post helpful.
Old 10-05-2020, 10:38 PM   #4
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by berndbausch View Post
Sorry for the tangent, but arguably your data is valuable, whereas the operating system can be recreated quickly.
I agree on that wholeheartedly. However, BTRFS is stable enough. I've been using it for two and a half years without a hitch, in spite of prolonged abuse. I had to use for months an application that caused my system to freeze and forced me to hard reset the machine many times. Never lost a file. I lost a few files on two occasions of hard reset with ext3 about 10 years ago. I'd rather rely on backups than on file system stability, and the snapshot feature is useful.
 
Old 10-05-2020, 11:42 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,148

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
I've been using it for well over twice as long. Almost exclusively for my photos - and I couldn't work without snapshot. For general system usage I still think the promise is better than the reality. Look at the contortions snapper (and hence opensuse) goes to - boot roll-backs after an (system) update certainly has appeal.

As for moving to all subvolumes, see the opensuse or Arch doco - not sure how it will co-operate with the Debian mindset tho'.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot seem to NFS mount Btrfs subvolumes rnturn Linux - Server 4 04-06-2018 05:04 AM
[bug?] Using generic kernel fails when using btrfs subvolumes in 14.2 moesasji Slackware 10 05-30-2017 06:48 AM
[SOLVED] which btrfs / subvolumes mixed with ext4 are needed? JZL240I-U Linux - Software 2 01-13-2015 01:22 AM
LXer: How to Manage Btrfs Storage Pools, Subvolumes And Snapshots on Linux (part 1) LXer Syndicated Linux News 0 03-21-2014 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration