Re: [SLUG] Upgrading OS RAID

2011-01-10 Thread Kyle

 Thanks SLUG,

lots of ideas. I'll get reading further.
--

Kind Regards

Kyle

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Upgrading OS RAID

2011-01-09 Thread Kyle

 Hi Folks,

it appears one of the disks in my s'ware RAID is failing. So I've come 
to SLUG for some consensus and confirmation.


1. How do I go about rebuilding the RAID with ALL brand new disks 
(obviously no longer the same disks, but now newer spec larger disks) 
such that I don't lose not only the data but don't have to rebuild the 
whole machine again?


2. I'm better sticking with linux s'ware RAID rather than setting up a 
m'board BIOS supported RAID aren't I?


3. It's been a while since I delved into h'ware etc. So SATA II disks 
will simply plug into, and function correctly, SATA plugs, yes or no? Or 
are we now at a stage where I also have to worry about whether or not 
the m'board will actually support the disks I want to put in?


--


Kyle

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Upgrading OS RAID

2011-01-09 Thread Kyle

  Hi Folks,

it appears one of the disks in my s'ware RAID is failing. So I've come 
to SLUG for some consensus and confirmation.


1. How do I go about rebuilding the RAID with ALL brand new disks 
(obviously no longer the same disks, but now newer spec larger disks) 
such that I don't lose not only the data but don't have to rebuild the 
whole machine again?


2. I'm better sticking with linux s'ware RAID rather than setting up a 
m'board BIOS supported RAID aren't I?


3. It's been a while since I delved into h'ware etc. So SATA II disks 
will simply plug into, and function correctly, SATA plugs, yes or no? Or 
are we now at a stage where I also have to worry about whether or not 
the m'board will actually support the disks I want to put in?

--

Kind Regards

Kyle

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Menno Schaaf
On 10 January 2011 09:05, Kyle k...@attitia.com wrote:
  Hi Folks,

 it appears one of the disks in my s'ware RAID is failing. So I've come to
 SLUG for some consensus and confirmation.

 1. How do I go about rebuilding the RAID with ALL brand new disks (obviously
 no longer the same disks, but now newer spec larger disks) such that I don't
 lose not only the data but don't have to rebuild the whole machine again?


Install the new drives seperatly and make a new array, then copy the
data across. The other option is to take out a disk, put a new one in,
rebuild, rinse and repeat for the rest of the drives and then expand
the array to fit the disks, but this is stressful on the other disks
and increases the chance of having a disk fail during rebuilding.

 2. I'm better sticking with linux s'ware RAID rather than setting up a
 m'board BIOS supported RAID aren't I?

Pretty much, at least then your motherboad can fail and you can
replace it without having to get the exact model.


 3. It's been a while since I delved into h'ware etc. So SATA II disks will
 simply plug into, and function correctly, SATA plugs, yes or no? Or are we
 now at a stage where I also have to worry about whether or not the m'board
 will actually support the disks I want to put in?

Should do.


 --
 

 Kyle

 --
 SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
 Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Dean Hamstead

1. How do I go about rebuilding the RAID with ALL brand new disks
(obviously no longer the same disks, but now newer spec larger disks)
such that I don't lose not only the data but don't have to rebuild the
whole machine again?


Your goal isnt clear. Can you please elaborate?


2. I'm better sticking with linux s'ware RAID rather than setting up a
m'board BIOS supported RAID aren't I?


yes. although that stops you from booting raid-0 or raid-5. However if 
you want root as raid-0 or raid-5 - usually what you want is to make a 
small /boot partition and soft mirror it (making it bootable), then make 
/ a raid-0 partition.


In any case, motherboard raid is called fake raid for a reason :)


3. It's been a while since I delved into h'ware etc. So SATA II disks
will simply plug into, and function correctly, SATA plugs, yes or no? Or
are we now at a stage where I also have to worry about whether or not
the m'board will actually support the disks I want to put in?


Essentially its just plug and play.

Dean
--
http://fragfest.com.au
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Daniel Pittman
On Sun, Jan 9, 2011 at 14:05, Kyle k...@attitia.com wrote:

 it appears one of the disks in my s'ware RAID is failing. So I've come to
 SLUG for some consensus and confirmation.

 1. How do I go about rebuilding the RAID with ALL brand new disks (obviously
 no longer the same disks, but now newer spec larger disks) such that I don't
 lose not only the data but don't have to rebuild the whole machine again?

Replace the disks one at a time, allowing the rebuild to fully
complete between each disk.  Once you have the entire array running on
the larger disks, mdadm can increase the size of the array, and you
can resize your file system inside it.  (...and check you *can* do
that before you go to the trouble.)

My advice is to read the mdadm manual page to find out how; if that
doesn't make sense, don't tackle this replacement yet, but keep
learning until it does make sense - because a slip here can cost you
all your data.

It is highly advisable to have good backups, though, while doing this.
 The most likely time to discover that you have a bad block on a
second disk is during a rebuild, and that could result in the array
going away.  This is not unrecoverable, but it is hard. :)

Obviously, create a new array and copy data works too, and isn't a bad
choice if you can manage it.  Practical issues like space in the case
might make it hard though.

 2. I'm better sticking with linux s'ware RAID rather than setting up a
 m'board BIOS supported RAID aren't I?

Absolutely.  Unless you have a real hardware RAID card, use Linux
software RAID.  Even then it isn't a bad choice. :)  The built-in
stuff on your motherboard isn't hardware RAID, but software RAID with
a bit of BIOS glue to support booting from it.

 3. It's been a while since I delved into h'ware etc. So SATA II disks will
 simply plug into, and function correctly, SATA plugs, yes or no? Or are we
 now at a stage where I also have to worry about whether or not the m'board
 will actually support the disks I want to put in?

Yeah, it should be just fine.

Regards,
Daniel
-- 
✉ Daniel Pittman dan...@rimspace.net
⌨ dan...@rimspace.net (XMPP)
☎ +1 503 893 2285
♻ made with 100 percent post-consumer electrons
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Kyle
 My goal is to replace ALL the current 500GB disks with all new 1TB 
disks into a new RAID 1 array and yet maintain the entire machine's 
installation and configuration.


I.e. If it were as simple as;

1. as suggested by Menno - install disks separately; create new RAID 1 
with appropriate /boot  /

2. Copy entire contents of old RAID1 /boot and / to new RAID
3. remove old RAID, replace old for new.
4. Perhaps some bios fiddling and presto new disks.

that would be nice.

But somewhere in there I've got to transfer the system onto the new 
RAID. Just haven't figured out how yet. Plus any other gotchas I don't 
yet know about.



Kind Regards

Kyle

On 10/01/11 9:32 AM, Dean Hamstead wrote:

1. How do I go about rebuilding the RAID with ALL brand new disks
(obviously no longer the same disks, but now newer spec larger disks)
such that I don't lose not only the data but don't have to rebuild the
whole machine again?


Your goal isnt clear. Can you please elaborate?



--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Dean Hamstead

Just use a boot disk and cpio?

Dean

On 10/01/11 10:42, Kyle wrote:

My goal is to replace ALL the current 500GB disks with all new 1TB disks
into a new RAID 1 array and yet maintain the entire machine's
installation and configuration.

I.e. If it were as simple as;

1. as suggested by Menno - install disks separately; create new RAID 1
with appropriate /boot  /
2. Copy entire contents of old RAID1 /boot and / to new RAID
3. remove old RAID, replace old for new.
4. Perhaps some bios fiddling and presto new disks.

that would be nice.

But somewhere in there I've got to transfer the system onto the new
RAID. Just haven't figured out how yet. Plus any other gotchas I don't
yet know about.


Kind Regards

Kyle

On 10/01/11 9:32 AM, Dean Hamstead wrote:

1. How do I go about rebuilding the RAID with ALL brand new disks
(obviously no longer the same disks, but now newer spec larger disks)
such that I don't lose not only the data but don't have to rebuild the
whole machine again?


Your goal isnt clear. Can you please elaborate?




