Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

software raid + LVM layout/design question

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
pblinux2
n00b
n00b
Posts: 29
Joined: Thu Mar 16, 2006 2:24 am

software raid + LVM layout/design question

  • Quote

Post by pblinux2 » Tue Feb 13, 2007 10:07 pm

From the Software-RAID howto:
http://unthought.net/Software-RAID.HOWT ... TO-11.html

Code: Select all

RAID devices cannot be partitioned, like ordinary disks can. This can be a real annoyance on systems where one wants to run, for example, two disks in a RAID-1, but divide the system onto multiple different filesystems. A horror example could look like:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md2              3.8G  640M  3.0G  18% /
/dev/md1               97M   11M   81M  12% /boot
/dev/md5              3.8G  1.1G  2.5G  30% /usr
/dev/md6              9.6G  8.5G  722M  93% /var/www
/dev/md7              3.8G  951M  2.7G  26% /var/lib
/dev/md8              3.8G   38M  3.6G   1% /var/spool
/dev/md9              1.9G  231M  1.5G  13% /tmp
/dev/md10             8.7G  329M  7.9G   4% /var/www/html
I'm building a box with a raid1 layout similar to this, but I'm not seeing why this is called a "horror example". Is something going to bite me later on down the road if I forgo using LVM here?
Top
jtaylor72
Apprentice
Apprentice
User avatar
Posts: 197
Joined: Sun Feb 01, 2004 6:02 pm
Location: "the can", WA

  • Quote

Post by jtaylor72 » Wed Feb 14, 2007 12:25 am

I think they're just pointing out that while this would be a simple task to do in non-raid, it would be a horror to implement in a raid setting. You can't just setup one raid device and then break it into smaller partitions, you have to set your partitions each as a RAID device.
Top
RaceTM
Apprentice
Apprentice
Posts: 281
Joined: Mon Feb 16, 2004 3:34 am

  • Quote

Post by RaceTM » Wed Feb 14, 2007 12:45 am

Forgive my ignorance but I am pretty sure that a raid array is treated like a regular device. as in, you can fdisk it and subdivide it. I set up a software raid 5 array on my gentoo server a few months ago using 5 250 gig drives. I can fdisk /dev/md/1 and it appears as a 1 tb device. I dont know if you can actually use fdisk to partition it, but mdadm should be able to do it. in which case it would be a matter of creating a new node to represent your new partition, after creating the partition on each physical drive. Hardly anything to keep you from using a "complex" partition scheme.

Hope this helps
Top
neysx
Retired Dev
Retired Dev
User avatar
Posts: 795
Joined: Mon Jan 27, 2003 10:16 am
Contact:
Contact neysx
Website

Re: software raid + LVM layout/design question

  • Quote

Post by neysx » Wed Feb 14, 2007 10:49 am

pblinux2 wrote:From the Software-RAID howto:
http://unthought.net/Software-RAID.HOWT ... TO-11.html
I'm building a box with a raid1 layout similar to this, but I'm not seeing why this is called a "horror example". Is something going to bite me later on down the road if I forgo using LVM here?
Advantages of an LVM-based config are explained in the link you posted.
http://www.gentoo.org/doc/en/gentoo-x86 ... nstall.xml might hep you setting up your system.

Hth
Top
jtaylor72
Apprentice
Apprentice
User avatar
Posts: 197
Joined: Sun Feb 01, 2004 6:02 pm
Location: "the can", WA

  • Quote

Post by jtaylor72 » Wed Feb 14, 2007 10:51 am

Thanks RaceTM. Looking again at the link he posted, it is from 2004, so this may have been true back then. I was referring to the paragraph right after the one he quoted. I guess we both could have read a little better.
If a RAID device could be partitioned, the administrator could simply have created one single /dev/md0 device device, partitioned it as he usually would, and put the filesystems there. Instead, with today's Software RAID, he must create a RAID-1 device for every single filesystem, even though there are only two disks in the system.
Top
sobaka
n00b
n00b
Posts: 26
Joined: Sun Oct 03, 2004 3:08 pm
Location: Riyadh

  • Quote

Post by sobaka » Wed Feb 14, 2007 11:49 am

I am myself an advocate of using LVM2 due to the flexibility of such a solution (in particular if using Xen), but if you don't want to go that way, 2.6-branch kernels can handle partitionable md RAID arrays.

Code: Select all

man mdadm
And search for partitionable. :)

For the lazy:

Code: Select all

       -a, --auto{=no,yes,md,mdp,part,p}{NN}
              Instruct mdadm to create the device file if needed, possibly
              allocating an unused minor number.  "md" causes a non-partition-
              able array to be used.  "mdp", "part" or "p" causes a partition-
              able array (2.6 and later) to be used.  "yes" requires the named
              md device to have a 'standard' format, and the type and minor
              number will be determined from this.  See DEVICE NAMES below.

              The argument can also come immediately after "-a".  e.g. "-ap".

              If --scan is also given, then any auto= entries in the config
              file will over-ride the --auto instruction given on the command
              line.

              For partitionable arrays, mdadm will create the device file for
              the whole array and for the first 4 partitions.  A different
              number of partitions can be specified at the end of this option
              (e.g.  --auto=p7).  If the device name ends with a digit, the
              partition names add a 'p', and a number, e.g. "/dev/home1p3".
              If there is no trailing digit, then the partition names just
              have a number added, e.g. "/dev/scratch3".
/sobaka
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic