LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-15-2008, 07:25 PM   #1
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Rep: Reputation: 33
Question Using LVM on RAID, some questions


Hello,

I'm planning to install Slackware 12 on software raid 1, using LVM to manage partitions. My knowledge of LVM is limited to what I've read the past few days, plus a quick test install on a spare machine, so naturally I have some questions.

I understand it's not possible to boot from LVM, and it's generally not recommended to have / or swap on a logical volume, so my thoughts on partitions would be something like this:

/dev/md0 raid1 consisting of /dev/sd[ab]1, 128M /boot
/dev/md1 raid1 consisting of /dev/sd[ab]2, 2G swap
/dev/md2 raid1 consisting of /dev/sd[ab]3, 6G /
/dev/md3 raid1 consisting of /dev/sd[ab]4, "the rest", linux LVM

/ would contain everything but /usr/local, /var, /tmp and /home, which I plan to have as separate logical volumes on a volume group using /dev/md3 as a physical volume.

The first question would be, is this a good setup? I've read that LVM on some systems supports raid1 style mirroring, but most of the LVM howto's out there suggest using md for that instead. What are the pros and cons of LVM mirroring compared to md raid?

What about the partitions? I'd like to split up everything that could potentially grow out of control and hang the system (/var, /tmp, /home), as well as everything that isn't part of the distribution (/usr/local). Would it make sense to split /usr onto its own logical volume? How "safe" is this setup; if something breaks, can I boot from a CD and fix it without having to worry about the logical volumes?

My last concern is about file systems. Can I just use any file system with LVM? I know reiserfs supports online growing and offline shrinking. Would it be a good file system of choice for use on logical volumes or should I look at something else instead?

Comments and input appreciated.
 
Old 03-15-2008, 10:51 PM   #2
lstamm
Member
 
Registered: Aug 2007
Location: McBride, BC, Canada
Distribution: Slackware, OpenBSD, Edubuntu
Posts: 53

Rep: Reputation: 17
Quote:
/dev/md1 raid1 consisting of /dev/sd[ab]2, 2G swap
No need to put swap into RAID1; this would probably make for slow swapping since everything swapped out would then need to be written to both discs. Just make two regular swap partitions, one on each disc, and let the computer decide which disc to swap to.

Quote:
Would it make sense to split /usr onto its own logical volume? How "safe" is this setup; if something breaks, can I boot from a CD and fix it without having to worry about the logical volumes?
I put /usr into its own partition on servers, but don't bother for personal workstations. I'm not sure it makes that much difference, unless it helps with your backup regime.

All the lvm tools reside under /sbin, so putting /usr in a logical volume will work fine. If the lvm volumes get screwed up somehow, you will still be able to boot up and attempt a repair as long as /sbin, /bin, and /etc are still under / on a filesystem that is not lvm.

Quote:
Can I just use any file system with LVM?
I think any linux filesystem will work. I don't know about NTFS or VFAT. The only ones I have used are ext3 and reiserfs. I never tried to change the size of the filesystems while mounted either; that just seemed like asking for trouble.
 
Old 03-16-2008, 11:07 AM   #3
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Original Poster
Rep: Reputation: 33
Thank you for your reply.

Quote:
Originally Posted by lstamm View Post
No need to put swap into RAID1; this would probably make for slow swapping since everything swapped out would then need to be written to both discs. Just make two regular swap partitions, one on each disc, and let the computer decide which disc to swap to.
My reason for having swap on raid1 is higher availability; I realize I would see better swap performance if I let the kernel stripe swap over equal priority partitions, but a disk failure would almost certainly bring the system down. Having swap on raid should allow it to keep running off one disk until the other can be replaced.

Meanwhile I've done some more research into file systems. It seems JFS and XFS only support growing, while reiserfs and ext3 support (offline) shrinking as well. The ability to resize both ways seems to make sense within the LVM environment.
 
  


Reply


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
software raid 5 + LVM and other raid questions slackman Slackware 5 05-09-2007 02:58 PM
Lvm + Raid username17 Linux - Hardware 4 02-21-2007 12:02 PM
Lvm Raid jagster Linux - Hardware 2 06-16-2005 12:40 AM
LVM and Raid Cybercool Linux - Newbie 17 03-11-2004 07:09 AM
lvm and raid wlfdgcrkz Linux - Software 15 05-05-2003 02:50 PM


All times are GMT -5. The time now is 02:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration