Reducing Partition and RAID Migration.

Some initial guidance is requested please.
I have a hardware IBM ServeRaid RAID 1 array of two 500 GB drives. This array has been filled to capacity with a number of partitions (sda1-5) which include my root, home and swap directories and all of which have been formatted. I have now installed another 500 GB drive and wish to migrate to RAID 5 over the three drives, which IBM advise is possible without data loss.

Unfortunately when I try to do this I get an error message telling me there is not enough disk space. This makes sense as there is no free disk space on the RAID 1 at present. I therefore wish to reduce my home partition which is an extended partition so there is free space on the drive which I understand the IBM RAID software can then use for the migration from RAID 1 to RAID 5.

I believe I must boot from a live DVD in order to change the existing system and I seek advice on this, ie best source of live disk and any gotchas. Also does reducing partition size require reformatting and involve loss of data or does it work like when you resize a windoze partition in order too install Linux?

At present running OS: Linux 3.1.10-1.16-desktop x86_64
System: openSUSE 12.1 (x86_64)
KDE: 4.7.2 (4.7.2) “release 5”
I can give system details if needed but just trying to get process sorted at present.

One thing is sure, when you go to meddle around with your partitions, make backups first. That is allways true, but the more so when you are touching partitions.

One more suggestion. If you can backup all your data (not by cloning partitions or disks, but bon the directory/file level), then you could make all of your partitioniing anew as you want to have it and then copy your data back. Often much easier and very often much more straight forward, understandable and thus less error prone to errors then a pages long planning on how to change existing paritions.

One question of you. For going at a partition that is normaly mounted at /home, you must only be sure that nobody is working there and then you must unmount it. That means that youmut login from the console (using Ctrl-Alt-F1). Many people will go to runlevel 1 to be sure that no users can log in No need to use an external live CD/DVD or the like.

You can use any bootable Linux CD/DVD as a “live” one. E.g. use the install DVD, there is a Rescue option there, it will bring you to a root login in the CLI. You need no more.

On 2012-11-16 21:26, hcvv wrote:
> Many people will go to runlevel 1 to be sure that
> no users can log in No need to use an external live CD/DVD or the like.

Actually, level 2 :wink:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Budgie2 wrote:
> Some initial guidance is requested please.
> I have a hardware IBM ServeRaid RAID 1 array of two 500 GB drives.
> This array has been filled to capacity with a number of partitions
> (sda1-5) which include my root, home and swap directories and all of
> which have been formatted. I have now installed another 500 GB drive
> and wish to migrate to RAID 5 over the three drives, which IBM advise is
> possible without data loss.

I don’t know anything about an IBM ServeRaid, and you haven’t told us
anything. For example, is it hardware-based, proprietary software
(a.k.a. fakeraid) or open software (e.g. mdadm)?

But it is not possible in general to transform a full two-disc RAID 1
into a three-disc RAID 5, so I guess this must be some special
capability of the IBM ServeRaid. So I would suggest asking them for full
instructions on what to do.

> Unfortunately when I try to do this I get an error message telling me
> there is not enough disk space. This makes sense as there is no free
> disk space on the RAID 1 at present. I therefore wish to reduce my home
> partition which is an extended partition so there is free space on the
> drive which I understand the IBM RAID software can then use for the
> migration from RAID 1 to RAID 5.

Again, this sounds like a proprietary solution and I suggest referring
to IBM.

The algorithm to do this is quite easy (and it does not matter if the RAID is full or empty) and this transformation could even be done while the RAID is in use.


Before:
Disk 1: 1 2 3 4 5 6 7 8 9
Disk 2: 1 2 3 4 5 6 7 8 9

In Progress:
Disk 1: 1 3 P | 4 5 6 7 8 9 
Disk 2: 2 P 5 | 4 5 6 7 8 9
Disk 3: P 4 6 |

After:
Disk 1: 1 3 P 7 9
Disk 2: 2 P 5 8 P
Disk 3: P 4 6 P

Maybe the IBM hardware allows the following:

  • Remove one disk from the RAID1
  • Build a RAID5 with the two free disks (one drive missing)
  • Copy Data from RAID1 to RAID5
  • Destroy RAID1 and add the disk to RAID5

herbertmeier wrote:
> djh-novell;2504853 Wrote:
>> But it is not possible in general to transform a full two-disc RAID 1
>> into a three-disc RAID 5
>
> The algorithm to do this is quite easy (and it does not matter if the
> RAID is full or empty) and this transformation could even be done while
> the RAID is in use.

Oops! You’re quite right and I was wrong :frowning:

Here are some how-tos:

http://www.arkf.net/blog/?p=47
http://www.n8gray.org/blog/2006/09/05/stupid-raid-tricks-with-evms-and-mdadm/
http://ubuntuforums.org/showthread.php?t=990045