LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-18-2014, 11:46 AM   #1
martdj
Member
 
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, 10:32 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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, 06:48 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,394

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
http://www.zdnet.com/btrfs-hands-on-...em-7000023734/

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.
 
  


Reply

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


All times are GMT -5. The time now is 07:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration