Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-18-2014, 10:46 AM   #1
Registered: Feb 2005
Distribution: Fedora 20
Posts: 33

Rep: Reputation: 1
A new harddrive. What steps should I take to go to my preferred btrfs partition setup

Hi all,
Trying to read up on brtfs, but I still haven't figured out what exactly to do. Hopefully someone wants to point me in the right direction.

Current situation.
I have a homeserver with Fedora 20. The server has 4 disks. I have a LVM spanning three of these disks. My mainboard has 4 SATA ports, so adding a new drive means removing an old one. The old one can temporarily be attached through USB2 to copy the stuff from it and afterwards it will be an backup drive. My new harddrive (4 TB) is smaller than the total size of the LVM.

Preferred configuration
I want to move away from LVM to a btrfs partition spanning multiple drives. The new drive can contain the contents of 2 of the old ones, so it is possible to just copy the contents from the old drives to the new drive, empty them and include them in the btrfs partition. I would like to setup these partitions in a way where a mount point of the btrfs partition is mirrored (raid1) to keep my photos and documents a bit safer (and safe from bitrot :-) ).
My questions:
  • How can I see which data in my LVM is on which drives exactly or empty a specific harddrive of the LVM?
  • How can I create a btrfs volume spanning multiple drives?
  • How can I create the mirror partition?
  • Any tips what to watch for in this process?
Old 01-18-2014, 09:32 PM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,814

Rep: Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171
Spend some time in the btrfs wiki - here is an article to get you going; describes your needs almost exactly. You will need sufficient extra drives to accommodate the RAID1 of course.
For LVM you'll have to free up sufficient space to ensure you can remove the pv(s) prior to adding the device(s) to the btrfs filesystem.
Old 01-20-2014, 05:48 PM   #3
Registered: Mar 2008
Posts: 16,889

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499

This link has a few of your questions explained.

A tip may be to know that you have to use btrfs tools instead of tools like df. Watch out of creeping loss of space which is really your recovery data. You can disable that if you use a mirror but learn the choices pluses and minuses.

Mirrors and raid is pretty simple in btrfs.

btrfs doesn't care where the partition is for the most part. It is simple to add with the add command.


btrfs, lvm

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
steps after harddrive installation linuxguy08 Linux - Server 7 04-29-2013 03:25 PM
How to setup Preferred and Alternate DNS boysha Linux - Networking 5 07-04-2012 10:51 PM
Restore btrfs partition Alien_Hominid Linux - General 1 12-19-2010 03:01 AM
LXer: Video: Ted Ts'o on Ext4, BtrFS and first steps with Linux LXer Syndicated Linux News 0 02-26-2009 11:21 PM
your preferred way to partition a suse10 install? reddog1 SUSE / openSUSE 2 05-03-2006 02:05 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 AM.

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