Debian+LVM+RAID

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Debian+LVM+RAID

by Vilasith Phonepadith-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello,

I am trying with LVM+RAID, and I did some tests. I need your help for the installation of Lenny.

Problem: I have to install Debian with the requirements as follow:
  • partition: use the system of LVM for partitionning the servers
  • if possible on the Disk RAID1 Mirroring

I don't understand well and don't know how to start. Which one should be done first, after or at the same time. If we install by default, it's alright. But now, with LVM+RAID, it's something different for me.

Thank you very much and good day.

Vilasith


Windows Live™: Keep your life in sync. Check it out!

Re: Debian+LVM+RAID

by Alex Samad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 10:34:13AM +0700, Vilasith Phonepadith wrote:
>
> Hello,
>
> I am trying with LVM+RAID, and I did some tests. I need your help for the installation of Lenny.
>
> Problem: I have to install Debian with the requirements as follow:partition: use the system of LVM for partitionning the serversif possible on the Disk RAID1 Mirroring
> I don't understand well and don't know how to start. Which one should be done first, after or at the same time.
> If we install by default, it's alright. But now, with LVM+RAID, it's something different for me.

I would suggest (presume you have sda and sdb and they are the same
size)

I would partition up sda and sdb like

sda
p1 - 1G
p2 - 20G
p3 - rest

sdb - the same as sda


make

md0 = sda1 + sdb1
md1 = sda2 + sdb2
md3 = sda3 + sdb3

md0 = /boot (ext2)
md1 = / (ext3)
md2 = lvm physical device

Then on LVM

size of memory = swap partition
1G = ext3  mount point /var/log

Then chop up the rest lvm for /home or ???

Alex


>
> Thank you very much and good day.
>
> Vilasith
>
> _________________________________________________________________
> Windows Live™: Keep your life in sync. Check it out!
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
--
"More and more of our imports are coming from overseas."

        - George W. Bush
09/26/2005
On NPR's Morning Edition


signature.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by lee-25 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 10:34:13AM +0700, Vilasith Phonepadith wrote:

> Problem: I have to install Debian with the requirements as
> follow:partition: use the system of LVM for partitionning the
> serversif possible on the Disk RAID1 Mirroring I don't understand
> well and don't know how to start. Which one should be done first,
> after or at the same time.

Why do you need LVM?

Imho it is better to create a partitionable RAID array first and then
to create the partitions you want to have on the partitionable RAID
array.

The RAID array must be partitionable, which is an option you
eventually need to specify when creating it. I don't know what the
options the installer offers are doing by default, but I would think
that you should be able to open the shell and create the RAID array
with mdadm manually. Once you have the partitionable RAID array, you
should be able to partition it from within the installer like any
other disk.


To clarify: There are partitionable RAID arrays and non-partitionable
RAID arrays. When creating a RAID array, you need to specify which
kind --- partitionable or non-partitionable --- you want to create.

If you want to use non-partitionable RAID arrays, you would create
identical partitions on all of the disks involved and then use those
partitions to create the RAID arrays. Another poster already described
that better.

If you want to use a partitionable RAID array, you can use whole disks
(without partitioning the disks) to create the RAID array. Then you
can partition the RAID array.


As to LVM, I can't say much since I haven't used it yet. And without
knowing more about what you are trying to achieve and why you might
need LVM, there's not much advice that could be given.

If you can avoid using LVM, don't use it. It's always better to keep
things simple. If you want to use LVM because you might want to add
more disks later to make the partitions larger, it would make sense to
me to first create a partitionable RAID array and then to create LVM
partitions as needed on the RAID array. When you're adding more disks
later, you would again create a partitionable RAID array from the
additional disks and use the array with LVM.

But there are other possible uses of LVM which may suggest a different
approach ...


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by lee-25 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 02:13:25PM +1000, Alex Samad wrote:

> md0 = sda1 + sdb1
> md1 = sda2 + sdb2
> md3 = sda3 + sdb3
>
> md0 = /boot (ext2)
> md1 = / (ext3)
> md2 = lvm physical device
>
> Then on LVM
>
> size of memory = swap partition
> 1G = ext3  mount point /var/log
>
> Then chop up the rest lvm for /home or ???

Creating a swap partition on a software RAID device isn't ideal. It is
better to create a swap partition on each of the physical devices and
give them the same priority (in /etc/fstab). That's only one example,
you could also use a disk that isn't part of the RAID and have only
one swap partition ...

BTW, wouldn't you rather create a partitionable RAID from the whole
disks and then partition that? If not, why not? (Letting aside where
to put the swap partition ...)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by Alex Samad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 08, 2009 at 11:16:04PM -0600, lee wrote:

> On Thu, Jul 09, 2009 at 02:13:25PM +1000, Alex Samad wrote:
>
> > md0 = sda1 + sdb1
> > md1 = sda2 + sdb2
> > md3 = sda3 + sdb3
> >
> > md0 = /boot (ext2)
> > md1 = / (ext3)
> > md2 = lvm physical device
> >
> > Then on LVM
> >
> > size of memory = swap partition
> > 1G = ext3  mount point /var/log
> >
> > Then chop up the rest lvm for /home or ???
>
> Creating a swap partition on a software RAID device isn't ideal. It is
> better to create a swap partition on each of the physical devices and
> give them the same priority (in /etc/fstab). That's only one example,
> you could also use a disk that isn't part of the RAID and have only
> one swap partition ...
what happens if there is something important swapped out and that drive
dies ?  I could understand not wanting to put it on lvm and then raid1.


>
> BTW, wouldn't you rather create a partitionable RAID from the whole
> disks and then partition that? If not, why not? (Letting aside where
> to put the swap partition ...)

I have had to rescue machines and having a simple boot + / make like a
lot simpler  - why make life hard

>
>

--
"We don't believe in planners and deciders making the decisions on behalf of Americans."

        - George W. Bush
09/06/2000
Scranton, PA


signature.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by van Ginderachter, Serge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/9 Alex Samad <alex@...>:

>> Creating a swap partition on a software RAID device isn't ideal. It is
>> better to create a swap partition on each of the physical devices and
>> give them the same priority (in /etc/fstab). That's only one example,
>> you could also use a disk that isn't part of the RAID and have only
>> one swap partition ...
>
> what happens if there is something important swapped out and that drive
> dies ?  I could understand not wanting to put it on lvm and then raid1.

I agree with that. One generally uses RAID to keep a host running when
a disk failure occurs. If swap is not mirrored, processes wil crash,
or worst case the box might crash.

If performance is an issue, then you'd better go hardware raid.

Unless someone knows of another strong reason not to put swap on raid?

--


     Met vriendelijke groet,

     Serge van Ginderachter


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by linuksos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

here are some LVM basics to get you started..

http://www.linuxconfig.org/Linux_lvm_-_Logical_Volume_Manager

lubos

On Thu, Jul 9, 2009 at 5:31 PM, Serge van
Ginderachter<serge@...> wrote:

> 2009/7/9 Alex Samad <alex@...>:
>
>>> Creating a swap partition on a software RAID device isn't ideal. It is
>>> better to create a swap partition on each of the physical devices and
>>> give them the same priority (in /etc/fstab). That's only one example,
>>> you could also use a disk that isn't part of the RAID and have only
>>> one swap partition ...
>>
>> what happens if there is something important swapped out and that drive
>> dies ?  I could understand not wanting to put it on lvm and then raid1.
>
> I agree with that. One generally uses RAID to keep a host running when
> a disk failure occurs. If swap is not mirrored, processes wil crash,
> or worst case the box might crash.
>
> If performance is an issue, then you'd better go hardware raid.
>
> Unless someone knows of another strong reason not to put swap on raid?
>
> --
>
>
>     Met vriendelijke groet,
>
>     Serge van Ginderachter
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@...
> with a subject of "unsubscribe". Trouble? Contact listmaster@...
>
>



--
lubo
http://www.linuxconfig.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by lee-25 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 03:33:01PM +1000, Alex Samad wrote:

> > Creating a swap partition on a software RAID device isn't ideal.
>
> what happens if there is something important swapped out and that drive
> dies ?  I could understand not wanting to put it on lvm and then raid1.

When the swap partition quits working, the system might stop
working. So the question is what's more important, increased
reliability or faster swap.

Personally, I'd feel awkward about having swap partitions on
a software RAID, but when setting up something like a server to
provide important services for a company, I would insist on using a
good hardware RAID controller and likely put the swap partition onto
the RAID.

> > BTW, wouldn't you rather create a partitionable RAID from the whole
> > disks and then partition that? If not, why not? (Letting aside where
> > to put the swap partition ...)
>
> I have had to rescue machines and having a simple boot + / make like a
> lot simpler  - why make life hard

Aren't you making it hard by having to partition all the disks
involved and then creating RAIDs from the partitions? It's more work
when setting it up, and it can turn into a disaster when something
with discovering the RAID goes wrong.

