Jump to content

combine 2 ext4 drives into one btrfs drive

Go to solution Solved by cTurtle98,

I have decided to move the mount points of my 2 media library drives to be /mnt/MediaDisk1 and /mnd/Media Disk2

then I used mhddfs to combine those into the /MediaLibrary mount point

sudo mhddfs /mnt/MediaDisk1,/mnt/MediaDisk2 /MediaLibrary -o allow_other

 

for my emby server I couldn't figure out how to make my two 1tb hard drives into one volume to use for my media server so I mounted them as /MediaServer/disk1 and /MediaServer/disk2

 

sinse then I have discovered btrfs but im not sure exactly how to use it

 

I need help combining both the drives to just be /MediaServer/ with the data striped across the two without loosing any of the data on the drives

 

I found a command to convert a drive to btrfs and the debian wiki shows how to add a second drive but im not sure how to do what I need

https://askubuntu.com/questions/198000/how-can-i-convert-an-ext4-partition-to-btrfs-or-other-file-systems-without-los

 

cTurtle98 - Desktop

Spoiler

CPU: i7 7700k

COOLER: Thermaltake - Water 3.0 Extreme S
MOBO: Asrock z270 killer sli/ac

RAM: G.Skill Trident Z 32 GB (4 x 8 GB) DDR4-3200

SSD 1: Intel - 600p Series 1TB M.2-2280 (Windows)

SSD 2: Samsung 970 Evo 1 TB M.2-2280 NVME (POP_OS)

GPU: MSI - GTX 1070

PSU: EVGA - SuperNOVA G2 550W 80+ Gold Fully-Modular

CASE: Thermaltake - Versa H26

cTurtle98 - Portable PC

Spoiler

CPU: R5 1600

COOLER: NH-L9a-AM4

MOBO: ASRock - AB350 Gaming-ITX/ac

RAM: 16GB (2 x 8GB) Corsair - Vengeance LPX DDR4-3200

SSD 1: Intel - 600p Series 512 GB M.2-2280 (Windows)

SSD 2: 860 Evo 1 TB 2.5" (Manjaro)

SSD 3: PNY - CS1311 120 GB 2.5" (POP_OS)

GPU: Gigabyte GeForce GTX 1650 4 GB MINI ITX OC

PSU: HDPLEX 400 AC-DC DC-ATX Combo

CASE: NFC Skyreach 4 mini

 

Link to comment
Share on other sites

Link to post
Share on other sites

i use btrfs for about one month and found problems with it. I dont recommend it.

You should be able to convert both to btrfs.

You will need to put all data on backup drive before you combine them. this shit is buggy.

 

adding a drive:

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

Quote

Adding new devices

btrfs filesystem show gives you a list of all the btrfs filesystems on the systems and which devices they include.

btrfs device add is used to add new devices to a mounted filesystem.

btrfs filesystem balance can balance (restripe) the allocated extents across all of the existing devices. For example, with an existing filesystem mounted at /mnt, you can add the device /dev/sdc to it with:


btrfs device add /dev/sdc /mnt

At this point we have a filesystem with two devices, but all of the metadata and data are still stored on the original device(s). The filesystem must be balanced to spread the files across all of the devices.


btrfs filesystem balance /mnt

The balance operation will take some time. It reads in all of the FS data and metadata and rewrites it across all the available devices.

converting ext4:

https://wiki.archlinux.org/index.php/Btrfs#Ext3.2F4_to_Btrfs_conversion

Quote

Ext3/4 to Btrfs conversion

Warning: There are many reports on the btrfs mailing list about incomplete/corrupt/broken conversions. Make sure you have working backups of any data you cannot afford to lose. See Conversion from Ext3 on the btrfs wiki for more information.

Boot from an install CD, then convert by doing:


# btrfs-convert /dev/partition

Mount the partion and test the conversion by checking the files. Be sure to change the /etc/fstab to reflect the change (type to btrfs and fs_passno [the last field] to 0 as Btrfs does not do a file system check on boot). Also note that the UUID of the partition will have changed, so update fstab accordingly when using UUIDs. chroot into the system and rebuild the GRUB menu list (see Install from existing Linux and GRUB articles). If converting a root filesystem, while still chrooted run mkinitcpio -p linux to regenerate the initramfs or the system will not successfully boot. If you get stuck in grub with 'unknown filesystem' try reinstalling grub with grub-install /dev/partition and regenerate the config as well grub-mkconfig -o /boot/grub/grub.cfg.

