{"id":12635,"date":"2025-11-25T01:01:00","date_gmt":"2025-11-25T06:01:00","guid":{"rendered":"https:\/\/www.both.org\/?p=12635"},"modified":"2026-01-20T13:26:44","modified_gmt":"2026-01-20T18:26:44","slug":"converting-to-btrfs-episode-3","status":"publish","type":"post","link":"http:\/\/www.both.org\/?p=12635","title":{"rendered":"Converting to BtrFS &#8212; Episode 3"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"12635\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p>Today &#8212; after running some tests on my newly installed Fedora 43 system using BtrFS &#8212; I decided that everything seemed to be working well enough that I&#8217;d try to migrate the LVM\/EXT4 filesystem I use to store and share my personal pictures with the other hosts on my home lab network. <\/p>\n\n\n\n<p>Unfortunately I think there was a problem with an unfinished update. The system wouldn&#8217;t boot into either of the first 2 kernels available in the GRUB menu. It did boot into the third, however I was reluctant to continue my test conversion to BtrFS with a compromised system. Nor did I want to spend a lot of time trying to resolve the boot issues &#8212; and the possibility that there might be other, deeper ones.<\/p>\n\n\n\n<p>So I reinstalled the Fedora 43 Xfce spin and used my personal tools to install all of the packages and tools I use, as well as to make several interesting configuration mods to the system. I then ensured that I have a current backup of my pictures; and I do.<\/p>\n\n\n\n<p>I thought about wiping out the drive I store my pictures on but decided that I might as well try the in-place conversion tool, <strong>btrfs-convert<\/strong>, which is supposed to convert EXT filesystems to BtrFS.<\/p>\n\n\n\n<p>I first unmounted the filesystem, and then followed the recommended procedure by running the <strong>fsck<\/strong> utility against it. That&#8217;s supposed to ensure that the filesystem is in a consistent state before starting the conversion.<\/p>\n\n\n\n<p>Then I ran the following command to perform the actual conversion. I didn&#8217;t use any of the options available for this command because most of them seem to be for unique or edge cases. I figured I&#8217;d go simple to start and if there were problems I could check out the options. But the conversion went well as you can see.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#<strong> btrfs-convert \/dev\/mapper\/vg02-Pictures<\/strong>\nbtrfs-convert from btrfs-progs v6.17.1\n\nSource filesystem:\nType:           ext2\nLabel:\nBlocksize:      4096\nUUID:           2a7ab07d-582d-4a1f-a001-53086c8dd045\nTarget filesystem:\nLabel:\nBlocksize:      4096\nNodesize:       16384\nUUID:           3e519ee9-360c-4398-99d5-80ea4c506355\nChecksum:       crc32c\nFeatures:       extref, skinny-metadata, no-holes, free-space-tree (default)\nData csum:    yes\nInline data:  yes\nCopy xattr:   yes\nReported stats:\nTotal space:    500044922880\nFree space:     469101375488 (93.81%)\nInode count:        30523392\nFree inodes:        30516489\nBlock count:       122081280\nCreate initial btrfs filesystem\nCreate ext2 image file\nCreate btrfs metadata\nCopy inodes &#91;o] &#91;         0\/      6903]\nFree space cache cleared\nConversion complete<\/code><\/pre>\n\n\n\n<p>After the conversion, I mounted the filesystem at \/mnt and started a few tests to verify that it was working, which it seemed to be.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mount \/dev\/mapper\/vg02-Pictures -t btrfs \/mnt<\/code><\/pre>\n\n\n\n<p>Some of my simple tests were just to see how the system tools view the converted filesystem. Note that <strong>lsblk<\/strong>  still shows it as a logical volume, while adding the -f option lists all filesystem types. And it is a LVM\/BtrFS filesystem That&#8217;s not an optimal setup, but it verifies for me that the actual conversion can work.<\/p>\n\n\n\n<p>The dfc command also shows this as a BtrFS filesystem.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>lsblk<\/strong>\nNAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS\nsda               8:0    0 465.8G  0 disk\n\u2514\u2500vg02-Pictures 252:0    0 465.7G  0 lvm  \/mnt\nzram0           251:0    0     8G  0 disk &#91;SWAP]\nnvme0n1         259:0    0 476.9G  0 disk\n\u251c\u2500nvme0n1p1     259:1    0     1M  0 part\n\u251c\u2500nvme0n1p2     259:2    0     2G  0 part \/boot\n\u2514\u2500nvme0n1p3     259:3    0 474.9G  0 part \/home\n                                          \/\n\n# <strong>lsblk -f<\/strong>\nNAME            FSTYPE      FSVER    LABEL  UUID                                   FSAVAIL FSUSE% MOUNTPOINTS\nsda             LVM2_member LVM2 001        lk2cd5-8df2-v1f8-CwO2-nAHe-oGUk-8sxs8i\n\u2514\u2500vg02-Pictures btrfs                       3e519ee9-360c-4398-99d5-80ea4c506355    439.4G     6% \/mnt\nzram0           swap        1        zram0  a0636f66-c6f1-4feb-9b37-24dcc8e9914f                  &#91;SWAP]\nnvme0n1\n\u251c\u2500nvme0n1p1\n\u251c\u2500nvme0n1p2     ext4        1.0             055aba03-17f1-4cb7-92ec-3af8233bf5a4      1.3G    23% \/boot\n\u2514\u2500nvme0n1p3     btrfs                fedora 02cae19f-3e4d-479e-a0da-ffeea8afb512    467.2G     1% \/home\n                                                                                                  \/\n\n# <strong>dfc -T<\/strong>\nFILESYSTEM               TYPE     (=) USED      FREE (-)  %USED AVAILABLE  TOTAL MOUNTED ON\n\/dev\/nvme0n1p3           btrfs    &#91;=-------------------]   1.6%    467.4G 474.9G \/\ndevtmpfs                 devtmpfs &#91;--------------------]   0.0%     15.6G  15.6G \/dev\ntmpfs                    tmpfs    &#91;--------------------]   0.0%     15.6G  15.6G \/dev\/shm\ntmpfs                    tmpfs    &#91;=-------------------]   0.0%      6.2G   6.2G \/run\ntmpfs                    tmpfs    &#91;--------------------]   0.0%      1.0M   1.0M +ystemd-journald.service\ntmpfs                    tmpfs    &#91;=-------------------]   0.0%     15.6G  15.6G \/tmp\n\/dev\/nvme0n1p3           btrfs    &#91;=-------------------]   1.6%    467.4G 474.9G \/home\n\/dev\/nvme0n1p2           ext4     &#91;======--------------]  29.2%      1.3G   1.9G \/boot\ntmpfs                    tmpfs    &#91;=-------------------]   0.0%      3.1G   3.1G \/run\/user\/980\ntmpfs                    tmpfs    &#91;=-------------------]   0.0%      3.1G   3.1G \/run\/user\/0\n+ev\/mapper\/vg02-Pictures btrfs    &#91;==------------------]   5.6%    439.4G 465.7G \/mnt<\/code><\/pre>\n\n\n\n<p>I unmounted the filesystem, created a new mountpoint, \/var\/Pictures, and added a line to \/etc\/fstab so that it will now mount on boot. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/mapper\/vg02-Pictures \/var\/Pictures btrfs<\/code><\/pre>\n\n\n\n<p>I use the directions in my article, <a href=\"https:\/\/www.both.org\/?p=4407\" data-type=\"link\" data-id=\"https:\/\/www.both.org\/?p=4407\" target=\"_blank\" rel=\"noreferrer noopener\">How I use SSHFS to access remote filesystems<\/a>, to configure both the server and the clients so that I can share these pictures to all the systems on my network.<\/p>\n\n\n\n<p>Now that I know the conversion works, my next step is to reformat the drive to wipe out the logical volume and make it completely BtrFS. I&#8217;ll have an update for you, probably next week.<\/p>\n\n\n\n<p>Meanwhile, I&#8217;m still concerned that it was BtrFS that borked the update.<\/p>\n\n\n\n<p>Then I&#8217;ll move on to creating subvolumes. One step at a time for critical new things like filesystems.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Full Series<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.both.org\/?p=12499\" target=\"_blank\" rel=\"noreferrer noopener\">Converting to BtrFS \u2014 Episode 1<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.both.org\/?p=12582\" target=\"_blank\" rel=\"noreferrer noopener\">Converting to BtrFS \u2014 Episode 2<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.both.org\/?p=12635\" target=\"_blank\" rel=\"noreferrer noopener\">Converting to BtrFS \u2014 Episode 3<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.both.org\/?p=12873\">Converting to Btr<\/a><a href=\"https:\/\/www.both.org\/?p=12873\" target=\"_blank\" rel=\"noreferrer noopener\">F<\/a><a href=\"https:\/\/www.both.org\/?p=12873\">S \u2014 Episode 4<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.both.org\/?p=13137\" target=\"_blank\" rel=\"noreferrer noopener\">Converting to BtrFS \u2014 Episode 5<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>It worked &#8212; sort of.<\/p>\n","protected":false},"author":2,"featured_media":5193,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[866,169,5],"tags":[880],"class_list":["post-12635","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-btrfs","category-filesystems","category-linux","tag-btrfs"],"modified_by":"David Both","_links":{"self":[{"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/12635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12635"}],"version-history":[{"count":12,"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/12635\/revisions"}],"predecessor-version":[{"id":13357,"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/12635\/revisions\/13357"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/5193"}],"wp:attachment":[{"href":"http:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12635"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}