Re: [CentOS] RAID questions

2017-02-19 Thread Dennis Jacobfeuerborn
On 15.02.2017 03:10, TE Dukes wrote:
> 
> 
>> -Original Message-
>> From: CentOS [mailto:centos-boun...@centos.org] On Behalf Of John R
>> Pierce
>> Sent: Tuesday, February 14, 2017 8:13 PM
>> To: centos@centos.org
>> Subject: Re: [CentOS] RAID questions
>>
>> On 2/14/2017 5:08 PM, Digimer wrote:
>>> Note; If you're mirroring /boot, you may need to run grub install on
>>> both disks to ensure they're both actually bootable (or else you might
>>> find yourself doing an emergency boot off the CentOS ISO and
>>> installing grub later).
>>
>> I left that out because the OP was talking about booting from a seperate
> SSD,
>> and only mirroring his data drive.
>>
> Thanks!!
> 
> I'm only considering a SSD drive due to the lack of 3.5 drive space. I have
> unused 5.25 bays but I'd have to get an adapter.
> 
> I probably don't need to go the RAID 10 route. I just need/would like some
> kind of redundancy for backups. This is a home system but over the years due
> to HD, mainboard, power supply failures, I have lost photos, etc, that can
> never be replaced. Backing up gigabytes/terabytes of data to cloud storage
> would be impractical due to bandwidth limitations.
> 
> Just looking for a solution better than what I have. A simple mirror is more
> than I have now. I'd like to add another drive for redundancy and go from
> there.
> 
> What should I do?

RAID is *not* a backup. If a virus or buggy program or an accidental "rm
-rf *" in the wrong directory deletes files on a RAID then these files
are obviously gone on the replicas as well.
If you want to prevent the loss of files then instead you should add a
second disk to the system and simply backup data on a daily basis to
that disk.
A RAID array is not the appropriate way to go for you scenario described
above.

Regards,
  Dennis


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-17 Thread Keith Keller
On 2017-02-17, John R Pierce  wrote:
> On 2/16/2017 9:18 PM, Keith Keller wrote:
>>> Only some systems support that sort of restriping, and its a dangerous
>>> activity (if the power fails or system crashes midway through the
>>> restriping operation, its probably not restartable, you quite likely
>>> will lose the whole volume)
>> Doesn't mdraid support changing RAID levels?  I think it will even do it
>> reasonably safely (though still better not to have a power failure!).  I
>> have a vague memory of adding a drive to a RAID5 and converting it to a
>> RAID6 but I could be misremembering.
>
> any such operation requires the entire raid to be re-slivered, stripe by 
> stripe, as ALL the data moves around. on a large raid made from 
> multi-terabyte drives, this would take DAYS.

Yes, it would take a long time, but the man page for mdadm implies that
it's reasonably safe (sorry for long lines):

   Changing the number of active devices in a RAID5 or RAID6 is much more 
effort.  Every  block  in
   the  array will need to be read and written back to a new location.  
From 2.6.17, the Linux Ker-
   nel is able to increase the number of devices in a RAID5 safely, 
including restarting an  inter-
   rupted  "reshape".   From 2.6.31, the Linux Kernel is able to increase 
or decrease the number of
   devices in a RAID5 or RAID6.
[...]
   When  relocating  the first few stripes on a RAID5 or RAID6, it is not 
possible to keep the data
   on disk completely consistent and crash-proof.  To provide the required 
safety,  mdadm  disables
   writes  to  the  array while this "critical section" is reshaped, and 
takes a backup of the data
   that is in that section.  For grows, this backup may be stored in any  
spare  devices  that  the
   array  has,  however  it  can also be stored in a separate file 
specified with the --backup-file
   option, and is required to be specified for shrinks, RAID level changes 
and layout changes.   If
   this option is used, and the system does crash during the critical 
period, the same file must be
   passed to --assemble to restore the backup and reassemble the array.  
