Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
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.
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)
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.