For example, when I put the disks containing my RAID-1 into another
computer and installed the raid tools, I was asked questions about
starting the raid and answered that I wanted to start the RAID arrays
when booting. I had the disks partitioned and had created RAID arrays
from the partitions.

The result was that the RAID was started immediately (which I consider
as a bug) instead when booting, before I had any chance to check and
to configure the RAID arrays correctly so that they would be detected
as they should. It started resyncing the md devices in a weird way. I
was only lucky that it didn't go wrong. If it had gone wrong, I could
have lost all my data.

Now when I got new disks, I created the RAID arrays from the whole
disks. In this case, I didn't partition the RAID array, but even if I
did, the number of md devices was reduced from the three I had before
to only one. The lower the number of md devices you have, the less
likely it seems that something can go wrong with discovering them,
simply because there aren't so many.

To me, it seems easier to only have one md device and to partition
that, if needed, than doing it the other way round. However, I went
the easiest way in that I have another disk with everything on it but
/home. If that disk fails, nothing is lost, and if there are problems,
a single disk is the simplest to deal with. --- I might have done it
otherwise, but it has been impossible to install on SATA disks because
the modules required to access SATA disks are not available to the
installer. Maybe that has been fixed by now; if it hasn't, it really
should be fixed.


In which way having many md devices made it easier for you to perform
rescue operations? Maybe there are advantages I'm not thinking of but
which would be good to know. I want to get rid of that IDE disk and
might have a chance to, so I'm going to have to decide if I want to
install on a RAID. If it's better to partition the disks rather than
the RAID, I should do it that way.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by martin f krafft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

also sprach lee <lee@...> [2009.07.09.0707 +0200]:
> Why do you need LVM?

LVM offers features that RAID does not. If you want those features,
you need LVM.

> The RAID array must be partitionable, which is an option you
> eventually need to specify when creating it. I don't know what the
[...]
> To clarify: There are partitionable RAID arrays and
> non-partitionable RAID arrays. When creating a RAID array, you
> need to specify which kind --- partitionable or non-partitionable
> --- you want to create.

Since 2.6.29, all RAIDs are partitionable. Not in lenny though.

