Thread (3 messages) 3 messages, 3 authors, 2007-10-17

Re: Unsure of changes to array

From: Nagilum <hidden>
Date: 2007-10-17 14:53:06

----- Message from jonathan.gazeley@bristol.ac.uk ---------
     Date: Wed, 17 Oct 2007 15:04:52 +0100
     From: Jonathan Gazeley [off-list ref]
Reply-To: Jonathan Gazeley [off-list ref]
  Subject: Unsure of changes to array
       To: linux-raid@vger.kernel.org

Dear all,

This is hopefully a simple question for you to answer, but I am fairly
new to RAID and don't want to risk losing my data!

My setup is as follows:
- I have four 500GB disks. Each disk is split into a 5GB partition, and
a 495GB partition.
- The four 5GB partitions are in a RAID-5 array, md0. CentOS is
installed on this 15GB partition.
- The four 495GB partiions are in a RAID-5 array, md1. This partition
holds my user data.

However, I have decided I no longer wish to two arrays across the
disks. I've added a fifth disk on which I have installed the OS without
RAID, meaning the old md0 is currently unused. Can I simply remove the
four 5GB partitions, and resize the four 495GB partitions to fill the
entire disk? Will this break anything?

Before anybody tells me off for having the OS on a non-RAID disk, this
is a home server and therefore high availability is not an issue. But
keeping my data safe against disk failures is important to me.

Cheers,
Jonathan
----- End message from jonathan.gazeley@bristol.ac.uk -----

***CAUTION***CAUTION***CAUTION***
Do backups if you can..
Are the RAID partitions on your disk the first partition or a different one?
If its not the first partition you'll have _move_ your partition to  
the beginning of the disk.
So assuming your first disk is /dev/sda, sda1 your OS partition which  
want to recycle, sda2 your RAID partition you could do:
  dd if=/dev/sda2 of=/lots_of_space_here/sda.dump
then repartition your sda, now sda1 is your RAID partition and it  
spans across the whole drive
  dd if=/my_new_disk/sda.dump of=/dev/sda1

After that you should be able to assemble your RAID again with  
/dev/sda1 instead of /dev/sda2. If that works, continue with the other  
disks.
If it doesn't work your array should be degraded and you should still  
be able to add /dev/sda1 and then md should sync to it to become clean  
again.
Note that during this whole operation you will be vulnerable to any  
disk failures. You may think about buying another disk and converting  
to raid6 for an additional layer of protection before attempting this.
If you have friend who has a faint idea what you do have him join you  
to look over your shoulder and stop you from doing silly mistakes  
(e.g. mixing up "if" and "of" during dd). This is a very dangerous  
undertaking make one mistake and your data may be gone...
I hope this helps..
Alex.

========================================================================
#    _  __          _ __     http://www.nagilum.org/ \n icq://69646724 #
#   / |/ /__ ____ _(_) /_ ____ _  nagilum@nagilum.org \n +491776461165 #
#  /    / _ `/ _ `/ / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux #
#           /___/     x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #
========================================================================


----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

Attachments

  • (unnamed) [application/pgp-signature] 187 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help