Matt Brock | 13 Dec 2010 20:37
Favicon

[ydl-gen] Software RAID - making the spare bootable

Hi there.

(I posted this onto the YDL forums earlier today, so apologies to  
anyone who's seen it twice.)

I've been using YDL on Xserve G5s for a couple of years now and it  
does a great job. Recently I decided to rebuild one with software RAID  
to get disk redundancy. I did all of this through the installer. The  
server has three disks, so I set them up as RAID 1 with a spare.

This has all gone very successfully apart from one detail. The two  
disks in the RAID set are bootable, i.e. I can remove either of those  
disks and the machine will still boot as normal. That's fine so far.  
Then I permanently removed the first disk and brought the spare third  
disk into the RAID set instead. Once the RAID set is then fully  
rebuilt I can boot off the original second disk, but the third disk  
which was previously the spare disk is not bootable. It gets to the  
first yaboot stage, and then the blue icon which represents OpenBoot  
failing to find a boot disk appears superimposed over the yaboot  
screen. That process just loops over and over again and never boots.

I've tried using ybin to make the Apple boot partition bootable with  
the correct yaboot config, but that didn't help. I've tried dd-ing the  
entire second disk onto the third disk then zeroing the RAID  
superblocks, and that didn't work. I've tried resetting the NVRAM and  
that made no difference. I'm sure it's not a hardware problem with the  
disk because I've tried this twice now with the disks in different  
slots each time, and it's always the spare disk which has the boot  
problem even though that's a different physical disk each time.

(Continue reading)

Derick Centeno | 14 Dec 2010 23:05
Favicon

Re: [ydl-gen] Software RAID - making the spare bootable

Question:
Correct me if I missed something, but wasn't the third "spare" intended 
to be an exact mirror so that it could replace either the first or 
second drive?

For the "spare" to be a replacement for either the first or the second 
drive it also would have matched the exact partition structure of the 
first two.  In this particular sense the "spare" is really no "spare" at 
all, but a sort of emergency last ditch fail-safe in the event that 
either the first or second drive failed.  This also means that the for 
the RAID 1 system to function with a fail-safe option/strategy the third 
drive had to be prepared properly so that it could potentially replace 
any one of the other two at any time.

Zeroing the RAID superblocks and attempting to make the Apple partition 
bootable via ybin may have been mistakes; however the strategy to dd the 
second (or first) drive onto the "spare" appears reasonable.

Is it possible to reformat/restructure all three disks, using YDL, so 
that function is restored?

On 12/13/10 2:37 PM, Matt Brock wrote:
> Hi there.
>
> (I posted this onto the YDL forums earlier today, so apologies to 
> anyone who's seen it twice.)
>
> I've been using YDL on Xserve G5s for a couple of years now and it 
> does a great job. Recently I decided to rebuild one with software RAID 
> to get disk redundancy. I did all of this through the installer. The 
(Continue reading)

Matt Brock | 17 Dec 2010 13:30
Favicon

Re: [ydl-gen] Software RAID - making the spare bootable

Yes, that's exactly right. The spare is set up in just that way, and  
when I bring it into the array it works fine as the second disk once  
the sync process is completed. The only problem is that I can't get  
the server to boot off that new second disk, and that's what's  
frustrating me.

On 14 Dec 2010, at 22:05, Derick Centeno wrote:

> Question:
> Correct me if I missed something, but wasn't the third "spare"  
> intended to be an exact mirror so that it could replace either the  
> first or second drive?
>
> For the "spare" to be a replacement for either the first or the  
> second drive it also would have matched the exact partition  
> structure of the first two.  In this particular sense the "spare" is  
> really no "spare" at all, but a sort of emergency last ditch fail- 
> safe in the event that either the first or second drive failed.   
> This also means that the for the RAID 1 system to function with a  
> fail-safe option/strategy the third drive had to be prepared  
> properly so that it could potentially replace any one of the other  
> two at any time.
>
> Zeroing the RAID superblocks and attempting to make the Apple  
> partition bootable via ybin may have been mistakes; however the  
> strategy to dd the second (or first) drive onto the "spare" appears  
> reasonable.
>
> Is it possible to reformat/restructure all three disks, using YDL,  
> so that function is restored?
(Continue reading)

Derick Centeno | 17 Dec 2010 22:16
Favicon

Re: [ydl-gen] Software RAID - making the spare bootable

Questions:
You can boot from the original second drive but not from it's replacement??

Are you familiar with the application within YDL known as parted (aka: 
partition editor)?  It can reveal a rather precise layout of the 
partition table for each of the disks in question which would allow you 
to more precisely determine the location of the partitions as well as 
the file systems used within each partition.  Hopefully these details 
could provide essential information useful in analyzing this problem you 
reported.

Suggestion:
Keep a record of each disk's partition table and file system; compare 
each one to the other two.
Perhaps the copy or duplication routine implemented by the software used 
in creating each of the drives is the source of your difficulties; I'm 
guessing of course.  However, parted would report what consumer grade 
Apple software cannot because Apple software cannot see ext2/3.  
However, Apple Server software could be different; I'm not sure.  My 
focus for some years has been Unix/Linux, not Apple.

If you have the hfstools installed within YDL (use yum) you should be 
able to see, write to, use and create whatever partition structure and 
filesystem you need in the order you need it to be.

Supposition:
When TerraSoft existed and Apple produced PowerPCs there existed a 
recommended two-step installation process which involved using Apple's 
Partitioning tool first so that it created the partitions for Apple's OS 
and the partition format known as Free Space - at the same time.  The 
(Continue reading)

Matt Brock | 27 Dec 2010 10:56
Favicon

Re: [ydl-gen] Software RAID - making the spare bootable

Thanks for your insights, Derick. Through a long process of trial and error I have now managed to solve the
problem. As it was fairly complicated, and as others might benefit from knowing what I did, I wrote a blog
entry to describe the process that worked for me: http://wp.me/pKXV8-ts

Cheers,

Matt.

On 17 Dec 2010, at 21:16, Derick Centeno wrote:

> Questions:
> You can boot from the original second drive but not from it's replacement??
> 
> Are you familiar with the application within YDL known as parted (aka: partition editor)?  It can reveal a
rather precise layout of the partition table for each of the disks in question which would allow you to more
precisely determine the location of the partitions as well as the file systems used within each
partition.  Hopefully these details could provide essential information useful in analyzing this
problem you reported.
> 
> Suggestion:
> Keep a record of each disk's partition table and file system; compare each one to the other two.
> Perhaps the copy or duplication routine implemented by the software used in creating each of the drives is
the source of your difficulties; I'm guessing of course.  However, parted would report what consumer
grade Apple software cannot because Apple software cannot see ext2/3.  However, Apple Server software
could be different; I'm not sure.  My focus for some years has been Unix/Linux, not Apple.
> 
> If you have the hfstools installed within YDL (use yum) you should be able to see, write to, use and create
whatever partition structure and filesystem you need in the order you need it to be.
> 
> Supposition:
(Continue reading)

Bill Fink | 18 Dec 2010 05:21
Picon

Re: [ydl-gen] Software RAID - making the spare bootable

Matt,

If the root filesystem in /etc/fstab is being mounted via UUID,
then the new disk is going to have a different UUID.  I use the
LABEL option instead after having labelled the partition, but
I don't know if that would work with your RAID configuration.

Perhaps this info might help you.

					-Bill

On Fri, 17 Dec 2010, Matt Brock wrote:

> Yes, that's exactly right. The spare is set up in just that way, and  
> when I bring it into the array it works fine as the second disk once  
> the sync process is completed. The only problem is that I can't get  
> the server to boot off that new second disk, and that's what's  
> frustrating me.
> 
> On 14 Dec 2010, at 22:05, Derick Centeno wrote:
> 
> > Question:
> > Correct me if I missed something, but wasn't the third "spare"  
> > intended to be an exact mirror so that it could replace either the  
> > first or second drive?
> >
> > For the "spare" to be a replacement for either the first or the  
> > second drive it also would have matched the exact partition  
> > structure of the first two.  In this particular sense the "spare" is  
> > really no "spare" at all, but a sort of emergency last ditch fail- 
(Continue reading)

Matt Brock | 27 Dec 2010 10:53
Favicon

Re: [ydl-gen] Software RAID - making the spare bootable

Thanks for the suggestion, Bill, but filesystems were just being mounted via the RAID partition, not the
UUID, and I've finally solved the problem now (see other email).

Cheers,

Matt.

On 18 Dec 2010, at 04:21, Bill Fink wrote:

> Matt,
> 
> If the root filesystem in /etc/fstab is being mounted via UUID,
> then the new disk is going to have a different UUID.  I use the
> LABEL option instead after having labelled the partition, but
> I don't know if that would work with your RAID configuration.
> 
> Perhaps this info might help you.
> 
> 					-Bill
> 
> 
> 
> On Fri, 17 Dec 2010, Matt Brock wrote:
> 
>> Yes, that's exactly right. The spare is set up in just that way, and  
>> when I bring it into the array it works fine as the second disk once  
>> the sync process is completed. The only problem is that I can't get  
>> the server to boot off that new second disk, and that's what's  
>> frustrating me.
>> 
(Continue reading)


Gmane