dreadpiratejeff at gmail.com
Sun Sep 18 03:49:44 UTC 2011
On Sat, Sep 17, 2011 at 22:22, Verde Denim <tdldev at gmail.com> wrote:
> I have two 1 TB drives in my latest Ubuntu 11.04 system.
> I have a 500GB drive as the 'main' OS and home drive, and I want to setup
> the two additional drives as follows:
> /dev/sdb is mirrored on /dev/sdc
> On /dev/sdb,I'd like to have three logical volumes -
> so that if I need to grow one or more of these, I can add additional discs.
> I setup the RAID1 type on both discs, so that fdisk -l produces this -
> /dev/sda: 500.1 Gb
> /dev/sda1 * 1 58746 83 Linux
> /dev/sda2 58746 60802 5 Extended
> /dev/sda5 58746 60802 82 Linux swap / Solaris
> /dev/sdb: 1000.2 GB
> /dev/sdb1 1 121601 fd Linux raid autodetect
> /dev/sdc: 1000.2 GB
> /dev/sdc1 1 121601 fd Linux raid autodetect
> If I setup the lvm's on /dev/sdb, won't this wipe the fd that currently
> resides there?
> Is there a way to accomplish both RAID1 and LVMs on this drive or am I just
> doing something in the wrong way?
Unfortunately, it's been a long while since I last messed with
software RAID, so I can't tell you how to go about doing this (at
least I can't tell you and feel comfortable that I'm not telling you
how to inadvertently destroy the array or whatever) so I'll just say
that you're missing the piece in the middle.
You've created the two RAID partitions, but you've not created the
array. There should be a RAID device (usually, if memory serves,
you're looking for /dev/md0). In a software RAID setup, /dev/mdX is
the LUN on the array that you want to actually do things with (mount,
put data on, etc). So in a RAID 0 setup, you'd mount and put your
data on /dev/md0 and the kernel will take care of writing the stripes
across the disks. In your RAID 1 setup, same thing, only the kernel
will write the same data to both disks.
Assuming the simple config based on your description (single LVM PV,
multiple LVs) you'd use /dev/md0 (which will consist of /dev/sdb1 and
/dev/sdc1) and then create your Logical Volumes on that one Physical
So hopefully that's enough to point you in the right direction at
least, or hold you over till someone else can chime in who's done this
more recently. I gave up on software RAID ages ago in favor of
hardware RAID and honestly haven't messed with it in a while now.
More information about the ubuntu-users