--
http://fragfest.com.au
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Jamie Wilkinson
On 9 January 2011 15:42, Kyle k...@attitia.com wrote:

  My goal is to replace ALL the current 500GB disks with all new 1TB disks
 into a new RAID 1 array and yet maintain the entire machine's installation
 and configuration.

 I.e. If it were as simple as;

 1. as suggested by Menno - install disks separately; create new RAID 1 with
 appropriate /boot  /
 2. Copy entire contents of old RAID1 /boot and / to new RAID
 3. remove old RAID, replace old for new.
 4. Perhaps some bios fiddling and presto new disks.

 that would be nice.

 But somewhere in there I've got to transfer the system onto the new RAID.
 Just haven't figured out how yet. Plus any other gotchas I don't yet know
 about.


I posted this a long time ago to slug:  (Tried to find a copy on the slug
website but apparently slug no longer has its own online archives?)
 http://www.mail-archive.com/slug@slug.org.au/msg41286.html

I haven't used this process for a very long time though, so the details may
have changed.  One of the trickier hacks was to use pivot_root to remount
the root filesystem onto the new raid device once the data was copied
across.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Nick Andrew
On Mon, Jan 10, 2011 at 10:42:43AM +1100, Kyle wrote:
  My goal is to replace ALL the current 500GB disks with all new 1TB  
 disks into a new RAID 1 array and yet maintain the entire machine's  
 installation and configuration.

It's a common requirement. The hardest bit is getting the boot
sequence right as several components are involved: MBR, Grub/LILO,
initramfs and filesystem UUIDs.

 I.e. If it were as simple as;

 1. as suggested by Menno - install disks separately; create new RAID 1  
 with appropriate /boot  /

If you're not using LVM then I suggest starting. The main benefits are
the ability to add/delete/resize logical volumes, often on the fly; it's
much more flexible than fixed partition tables.

When you want to upgrade in future you can add a new physical volume
(i.e. raid set) to an existing LVM volume group and move your filesystems
from one physical volume to another while the system is running.

 2. Copy entire contents of old RAID1 /boot and / to new RAID

If /etc/fstab references filesystem UUIDs, then update the new copy to
new UUIDs.

 3. remove old RAID, replace old for new.
 4. Perhaps some bios fiddling and presto new disks.

I don't suppose you have an EFI bios?

PCs ... so primitive; we're still hobbled by 1980s era standards.

 But somewhere in there I've got to transfer the system onto the new  
 RAID. Just haven't figured out how yet. Plus any other gotchas I don't  
 yet know about.

At least if you drop it into single-user mode then a reliable copy of
the current root filesystem can be made. It's not necessary to boot from
a rescue disk (CD/USB) although that might have menus to help you with setup.

I found the most reliable transfer is a pair of tar commands:

cd /  tar -c --one-file-system -f - . | (cd /new_rootdir  tar xpf - 
)

'cp' has problems copying sockets / named pipes and I almost always want
to limit any recursive operation to the same filesystem because I don't
want to copy /proc by mistake.

Nick.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Amos Shapira
On 10 January 2011 10:42, Kyle k...@attitia.com wrote:

  My goal is to replace ALL the current 500GB disks with all new 1TB disks 
 into a new RAID 1 array and yet maintain the entire machine's installation 
 and configuration.

 I.e. If it were as simple as;

 1. as suggested by Menno - install disks separately; create new RAID 1 with 
 appropriate /boot  /
 2. Copy entire contents of old RAID1 /boot and / to new RAID
 3. remove old RAID, replace old for new.
 4. Perhaps some bios fiddling and presto new disks.

 that would be nice.

 But somewhere in there I've got to transfer the system onto the new RAID. 
 Just haven't figured out how yet. Plus any other gotchas I don't yet know 
 about.

Look at pvmove, it should be as simple as that, except maybe an
extra step to get GRUB stuff on the boot sectors of the new disks (you
want grub to be able to boot from both sides of the mirror RAID).