--
 .''`.   martin f. krafft <madduck@...>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
"driving with a destination
 is like having sex to have children"
                                             -- backwater wayne miller


digital_signature_gpg.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by Alex Samad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 02:19:44AM -0600, lee wrote:

> On Thu, Jul 09, 2009 at 03:33:01PM +1000, Alex Samad wrote:
>
> > > Creating a swap partition on a software RAID device isn't ideal.
> >
> > what happens if there is something important swapped out and that drive
> > dies ?  I could understand not wanting to put it on lvm and then raid1.
>
> When the swap partition quits working, the system might stop
> working. So the question is what's more important, increased
> reliability or faster swap.
I am not sure that raid1 is noticeable slower than raid0 (or jbod), raid
5 maybe or any other parity raid


>
> Personally, I'd feel awkward about having swap partitions on
> a software RAID, but when setting up something like a server to
> provide important services for a company, I would insist on using a
> good hardware RAID controller and likely put the swap partition onto
> the RAID.

Depends on how much you are going to spend on the controller and weather
or not you are going to have battery backed up cache - if you not you
might aswell go software raid (only talking raid1 here).

If you do spend the money and have multiple machines then you might as
well go for a san......

I would suggest for most commercial situations a software raid setup or
2 raid 1 disk is a far better solution that a proprietary hardware raid
controller

>
> > > BTW, wouldn't you rather create a partitionable RAID from the whole
> > > disks and then partition that? If not, why not? (Letting aside where
> > > to put the swap partition ...)
> >
> > I have had to rescue machines and having a simple boot + / make like a
> > lot simpler  - why make life hard
>
> Aren't you making it hard by having to partition all the disks
> involved and then creating RAIDs from the partitions? It's more work
> when setting it up, and it can turn into a disaster when something
> with discovering the RAID goes wrong.


sfdisk -d <master device> > raidlayout.out

sfdisk <new raid device> < raidlayout.out

you could wrap it inside a for loop if you want

>
> For example, when I put the disks containing my RAID-1 into another
> computer and installed the raid tools, I was asked questions about
> starting the raid and answered that I wanted to start the RAID arrays
> when booting. I had the disks partitioned and had created RAID arrays
> from the partitions.
>
> The result was that the RAID was started immediately (which I consider
> as a bug) instead when booting, before I had any chance to check and

but you said above you gave the okay to start all raid devices, so why
complain when it does it ?

> to configure the RAID arrays correctly so that they would be detected
> as they should. It started resyncing the md devices in a weird way. I
> was only lucky that it didn't go wrong. If it had gone wrong, I could
> have lost all my data.

And this why we have backups

>
> Now when I got new disks, I created the RAID arrays from the whole
> disks. In this case, I didn't partition the RAID array, but even if I
> did, the number of md devices was reduced from the three I had before
> to only one. The lower the number of md devices you have, the less
> likely it seems that something can go wrong with discovering them,
> simply because there aren't so many.

I don't think you are going to have overflow problems with number of
raid devices

>
> To me, it seems easier to only have one md device and to partition
> that, if needed, than doing it the other way round. However, I went
> the easiest way in that I have another disk with everything on it but
> /home. If that disk fails, nothing is lost, and if there are problems,

well except for /etc/

> a single disk is the simplest to deal with. --- I might have done it
> otherwise, but it has been impossible to install on SATA disks because
> the modules required to access SATA disks are not available to the

if you have a look at the latest installer i think you will find it has
all the necessary modules now

> installer. Maybe that has been fixed by now; if it hasn't, it really
> should be fixed.

I was suggesting to put / on its own partition as well as /boot. boot I
do out of habit from long time ago, with busybox you can access the
system even if the other partition as corrupted and still try and
salvage stuff


The suggest I have made are for reducing risk, the gain made by having a
separate root and boot  in my mind a re worth it.

In a production environment you have change management procedures or
at least some documentation.

>
>
> In which way having many md devices made it easier for you to perform
> rescue operations? Maybe there are advantages I'm not thinking of but
> which would be good to know. I want to get rid of that IDE disk and
> might have a chance to, so I'm going to have to decide if I want to
> install on a RAID. If it's better to partition the disks rather than
> the RAID, I should do it that way.

You have missed the point the advantage is have a separate / and a
separate /boot to protect them you can even mount /boot as ro.

All the partitions are raided again for protection.  If you are worried
about a little complexity then managing HA and/or production system
might not be up your alley.

>
>

Having said all that, there is no golden rule, each situation needs to
be addresses individually weighing you the risks compared to the gains

For me as a creature of habit I usually follow the layout I specified
before - because it has worked and it has save me time and it is very
flexible, your mileage might vary.


Alex

--
"Kosovians can move back in."

        - George W. Bush
04/09/1999
CNN interview


signature.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by Roger Leigh-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 10:34:13AM +0700, Vilasith Phonepadith wrote:
>
> I am trying with LVM+RAID, and I did some tests. I need your help for the installation of Lenny.
>
> Problem: I have to install Debian with the requirements as follow:partition: use the system of LVM for partitionning the serversif possible on the Disk RAID1 Mirroring
> I don't understand well and don't know how to start. Which one should be done first, after or at the same time.
> If we install by default, it's alright. But now, with LVM+RAID, it's something different for me.

Make the LVM run on top of RAID.  This works perfectly, and I use it
on several systems.  It all works through the debian installer.

1) Partition disks

   Give both disks the same partition layout:
     p1: (/boot) 200MiB is plenty for several kernels and initrds.
         But you could make it 500MiB to be extra safe.
     p2: (RAID) use the rest of the available space

2) Set up software RAID

   Assuming your discs are /dev/sda and /dev/sdb, sda2 and sdb2 will
   be your RAID set.  Just choose them when setting up RAID.

3) Configure LVM

   Start by creating a new physical volume (PV).  Choose your raid
   device (/dev/md0) created in the previous step as the PV.

   Next, create a volume group (VG).  I normally give it the same
   name as the machine hostname.

   Then, create the logical volumes (LVs) for / (root), /usr, /var,
   /home, /srv and any other volumes you need.  Also create any
   swap partitions you like.  I normally create a series of 2GiB
   LVs swap0, swap1, ... swapn but I think the 2GiB size limit is gone
   now.

4) Set up the filesystems

   In the partitioner, set /dev/sda1 as /boot.  /boot needs to be
   separate from the RAID+LVM setup in order to be accessible by the
   bootloader, though it's possible grub2 will fix this at some point.
   Keeping it separate is safe and recommended.

   Configure all of your LVs by choosing the filesystem type and mount
   point.  For Lenny I'd go with ext2 for /boot and ext3 for everything
   else.

5) Continue

   It's all done now, just carry on with the installation as usual,
   and it should all Just Work.


Regards,
Roger
     
--
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by lee-25 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 08:43:13PM +1000, Alex Samad wrote:

> On Thu, Jul 09, 2009 at 02:19:44AM -0600, lee wrote:
> > On Thu, Jul 09, 2009 at 03:33:01PM +1000, Alex Samad wrote:
> >
> > > > Creating a swap partition on a software RAID device isn't ideal.
> > >
> > > what happens if there is something important swapped out and that drive
> > > dies ?  I could understand not wanting to put it on lvm and then raid1.
> >
> > When the swap partition quits working, the system might stop
> > working. So the question is what's more important, increased
> > reliability or faster swap.
>
> I am not sure that raid1 is noticeable slower than raid0 (or jbod), raid
> 5 maybe or any other parity raid

Maybe you're right ... When you have all partitions on a RAID to
improve reliability, it doesn't make sense to make an exception for
swap partitions. And RAM isn't as much an issue as it used to be
because the prices have come down so much that it is affordable to
have so much RAM that swapping rarely occurs.

> > Personally, I'd feel awkward about having swap partitions on
> > a software RAID, but when setting up something like a server to
> > provide important services for a company, I would insist on using a
> > good hardware RAID controller and likely put the swap partition onto
> > the RAID.
>
> Depends on how much you are going to spend on the controller and weather
> or not you are going to have battery backed up cache - if you not you
> might aswell go software raid (only talking raid1 here).
>
> If you do spend the money and have multiple machines then you might as
> well go for a san......

Maybe --- I need to learn more about SAN. I'll have to read up on it
and find out what it can do.

> I would suggest for most commercial situations a software raid setup or
> 2 raid 1 disk is a far better solution that a proprietary hardware raid
> controller

Hm, interesting. What makes you think so? Getting a good balance
between reliability and cost?

> > > I have had to rescue machines and having a simple boot + / make like a
> > > lot simpler  - why make life hard
> >
> > Aren't you making it hard by having to partition all the disks
> > involved and then creating RAIDs from the partitions? It's more work
> > when setting it up, and it can turn into a disaster when something
> > with discovering the RAID goes wrong.
>
> sfdisk -d <master device> > raidlayout.out
>
> sfdisk <new raid device> < raidlayout.out
>
> you could wrap it inside a for loop if you want

I wouldn't do that. I don't have that much trust into software and
hardware.

> > For example, when I put the disks containing my RAID-1 into another
> > computer and installed the raid tools, I was asked questions about
> > starting the raid and answered that I wanted to start the RAID arrays
> > when booting. I had the disks partitioned and had created RAID arrays
> > from the partitions.
> >
> > The result was that the RAID was started immediately (which I consider
> > as a bug) instead when booting, before I had any chance to check and
>
> but you said above you gave the okay to start all raid devices, so why
> complain when it does it ?

I told it to start the RAID *when booting*, not any time before ---
and I didn't boot. I wanted to install the raid tools and then make
sure that the configuration was ok, and only after that I would have
started the md devices. But they were started immediately before I
could do anything, they didn't wait for a reboot.

What would you expect when you're being asked "Should X be done when
booting?"? When I say "Yes", I expect that X will be done when
booting, not that it will be done immediately.

You could say that in that case, I trusted the software too
much. Never do that ...

> > to configure the RAID arrays correctly so that they would be detected
> > as they should. It started resyncing the md devices in a weird way. I
> > was only lucky that it didn't go wrong. If it had gone wrong, I could
> > have lost all my data.
>
> And this why we have backups

I didn't have a backup. I used to have tape drives, but with the
amount of data to backup steadily increasing with the disk sizes, you
get to the point where that gets too expensive and where there isn't
any affordable and good solution. You can't buy tape drives and tapes
that fast ... I still don't have a backup solution. I'm making backups
on disks now, but that isn't a good solution, only a little better
than no backup.

> > Now when I got new disks, I created the RAID arrays from the whole
> > disks. In this case, I didn't partition the RAID array, but even if I
> > did, the number of md devices was reduced from the three I had before
> > to only one. The lower the number of md devices you have, the less
> > likely it seems that something can go wrong with discovering them,
> > simply because there aren't so many.
>
> I don't think you are going to have overflow problems with number of
> raid devices

I'm not afraid of that. But the point remains that having less md
devices reduces the chances that something goes wrong with their
discovery. The point remains that reducing the complexity of a setup
makes it easier to handle it (unless you reduced the complexity too
much).

> > To me, it seems easier to only have one md device and to partition
> > that, if needed, than doing it the other way round. However, I went
> > the easiest way in that I have another disk with everything on it but
> > /home. If that disk fails, nothing is lost, and if there are problems,
>
> well except for /etc/

There's nothing on /etc that isn't replaceable. It's nice not to lose
it, but it doesn't really matter. If I lost my data of the last 15
years, I would have a few problems --- not unsolvable ones, I guess,
but it would be utterly inconvenient. Besides that, a lot of that data
is irreplaceable. That's what I call I a loss. Considering that, who
cares about /etc?

> > a single disk is the simplest to deal with. --- I might have done it
> > otherwise, but it has been impossible to install on SATA disks because
> > the modules required to access SATA disks are not available to the
>
> if you have a look at the latest installer i think you will find it has
> all the necessary modules now

That would be great :)

> You have missed the point the advantage is have a separate / and a
> separate /boot to protect them you can even mount /boot as ro.

Oh, ok.

What I was wondering about is what the advantage is of partitioning
the disks and creating RAIDs from the partitions vs. creating a RAID
from whole disks and partitioning the RAID?

> All the partitions are raided again for protection.  If you are
> worried about a little complexity then managing HA and/or production
> system might not be up your alley.

Well, I've done it for quite a while. But I found it very helpful to
make things no more complex than needed. The simpler something is, the
lower the chances are that problems can come up --- and if problems
come up, it's the easier to deal with them the less complex things
are.

If you're making things more complex than they have to be, there has
to be a very good reason to do so. I would like to know that reason
since I could learn something from you I'd never have thought of.

> Having said all that, there is no golden rule, each situation needs to
> be addresses individually weighing you the risks compared to the gains

indeed

> For me as a creature of habit I usually follow the layout I
> specified before - because it has worked and it has save me time and
> it is very flexible, your mileage might vary.

Is it more flexible when you make partitions and then RAIDs from them
than it is to make a RAID from the disks and partition that?

I also tend to stick with my habits, but that isn't always a good
thing. One needs to keep learning, and that can mean to change a habit
because there's a better way of doing something.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by lee-25 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 11:42:16AM +0200, martin f krafft wrote:
> also sprach lee <lee@...> [2009.07.09.0707 +0200]:
> > Why do you need LVM?
>
> LVM offers features that RAID does not. If you want those features,
> you need LVM.

Yeah, but that wasn't what I was asking. I tried to find out what
features he needed and what he's trying to do.

> > The RAID array must be partitionable, which is an option you
> > eventually need to specify when creating it. I don't know what the
> [...]
> > To clarify: There are partitionable RAID arrays and
> > non-partitionable RAID arrays. When creating a RAID array, you
> > need to specify which kind --- partitionable or non-partitionable
> > --- you want to create.
>
> Since 2.6.29, all RAIDs are partitionable. Not in lenny though.

See man madadm:


"
       -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-partitionable array to be used.  "mdp", "part" or
              "p" causes a partitionable array (2.6 and later) to be
              used.
"

You can still decide if you want a partitionable or non-partitionable
RAID, thus not all RAIDs are partitionable since kernel
2.6.29. Unfortunately, the man page doesn't seem to say what the
default is for the partitionability of the RAID.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by lee-25 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 07:47:36PM +0100, Roger Leigh wrote:

>    In the partitioner, set /dev/sda1 as /boot.  /boot needs to be
>    separate from the RAID+LVM setup in order to be accessible by the
>    bootloader, though it's possible grub2 will fix this at some point.
>    Keeping it separate is safe and recommended.

Are you saying it's impossible to install on (boot from) a software
RAID?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by thveillon.debian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

lee wrote:

> On Thu, Jul 09, 2009 at 07:47:36PM +0100, Roger Leigh wrote:
>
>>    In the partitioner, set /dev/sda1 as /boot.  /boot needs to be
>>    separate from the RAID+LVM setup in order to be accessible by the
>>    bootloader, though it's possible grub2 will fix this at some point.
>>    Keeping it separate is safe and recommended.
>
> Are you saying it's impossible to install on (boot from) a software
> RAID?
>
>

It is possible to boot from mdadm software raid1 with grub2, in Lenny
and Squeeze. But I would worry about the lvm, I don't think this is as
straightforward, maybe not even possible at this point (to be
double-checked anyway).

Tom


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by martin f krafft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

also sprach lee <lee@...> [2009.07.09.2204 +0200]:

>        -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-partitionable array to be used.  "mdp", "part" or
>               "p" causes a partitionable array (2.6 and later) to be
>               used.
> "
>
> You can still decide if you want a partitionable or non-partitionable
> RAID, thus not all RAIDs are partitionable since kernel
> 2.6.29. Unfortunately, the man page doesn't seem to say what the
> default is for the partitionability of the RAID.
mdadm has, uh, conservative maintenance. mdp is no longer needed.
"non-partitionable" arrays will be partitionable with newer kernels.

--
 .''`.   martin f. krafft <madduck@...>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
