disk layout

Tim Frost timfrost at xtra.co.nz
Sun Sep 18 08:19:00 UTC 2011


Jack,

On Sat, 2011-09-17 at 22:22 -0400, Verde Denim 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

A standard RAID-1 mirror set will do the mirroring in software, for
partitions, as you describe below 
> 
> On /dev/sdb,I'd like to have three logical volumes -
> /dev/backup
> /dev/media
> /dev/share
> 
> 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?
Yes, you would lose that.

> 
> Is there a way to accomplish both RAID1 and LVMs on this drive or am I just
> doing so to mething in the wrong way?

What you have done so far is correct.

The next step is to create a RAID-1 mirror using /dev/sdb1
and /dev/sdc1.  This can be achieved with the following command:
  mdadm --create /dev/md0  --level=1  \
     --raid-devices=2 /dev/sdb1 /dev/sdc1

The options are:
  --create /dev/md0  create a new array on device /dev/md0
  --level=1          of type 1 (mirror)
  --raid-devices=2   with two  LVM VG vg0members

If the command succeeds, you should now have /dev/md0 available, and can
now create the LVM structure inside /dev/md0.


So the structure is:
/dev/md0:
  has members:
	/dev/sdb1
	/dev/sdc1
  contains:
	LVM volume group VG0
		VG0--backup
		VG0--media
		VG0--share


It is possible that one of the graphical tools, such as parted, will
present an easier way of building the structure.


Growing beyond the 1TB disk size is probably not going to work, as the
mdadm tool doesn't appear to support expanding the size/number of
stripes (you need the members of the RAID-1 mirror to be RAID-0
structures before it is possible to expand beyond a single physical
partition).


> Thanks, as always for the input.
> 
> Regards
> 
> Jack

Tim

-- 
Tim Frost <timfrost at xtra.co.nz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110918/6ea6b0a0/attachment.pgp>


More information about the ubuntu-users mailing list