# Does a laptop need raid or lvm?

## stfish

I have been wondering about this for awhile. I just don't see what advantage either raid or lvm have on a single drive laptop or a single drive desktop for that matter. Am I missing something?

----------

## John R. Graham

I may be missing something. Where is the information you're reading that claims that RAID has any significant value for a single drive system? I've never seen any such.   :Wink: 

- John

----------

## BradN

RAID is only useful if you have more than one drive.  You could technically set it up on a single drive, but it would actually hurt performance and do nothing to improve reliability.  The only reason for doing this is as a learning experience to practice before attempting on a bigger system, but even then I'd recommend a setup where you actually have separate physical devices (that way you can experiment with simulated device failure) - eg, a bunch of flash drives would be alright for this purpose.

LVM has a different but in some ways related set of goals.  LVM allows you both to pool storage devices together (raid can also do this, in different ways), but LVM goes farther and acts sort of like a file system for partitions - that is to say, you can resize, create new, and delete partitions and it's basically done automatically.  You don't have to worry about start and end positions on the drive when resizing stuff because LVM manages all of that.  You do, however, still need filesystems that support resizing themselves to take advantage of this - most of the common ones in use on linux are fine for this.

A useful setup is having multiple hard drives, with RAID-5 on the drives (to provide redundancy in case a drive fails), and then running LVM on top of the RAID to provide better partitioning flexibility.

Anyway, if you deal with a setup where having multiple partitions is beneficial, but aren't sure exactly what size you want them to be (or want the flexibility to easily change their sizes and arrangement), then LVM could be useful even on a single drive system.  But for the most part, you're right - there's not a lot of advantage for LVM either on a single drive system, especially if you don't use a fancy partitioning setup.

Hope this answers your question, good luck!

----------

## tomk

Moved from Gentoo Chat to Kernel & Hardware as it's a support request rather than something about Gentoo itself.

----------

## Hu

LVM has one incidental benefit for people who use encryption.  If you choose to have an encrypted section of the drive, and you want multiple distinct filesystems encrypted, and you do not want the complexity of maintaining multiple encryption keys, then you can place an LVM inside the encrypted container and make the filesystems on the logical volumes.  This allows you to unlock one DM-Crypt volume to get at all the contained LVM volumes.  You can get the same benefits without LVM, but it is more work to set up and the space savings are not worth it in my opinion.

----------

## DaggyStyle

another LVM pro, is the partition resizing, granted you can do that with new fs but this is more secure imho.

also, it is easier to add more space to drives and partitions.

----------

## BradN

Interesting, I hadn't even thought about the encrypted container uses for LVM.

----------

