View previous topic :: View next topic |
Author |
Message |
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Thu Jul 30, 2009 10:43 pm Post subject: ICH10R Laptop HDD Layout Suggestions: RAID, LVM2, etc. |
|
|
I'm going to be installing Gentoo on a, the Clevo D900F, which is a Core i7, X58 + ICH10R chipset, based laptop, next week. It has 3 HDD bays, and I'm installing 3 - 500gb SATAII HDDs. The laptop is advertised as supporting RAID-0 or RAID-1 with a minimum of 2 HDDs, and RAID-5 with a minimum of 3 HDDs and I realize that this is by using the "fakeraid" capabilities of the ICH10R chipset, as explained in this thread by NeddySeagoon, among others.
If I understand the options of Linux software RAID correctly, my plan is create identical partitions on all 3 drives of, 64mb, 2gb, and the remainder. I would then setup a RAID-1 set of the 3 - 64mb partitions, and make that /boot, another RAID-1 set of the 3 - 2gb partitions and make that swap, and finally make a RAID-5 set of the 3 - remainder partitions for root.
Does anyone see any issues or problems with doing this? Also please feel free to suggest an alternative layout.
Thanks. |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Fri Jul 31, 2009 9:58 am Post subject: |
|
|
If you're doing this for performance reasons, I would rather get an Intel SSD than use 3 HDDs in RAID 5 (especially if those are 5400 RPM drives). It will be faster, quieter and use less power.
If you want RAID, I suggest you look at how to align partitions to the MD device stripe boundaries to reduce the number of reads/writes you need to perform. For example, by default MD uses 64k chunk size, so you will want to align LVM partitions on 128k boundaries. This is a little tricky with LVM due to it's metadata. Additionally, you can also align file systems such as XFS and ext4. Check the man pages for mke2fs and mkfs.xfs.
This has been discusses several times on the XFS, linux raid and LVM mailing lists, look for information there.
Some more links which might be useful:
http://www.linuxfoundation.org/news-media/blogs/browse/2009/02/aligning-filesystems-ssd%E2%80%99s-erase-block-size
http://www.socalsysadmin.com/2008/10/15/optimizing-xfs-on-raid-arrays/
Also you might want to experiment with read ahead values for block devices to optimize performance (you can set read ahead separately on the disk, partition, md and lvm devices, but I haven't yet found a definitive answer to what settings are optimal.) |
|
Back to top |
|
|
jasn Guru
Joined: 05 May 2005 Posts: 439 Location: Maryland, US
|
Posted: Fri Jul 31, 2009 1:02 pm Post subject: |
|
|
Thanks for the tips Ace.
The links you referenced are welcome reading/education for me. My main reason for configuring this system in this way, is for learning. I wanted to see if I could build a laptop config with a single file system on a RAID-5 array, which can continue to operate through the replacement of a drive.
A second question I had was, what are the main benefits to using LVM on top of a RAID array? I ask because I assume that with RAID-5, I have the ability to replace a drive in the array, without stopping the system. With LVM, if I replaced drives in the array with bigger drives, would LVM allow me to dynamically expand the volume size, without stopping the system as well? |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Fri Jul 31, 2009 5:11 pm Post subject: |
|
|
The main benefit from using LVM that I see is ease of administration, even though LVM adds an additional layer and makes things more complex. If you have many partitions and want to resize them on demand, LVM is much more comfortable than messing around with the partition table directly. I think this is great because I always use many partitions and do not need to worry about initial partition size or waste disk space on partitions that currently don't need it.
If you want to add larger disks you will have to first grow the MD array (I've never done this, but see man mdadm and the "grow" option), then resize the LVM physical volume with pvresize and then you can allocate additional space to single logical volumes using lvresize. Finally, you will have to resize the file system on the logical volume with xfs_grow or resize_reiserfs or resize2fs, which can be done online. |
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Fri Jul 31, 2009 6:34 pm Post subject: |
|
|
When you see reference to growing RAID 5 arrays with mdadm, they're really referring to a reshape, which is the process of seamlessly adding an additional disk to the array (and obviously gaining the space associated with the additional disk). AFAIK, you cannot grow a RAID 5 array by enlarging the underlying partitions and performing some magic. (You can, however, swap out the drives one by one for larger drives, provided you let the array resync between each swap, leaving you with the extra unused space on each drive which can then be used as you see fit.) _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|