LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-23-2022, 01:14 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Transition from ext4 to btrfs


I am re-writing from scratch the "manual" mode of the Slint installer, which until now uses "setup" and associated scripts from the Slackware installer with some adaptations, and plan to provide it for Slint 15 which I hope to release one month or so after Slackware 15.

In this manual (or expert) mode I will allow (not propose) to set up separate partitions for /home, /var, /usr/local, /opt and /tmp and propose for these (if not yet populated, but in case of /tmp) to format them if not yet done using one of the file systems btrfs, ext4, f2fs, or xfs.

In a further (not the next) version of the installer I also consider making btrfs the default in "auto" mode (instead of ext4 generally, or f2fs for some flash devices) as already do recent versions of Fedora and OpenSUSE.

In anticipation, my question is: I know that it is technically possible to convert an ext4 file system to btrfs, but if, say, user has chosen separate partitions for the directories listed below, will it be possible after having converting them to btrfs if needed, to convert the content of these directories to btrfs subvolumes?

Any clue, caveat and information appreciated, especially from folks having related experience.

Last edited by Didier Spaier; 01-23-2022 at 02:12 PM.
 
Old 01-23-2022, 10:33 PM   #2
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 270

Rep: Reputation: Disabled
From developer perspective I would not touch *converting* from one filesystem to another during installation because the risk of unrecoverable data due from unmanaged event(s).

Context: I was even paranoid during ext3 -> ext4
 
1 members found this post helpful.
Old 01-24-2022, 12:24 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lazardo View Post
From developer perspective I would not touch *converting* from one filesystem to another during installation because the risk of unrecoverable data due from unmanaged event(s).

Context: I was even paranoid during ext3 -> ext4
Thanks for giving me an occasion to clarify: I certainly do not intend to make this a feature of the installer. What I want is to be able to provide sound good information and advice to users interested to do that themselves.
 
1 members found this post helpful.
Old 01-24-2022, 05:15 PM   #4
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 773

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
I've just read latest kernel log... there are some 20 btrfs bugfixes...

And even some ext4 fixes ffs!
 
Old 01-28-2022, 02:59 PM   #5
hpfeil
Member
 
Registered: Nov 2010
Location: Tucson, Arizona US
Distribution: Slackware Current
Posts: 354
Blog Entries: 1

Rep: Reputation: Disabled
I use ext4 on mechanical drives because ext4 can keep a bad-sectors list and avoids using them. I use btrfs on my SDD drives because error bits are remapped by firmware. I got bit on btrfs when a laptop drive started throwing bad sectors. Had to reformat to ext4 and restore a recent backup. I create the EFI and slackware partitions using usbboot.img on a thumb drive, then tell setup to use existing partitions. It is a simple matter to re-organize the filesystem after install once the system is up and running. Why confuse folks with a more elaborate setup fraught with possible input errors?
 
Old 01-28-2022, 03:15 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hpfeil View Post
I use ext4 on mechanical drives because ext4 can keep a bad-sectors list and avoids using them. I use btrfs on my SDD drives because error bits are remapped by firmware. I got bit on btrfs when a laptop drive started throwing bad sectors. Had to reformat to ext4 and restore a recent backup. I create the EFI and slackware partitions using usbboot.img on a thumb drive, then tell setup to use existing partitions. It is a simple matter to re-organize the filesystem after install once the system is up and running. Why confuse folks with a more elaborate setup fraught with possible input errors?
This doesn't answer my request for advice. That you do not need or want to use btrfs does not imply that no one does. In case you do not know the distinctive features of btrfs, have a look here.

tl;dr: to "how-to?", "don't" is not an useful answer.

Last edited by Didier Spaier; 01-28-2022 at 03:48 PM.
 
Old 01-28-2022, 04:01 PM   #7
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 905

Rep: Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694
Quote:
Originally Posted by Didier Spaier View Post
I know that it is technically possible to convert an ext4 file system to btrfs, but if, say, user has chosen separate partitions for the directories listed below, will it be possible after having converting them to btrfs if needed, to convert the content of these directories to btrfs subvolumes?

Any clue, caveat and information appreciated, especially from folks having related experience.
I just started using btrfs for my data partition (with multiple disks as the backing store), so am by no means an expert.

However, to answer your question: I'm pretty sure no. It is possible to have multiple disks be combined into 1 btrfs filesystem that then has multiple subvolumes, but I don't think you can transition the way you describe. Most (all?) of what I know is from these articles:

https://btrfs.wiki.kernel.org/index.php/Getting_started
https://btrfs.wiki.kernel.org/index....ide#Subvolumes
https://btrfs.wiki.kernel.org/index....ltiple_Devices

I actually haven't read this one, but Arch usually has really good documentation:
https://wiki.archlinux.org/title/Btrfs#Subvolumes

... however, if there is enough disk space on one of the disks maybe you could make it work. Create subvolumes on just that disk, copy everything to it, and then add the remaining disks to that btrfs file system:
https://btrfs.wiki.kernel.org/index....ng_new_devices
But that's basically the "restore from backup" method, which I don't think is what you're after.

When dealing with multiple disks be aware of the problem with RAID on SMR drives:
https://raid.wiki.kernel.org/index.php/Timeout_Mismatch
This one bit me. I tried having RAID5 on top of my multiple disks, and had occasional corruption. Finally found the above article, reconfigured to btrfs sitting on top of the raw disks (no RAID, just btrfs utilizing all the combined disk space) and haven't had problems since.

I think your question is worthy of the mailing list:
https://btrfs.wiki.kernel.org/index....s_mailing_list
 
2 members found this post helpful.
Old 01-28-2022, 04:12 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
Thanks for the hints and the links, drumz. More reading ahead.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] btrfs raid10 on bare drives or mdadm raid10 + ext4, btrfs, or xfs enyawix Linux - Server 5 09-20-2021 03:16 PM
btrfs filesystem df /mnt/btrfs/ shows bothe data and metdata with raid1 and single. gonus Linux - Software 3 07-17-2014 02:48 PM
LXer: Rollback To A Working State With btrfs + apt-btrfs-snapshot On Ubuntu 12.10 LXer Syndicated Linux News 0 11-25-2012 10:42 AM
ext4 vs btrfs, and with btrfs do I still need to use LVM? blue_k Linux - Software 4 08-17-2012 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:32 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