When shrinking rather than
   growing the array, the reshape is done from the end towards the 
beginning, so the "critical sec-
   tion" is at the end of the reshape.

(Thanks to Gordon for the pointer to the GROW section of the mdam man page.)

It's been a long time since I did this, but I seem to remember resizing
an md array of ~10 2TB drives in a RAID5 by adding one drive and reshaping
to RAID6, and it took 2-3 days.

The old 3ware controllers claimed to be able to support this sort of reshaping,
but I only tried once and it failed.  I don't know if LSI or Areca
supports it.

--keith

-- 
kkel...@wombat.san-francisco.ca.us


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-17 Thread Gordon Messmer

On 02/16/2017 09:18 PM, Keith Keller wrote:

Doesn't mdraid support changing RAID levels?



It supports a small number of conversions.  See the "GROW MODE" section 
of mdadm for details.


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-16 Thread John R Pierce

On 2/16/2017 9:18 PM, Keith Keller wrote:

On 2017-02-15, John R Pierce  wrote:

On 2/14/2017 4:48 PM,tdu...@palmettoshopper.com  wrote:


3 - Can additional drive(s) be added later with a changein RAID level
without current data loss?

Only some systems support that sort of restriping, and its a dangerous
activity (if the power fails or system crashes midway through the
restriping operation, its probably not restartable, you quite likely
will lose the whole volume)

Doesn't mdraid support changing RAID levels?  I think it will even do it
reasonably safely (though still better not to have a power failure!).  I
have a vague memory of adding a drive to a RAID5 and converting it to a
RAID6 but I could be misremembering.


any such operation requires the entire raid to be re-slivered, stripe by 
stripe, as ALL the data moves around. on a large raid made from 
multi-terabyte drives, this would take DAYS.



--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-16 Thread Keith Keller
On 2017-02-15, John R Pierce  wrote:
> On 2/14/2017 4:48 PM, tdu...@palmettoshopper.com wrote:
>
>> 3 - Can additional drive(s) be added later with a changein RAID level
>> without current data loss?
>
> Only some systems support that sort of restriping, and its a dangerous 
> activity (if the power fails or system crashes midway through the 
> restriping operation, its probably not restartable, you quite likely 
> will lose the whole volume)

Doesn't mdraid support changing RAID levels?  I think it will even do it
reasonably safely (though still better not to have a power failure!).  I
have a vague memory of adding a drive to a RAID5 and converting it to a
RAID6 but I could be misremembering.

--keith

-- 
kkel...@wombat.san-francisco.ca.us


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-14 Thread Andreas Benzler
Am Dienstag, den 14.02.2017, 20:21 -0500 schrieb Digimer:
> On 14/02/17 08:12 PM, John R Pierce wrote:
> > On 2/14/2017 5:08 PM, Digimer wrote:
> >> Note; If you're mirroring /boot, you may need to run grub install on
> >> both disks to ensure they're both actually bootable (or else you might
> >> find yourself doing an emergency boot off the CentOS ISO and installing
> >> grub later).
> > 
> > I left that out because the OP was talking about booting from a seperate
> > SSD, and only mirroring his data drive.
> 
> Ah, ok, that makes sense.
> 
What we did test out and use on huge centos file system servers is 

http://relax-and-recover.org/

Rear put you working kernel, needed kernel for your machine for example,
onto usb or iso.  A Bare-metal copy of you base system for recovery
disaster can copy back over another value.

Sincerely

Andy


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-14 Thread TE Dukes


> -Original Message-
> From: CentOS [mailto:centos-boun...@centos.org] On Behalf Of John R
> Pierce
> Sent: Tuesday, February 14, 2017 8:13 PM
> To: centos@centos.org
> Subject: Re: [CentOS] RAID questions
> 
> On 2/14/2017 5:08 PM, Digimer wrote:
> > Note; If you're mirroring /boot, you may need to run grub install on
> > both disks to ensure they're both actually bootable (or else you might
> > find yourself doing an emergency boot off the CentOS ISO and
> > installing grub later).
> 
> I left that out because the OP was talking about booting from a seperate
SSD,
> and only mirroring his data drive.
> 
Thanks!!

I'm only considering a SSD drive due to the lack of 3.5 drive space. I have
unused 5.25 bays but I'd have to get an adapter.

I probably don't need to go the RAID 10 route. I just need/would like some
kind of redundancy for backups. This is a home system but over the years due
to HD, mainboard, power supply failures, I have lost photos, etc, that can
never be replaced. Backing up gigabytes/terabytes of data to cloud storage
would be impractical due to bandwidth limitations.

Just looking for a solution better than what I have. A simple mirror is more
than I have now. I'd like to add another drive for redundancy and go from
there.

What should I do?

TIA

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-14 Thread Digimer
On 14/02/17 08:12 PM, John R Pierce wrote:
> On 2/14/2017 5:08 PM, Digimer wrote:
>> Note; If you're mirroring /boot, you may need to run grub install on
>> both disks to ensure they're both actually bootable (or else you might
>> find yourself doing an emergency boot off the CentOS ISO and installing
>> grub later).
> 
> I left that out because the OP was talking about booting from a seperate
> SSD, and only mirroring his data drive.

Ah, ok, that makes sense.

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-14 Thread John R Pierce

On 2/14/2017 5:08 PM, Digimer wrote:

Note; If you're mirroring /boot, you may need to run grub install on
both disks to ensure they're both actually bootable (or else you might
find yourself doing an emergency boot off the CentOS ISO and installing
grub later).


I left that out because the OP was talking about booting from a seperate 
SSD, and only mirroring his data drive.



--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-14 Thread Digimer
On 14/02/17 07:58 PM, John R Pierce wrote:
> On 2/14/2017 4:48 PM, tdu...@palmettoshopper.com wrote:
>> 1- Better to go with a hardware RAID (mainboardsupported) or software?
> 
> I would only use hardware raid if its a card with battery (or
> supercap+flash) backed writeback cache, such as a megaraid, areca, etc. 
> otherwise I would use mdraid mirroring.
> 
> 
>> 2 - Can an existing drive with data on it be used as aRAID drive without
>> losing current data?
> 
> software mdraid will let you add a mirror to an existing disk.or if
> its using LVM, you can mirror in LVM now.

Note; If you're mirroring /boot, you may need to run grub install on
both disks to ensure they're both actually bootable (or else you might
find yourself doing an emergency boot off the CentOS ISO and installing
grub later).

>> 3 - Can additional drive(s) be added later with a changein RAID level
>> without current data loss?
> 
> Only some systems support that sort of restriping, and its a dangerous
> activity (if the power fails or system crashes midway through the
> restriping operation, its probably not restartable, you quite likely
> will lose the whole volume)...with LVM mirroring, you can add more
> pairs of drives as additional mirrors to the volume group.
> 
> 


-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID questions

2017-02-14 Thread John R Pierce

On 2/14/2017 4:48 PM, tdu...@palmettoshopper.com wrote:

1- Better to go with a hardware RAID (mainboardsupported) or software?


I would only use hardware raid if its a card with battery (or 
supercap+flash) backed writeback cache, such as a megaraid, areca, etc.  
otherwise I would use mdraid mirroring.




2 - Can an existing drive with data on it be used as aRAID drive without
losing current data?


software mdraid will let you add a mirror to an existing disk.or if 
its using LVM, you can mirror in LVM now.



3 - Can additional drive(s) be added later with a changein RAID level
without current data loss?


Only some systems support that sort of restriping, and its a dangerous 
activity (if the power fails or system crashes midway through the 
restriping operation, its probably not restartable, you quite likely 
will lose the whole volume)...with LVM mirroring, you can add more 
pairs of drives as additional mirrors to the volume group.



--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos