LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-22-2010, 02:58 AM   #1
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Setup of a large volume: LVM or RAID?


Hi all. I'm asking for an advice about the setup of a large volume: I have 2 disks of 1 Tb each and I want to merge them in a single volume/partition. I am in doubt about setting up a LVM, a RAID0 device or both.

I know that RAID0 has no redundancy but I will manage a backup on other media, so that I can take advantage of the stripe feature in terms of I/O performance. On the other hand LVM let me to easily manage and expand the volume in a near future. Am I correct?

Anyway I don't know if I can ever setup both and in which order. First LVM then RAID, I suppose. I'd like to hear your opinion/advices on this matter. Thank you.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-22-2010, 04:45 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
I would use both.

Create a RAID0 device, then create a partition on it and set it's type to LVM PV. Then create a volume group with the new physical volume and go from there. You can always add another 2 drives and create a second RAID0 device, then add that to the existing volume group to expand your storage capacity
 
2 members found this post helpful.
Old 12-22-2010, 04:54 AM   #3
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Rep: Reputation: 1
Depending on what you want to do, I would still consider a RAID 0+1 (aka MIRROR). It will give you the best data protection, however if you are trying to get 2 GB from your drives then just format the second drive with ext4 and mount /dev/sdb1 to a directory. Maybe if we knew what exactly you wanted to achieve we could advise you better.
 
Old 12-22-2010, 05:11 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I dislike the concept of LVM - I liked the way {Open}Solaris did ZFS. With the machinations in Sun/Oracle I won't touch it now, but btrfs is coming on strong in Linux. Adding a volume to a filesystem (note filesystem) is a single command.
It's not production code yet, but it's close. If you stay on top of backups, I see it as the future.

Snapshots (to allow for point-in-time backup in my case) is just great.
 
1 members found this post helpful.
Old 12-22-2010, 05:30 AM   #5
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
what is it going to be used for? AKA what data is going to be stored?

For personal data; I'd go with RAID1 mirroring since I don't need to increase the fs in size while the system is live. unlimited downtime with the importance in data retention due to a crash.

For application data or database storage that requires no downtime; increasing the size using LVM is a great thing to have. Back it up with a hardware raid and you have a solid machine. (add in a good backup plan; and it becomes unstoppable)
 
1 members found this post helpful.
Old 12-22-2010, 06:13 AM   #6
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
There are also some use cases that LVM can satisfy, but btrfs can't and will never be able to, for example using that very fast but unstable FS on a sub volume for /tmp, or in my case use a sub volume for a virtual machine hard drive.

Yep, ZFS is cool, and I can't argue against btrfs looking very promising and being the future, I've played about with it in a vm, but I'm not prepared to use it in anger just yet.
 
Old 12-22-2010, 06:34 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by phil.d.g View Post
There are also some use cases that LVM can satisfy, but btrfs can't and will never be able to, for example using that very fast but unstable FS on a sub volume for /tmp,
Say what ... ? That's what tmpfs was invented for (if you ignore shm for the moment)
Quote:
or in my case use a sub volume for a virtual machine hard drive.
I don't do a lot of virtualised, but if it keeps raining like this (*) over Christmas I may just set up a btrfs (only) KVM box and have a play.

(*) _ I had a green tree frog follow me in the house the other day ... even it seemed sick of the rain ... lol
 
Old 12-22-2010, 07:34 AM   #8
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Quote:
Originally Posted by syg00 View Post
Say what ... ? That's what tmpfs was invented for (if you ignore shm for the moment)
Ok, that was a (very) bad example, but it serves to illustrate my point. With LVM I can create a volume and format it ext3, another one and format it xfs, I can slap an mbr and partition table on a 3rd and use it as the hard drive in a vm. I could also format a LV with btrfs, and use btrfs to manage snapshots, etc for that one volume, however that doesn't really appeal to me as a solution for my production machine.
 
Old 12-22-2010, 09:13 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Original Poster
Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Thank you all for your comments. I followed the advice from phil.d.g and I created a LV on top of a RAID0 device. Actually I discovered the machine has a RAID hardware controller already set-up as RAID0, so I left the RAID untouched and created a LV during the installation process. Thanks to syg00 for the comments, I totally agree about ZFS but I never heard about BTRFS. It looks promising.
 
  


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
libblkid uuid_parse() failing to parse UUID for lvm volume on raid device wroom Programming 0 09-04-2010 07:08 PM
[SOLVED] JFS on large LVM-volume (> 35TB) fails murmur101 Linux - Server 9 04-27-2010 02:01 PM
[SOLVED] Adding a volume to a LUKS/LVM setup bgeddy Slackware 6 03-21-2010 06:37 PM
Converting a LVM volume to RAID 5 mastrboy Linux - Software 2 02-08-2007 11:30 AM
Looking for large cheap IDE RAID setup msteudel Linux - Hardware 16 10-20-2004 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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