"truth is stranger than fiction, but it is because
 fiction is obliged to stick to possibilities; truth isnt."
                                                       -- mark twain


digital_signature_gpg.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by martin f krafft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

also sprach thveillon.debian <thveillon.debian@...> [2009.07.09.2215 +0200]:
> It is possible to boot from mdadm software raid1 with grub2, in Lenny
> and Squeeze. But I would worry about the lvm, I don't think this is as
> straightforward, maybe not even possible at this point (to be
> double-checked anyway).

grub2 can boot LVM just as well as it can boot RAID1 or RAID5.

--
 .''`.   martin f. krafft <madduck@...>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
"es ist immer etwas wahnsinn in der liebe.
 es ist aber auch immer etwas vernunft im wahnsinn."
                                                 - friedrich nietzsche


digital_signature_gpg.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by Alex Samad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


[snip]

> > > > what happens if there is something important swapped out and that drive
> > > > dies ?  I could understand not wanting to put it on lvm and then raid1.
> > >
> > > When the swap partition quits working, the system might stop
> > > working. So the question is what's more important, increased
> > > reliability or faster swap.
> >
> > I am not sure that raid1 is noticeable slower than raid0 (or jbod), raid

ie for example the old 2 * physical ram size = swap size. I have a
machine with 256G of ram I don't need 512G of swap space.

> > 5 maybe or any other parity raid

[snip]

> >
> > Depends on how much you are going to spend on the controller and weather
> > or not you are going to have battery backed up cache - if you not you
> > might aswell go software raid (only talking raid1 here).
> >
> > If you do spend the money and have multiple machines then you might as
> > well go for a san......
>
> Maybe --- I need to learn more about SAN. I'll have to read up on it
> and find out what it can do.
being stuck to dedicated hardware and firmware. look at the large data
center building all moving towards white box 1ru boxes - generic
hardware keeping it simple.  Can you take your smartraid (HP raid
controller) and attach it to a dell perc controlller - if you use
software raid then yes you can.

>

[snip]

> > > involved and then creating RAIDs from the partitions? It's more work
> > > when setting it up, and it can turn into a disaster when something
> > > with discovering the RAID goes wrong.
> >
> > sfdisk -d <master device> > raidlayout.out
document it and have a change management doco/protocol. At some point in
time you have to trust something!

> >

[snip]

>
> I told it to start the RAID *when booting*, not any time before ---
> and I didn't boot. I wanted to install the raid tools and then make
> sure that the configuration was ok, and only after that I would have
> started the md devices. But they were started immediately before I
> could do anything, they didn't wait for a reboot.
>
> What would you expect when you're being asked "Should X be done when
> booting?"? When I say "Yes", I expect that X will be done when
> booting, not that it will be done immediately.
my apologies I miss read

>

[snip]

> > And this why we have backups
>
> I didn't have a backup. I used to have tape drives, but with the
> amount of data to backup steadily increasing with the disk sizes, you
> get to the point where that gets too expensive and where there isn't
> any affordable and good solution. You can't buy tape drives and tapes
> that fast ... I still don't have a backup solution. I'm making backups
> on disks now, but that isn't a good solution, only a little better
> than no backup.

comes down to how much you value your data.  My home server has 10 x 1T
drives in it a mix of raid1 + raid5 + raid6, I have a second server with
9 x 1T drives in it (in the garage) to do my backups - because it would
take too long to send off site and I don't want to spend money on a tape
system - i value my data - well I could afford to throw money at the
problem.  But I have some important info there, photos & video of my
daughter etc ...

>

[snip]

>
> I'm not afraid of that. But the point remains that having less md
> devices reduces the chances that something goes wrong with their
> discovery. The point remains that reducing the complexity of a setup
> makes it easier to handle it (unless you reduced the complexity too
> much).

Ok to take this analogy even further why have 1T drives, why not stick
with 1G hard drives - less data less chance of errors.

If you are building a large system or !!complex!! system, bit of
planning before hand, I set mine up and haven't had a problem with md, I
have lost some drives during the life of this server - the hardest thing
is matching drive letter to physical drive - I didn't attach them in
incremental order to the mother board (silly me)

>
> > > To me, it seems easier to only have one md device and to partition
> > > that, if needed, than doing it the other way round. However, I went
> > > the easiest way in that I have another disk with everything on it but
> > > /home. If that disk fails, nothing is lost, and if there are problems,
> >
> > well except for /etc/
>
> There's nothing on /etc that isn't replaceable. It's nice not to lose
> it, but it doesn't really matter. If I lost my data of the last 15
> years, I would have a few problems --- not unsolvable ones, I guess,
> but it would be utterly inconvenient. Besides that, a lot of that data
> is irreplaceable. That's what I call I a loss. Considering that, who
> cares about /etc?
really what about all your certificates in /etc/ssl, or your machines
ssh keys, or all that configuration information for your system mail,
ldap, userids, passwords, apache setup, postgress setup.

Admittedly you could re create these from memory but, there are some
things that you can't

>
> > > a single disk is the simplest to deal with. --- I might have done it
> > > otherwise, but it has been impossible to install on SATA disks because
> > > the modules required to access SATA disks are not available to the
> >
> > if you have a look at the latest installer i think you will find it has
> > all the necessary modules now
>
> That would be great :)
>
> > You have missed the point the advantage is have a separate / and a
> > separate /boot to protect them you can even mount /boot as ro.
>
> Oh, ok.
>
> What I was wondering about is what the advantage is of partitioning
> the disks and creating RAIDs from the partitions vs. creating a RAID
> from whole disks and partitioning the RAID?
I have to admit I have evaluated partitioning + raid v's raid +
partitioning, I think I would go with the previous, more system (old
linux box, windows boxes, mac boxes ) understand partitions - where as
not all OS understand raid + partitioning. And currently I don't see the
advantage to raid + partitioning

>
> > All the partitions are raided again for protection.  If you are
> > worried about a little complexity then managing HA and/or production
> > system might not be up your alley.
>
> Well, I've done it for quite a while. But I found it very helpful to
> make things no more complex than needed. The simpler something is, the
> lower the chances are that problems can come up --- and if problems
> come up, it's the easier to deal with them the less complex things
> are.
>
> If you're making things more complex than they have to be, there has
> to be a very good reason to do so. I would like to know that reason
> since I could learn something from you I'd never have thought of.
I believe the complexity is not that high and the returns are worth it,
I haven't lost any information that I have had protected in a long time.

>
> > Having said all that, there is no golden rule, each situation needs to
> > be addresses individually weighing you the risks compared to the gains
>
> indeed
>
> > For me as a creature of habit I usually follow the layout I
> > specified before - because it has worked and it has save me time and
> > it is very flexible, your mileage might vary.
>
> Is it more flexible when you make partitions and then RAIDs from them
> than it is to make a RAID from the disks and partition that?
>
> I also tend to stick with my habits, but that isn't always a good
> thing. One needs to keep learning, and that can mean to change a habit
> because there's a better way of doing something.
true, which is why I throw the book away and try different things some
times, always good to learn new stuff



>
>

--
"Now, there are some who would like to rewrite history--revisionist historians is what I like to call them."

        - George W. Bush
06/16/2003
Elizabeth, NJ


signature.asc (204 bytes) Download Attachment

Re: Debian+LVM+RAID

by Roger Leigh-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 10:45:08PM +0200, martin f krafft wrote:
> also sprach thveillon.debian <thveillon.debian@...> [2009.07.09.2215 +0200]:
> > It is possible to boot from mdadm software raid1 with grub2, in Lenny
> > and Squeeze. But I would worry about the lvm, I don't think this is as
> > straightforward, maybe not even possible at this point (to be
> > double-checked anyway).
>
> grub2 can boot LVM just as well as it can boot RAID1 or RAID5.

Is this stable for production use, or still in the experimental
stage?


--
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Debian+LVM+RAID

by martin f krafft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

also sprach Roger Leigh <rleigh@...> [2009.07.10.0131 +0200]:
> > grub2 can boot LVM just as well as it can boot RAID1 or RAID5.
>
> Is this stable for production use, or still in the experimental
> stage?

It's non-default in lenny still, but it works. That's all I can tell
you, sorry.

--
 .''`.   martin f. krafft <madduck@...>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
"geld ist das brecheisen der macht."
                                                 - friedrich nietzsche


digital_signature_gpg.asc (204 bytes) Download Attachment
< Prev | 1 - 2 | Next >