i.e. you'll have to do something like:
1. Configure the new disk array as a new PV, maybe set aside a boot
partition outside the PV if you don't want to depend on grub2's
ability to boot from it.
2. add the PV to the Volume Group (VG) to which the old PV belongs to.
3. pvmove old-pv new-pv
4. Make sure you can boot and work with the new raid array.
5. IMPORTANT: pvremove old-pv - otherwise the system will refuse to
use the VG after you remove the old array.

--Amos
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Jake Anderson

what he said.
boot off a live cd
create the new raid
DD if=oldraid of=newraid bs=somethingbig

expand partitions as you want
reboot and cross fingers.

you *might* need to edit the /etc/mdadm.conf file on the new raid.
but probably not, depending on the vintage your running.

dd should mean that all the uuid's stay the same etc.
if you have lots of free space it'll be slower, (but then if your 
increasing size odds are its because your out of space)

if you have lots of small files it may well be faster.

On 10/01/11 10:47, Dean Hamstead wrote:

Just use a boot disk and cpio?

Dean

On 10/01/11 10:42, Kyle wrote:

My goal is to replace ALL the current 500GB disks with all new 1TB disks
into a new RAID 1 array and yet maintain the entire machine's
installation and configuration.

I.e. If it were as simple as;

1. as suggested by Menno - install disks separately; create new RAID 1
with appropriate /boot  /
2. Copy entire contents of old RAID1 /boot and / to new RAID
3. remove old RAID, replace old for new.
4. Perhaps some bios fiddling and presto new disks.

that would be nice.

But somewhere in there I've got to transfer the system onto the new
RAID. Just haven't figured out how yet. Plus any other gotchas I don't
yet know about.


Kind Regards

Kyle

On 10/01/11 9:32 AM, Dean Hamstead wrote:

1. How do I go about rebuilding the RAID with ALL brand new disks
(obviously no longer the same disks, but now newer spec larger disks)
such that I don't lose not only the data but don't have to rebuild the
whole machine again?


Your goal isnt clear. Can you please elaborate?






--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Chris Donovan
 I posted this a long time ago to slug:  (Tried to find a copy on the slug
 website but apparently slug no longer has its own online archives?)
  http://www.mail-archive.com/slug@slug.org.au/msg41286.html

This.  Do this and you'll save time, and effort.  Don't use dd, that's
just a terrible waste of time, and heat.  I'm sure if you set up your
first software raid, that you'll be able to figure out any differences
or changes since Jamie's post above, and of course if you're unable to
figure out those differences, ask more questions (:

Chris-
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Upgrading OS RAID

2011-01-09 Thread Ben Donohue

Hi,

I don't know enough about your hardware but a sort of longer way to do 
this without worrying about expanding arrays and crossing your fingers is...


replace the 500GB disks with the 1TB disks one by one so that the raid 
array has time to rebuild on each disk.
then you end up with your raid volume on the new 1TB disks and you have 
a bunch of 500GB disks free.
create a new raid set with the 500GB disks and copy everything from the 
1TB raid to the 500GB disks.

delete the raid set on the 1TB disks.
create a raid set on the 1TB disks using all the space now available.
copy the data from the 500GB raid set to the 1TB disks
delete the 500 GB raid set.

A bit longer and involved however you can use your data while rebuilding 
the raid set



Thanks,
Ben Donohue


On 10/01/2011 9:21 AM, Kyle wrote:

  Hi Folks,

it appears one of the disks in my s'ware RAID is failing. So I've come 
to SLUG for some consensus and confirmation.


1. How do I go about rebuilding the RAID with ALL brand new disks 
(obviously no longer the same disks, but now newer spec larger disks) 
such that I don't lose not only the data but don't have to rebuild the 
whole machine again?


2. I'm better sticking with linux s'ware RAID rather than setting up a 
m'board BIOS supported RAID aren't I?


3. It's been a while since I delved into h'ware etc. So SATA II disks 
will simply plug into, and function correctly, SATA plugs, yes or no? 
Or are we now at a stage where I also have to worry about whether or 
not the m'board will actually support the disks I want to put in?

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html