After confirming that there are no problems, complete the conversion by deleting the backup ext2_saved sub-volume. Note that you cannot revert back to ext3/4 without it.


# btrfs subvolume delete /ext2_saved

Finally balance the file system to reclaim the space.

Remember that some applications which were installed prior have to be adapted to Btrfs. Notably TLP#Btrfs needs special care to avoid filesystem corruption but other applications may profit from certain features as well.

 

 

 

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, SCHISCHKA said:

i use btrfs for about one month and found problems with it. I dont recommend it.

You should be able to convert both to btrfs.

You will need to put all data on backup drive before you combine them. this shit is buggy.

 

adding a drive:

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

converting ext4:

https://wiki.archlinux.org/index.php/Btrfs#Ext3.2F4_to_Btrfs_conversion

 

 

 

Is there anything you would recommend as an alternative to btrfs ?

cTurtle98 - Desktop

Spoiler

CPU: i7 7700k

COOLER: Thermaltake - Water 3.0 Extreme S
MOBO: Asrock z270 killer sli/ac

RAM: G.Skill Trident Z 32 GB (4 x 8 GB) DDR4-3200

SSD 1: Intel - 600p Series 1TB M.2-2280 (Windows)

SSD 2: Samsung 970 Evo 1 TB M.2-2280 NVME (POP_OS)

GPU: MSI - GTX 1070

PSU: EVGA - SuperNOVA G2 550W 80+ Gold Fully-Modular

CASE: Thermaltake - Versa H26

cTurtle98 - Portable PC

Spoiler

CPU: R5 1600

COOLER: NH-L9a-AM4

MOBO: ASRock - AB350 Gaming-ITX/ac

RAM: 16GB (2 x 8GB) Corsair - Vengeance LPX DDR4-3200

SSD 1: Intel - 600p Series 512 GB M.2-2280 (Windows)

SSD 2: 860 Evo 1 TB 2.5" (Manjaro)

SSD 3: PNY - CS1311 120 GB 2.5" (POP_OS)

GPU: Gigabyte GeForce GTX 1650 4 GB MINI ITX OC

PSU: HDPLEX 400 AC-DC DC-ATX Combo

CASE: NFC Skyreach 4 mini

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, cTurtle98 said:

Is there anything you would recommend as an alternative to btrfs ?

mdadm

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

I have decided to move the mount points of my 2 media library drives to be /mnt/MediaDisk1 and /mnd/Media Disk2

then I used mhddfs to combine those into the /MediaLibrary mount point

sudo mhddfs /mnt/MediaDisk1,/mnt/MediaDisk2 /MediaLibrary -o allow_other

 

cTurtle98 - Desktop

Spoiler

CPU: i7 7700k

COOLER: Thermaltake - Water 3.0 Extreme S
MOBO: Asrock z270 killer sli/ac

RAM: G.Skill Trident Z 32 GB (4 x 8 GB) DDR4-3200

SSD 1: Intel - 600p Series 1TB M.2-2280 (Windows)

SSD 2: Samsung 970 Evo 1 TB M.2-2280 NVME (POP_OS)

GPU: MSI - GTX 1070

PSU: EVGA - SuperNOVA G2 550W 80+ Gold Fully-Modular

CASE: Thermaltake - Versa H26

cTurtle98 - Portable PC

Spoiler

CPU: R5 1600

COOLER: NH-L9a-AM4

MOBO: ASRock - AB350 Gaming-ITX/ac

RAM: 16GB (2 x 8GB) Corsair - Vengeance LPX DDR4-3200

SSD 1: Intel - 600p Series 512 GB M.2-2280 (Windows)

SSD 2: 860 Evo 1 TB 2.5" (Manjaro)

SSD 3: PNY - CS1311 120 GB 2.5" (POP_OS)

GPU: Gigabyte GeForce GTX 1650 4 GB MINI ITX OC

PSU: HDPLEX 400 AC-DC DC-ATX Combo

CASE: NFC Skyreach 4 mini

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×