On 01/27/2012 07:02 AM, Ganguin Michel wrote:
Hi,
I have setup with software raid1:
1. Partitioning 2 disks with a "a" / partition, a "b" swap partition and
a "d" partition for the rest of the disk
2. Creating the softraid raid1 device for both "d" partition with bioctl
3. Partitioning for everything else than / in the softraid device
(including an altroot partition)
um. why put /altroot in softraid?
4. Installing the system
5. Copy the first disk "a" partition on the second disk "a" partition
with dd (dd if=/dev/rsd0a of=/dev/rsd1a)
which would happen automatically if your altroot was sd1a instead of on
the softraid partition.
Except...when the altroot process does this, it skips the disklabel,
which you didn't...thus you clobbered the disklabel you put on sd1.
Maybe it was "close enough".
6. Make the second disk bootable: /usr/mdec/installboot -v /mnt/boot
/usr/mdec/biosboot sd1
also, done automatically by altroot. and your process above, actually.
7. Reboot
Everything is booting well, except that "/" fails to be remounted read/write.
I figured out it's because both disks has the same duid, I manually changed
the duid of one disk. Now everything runs fine, / is remounted read-write.
the 'U' if "duid" is "Unique". by your dd operation, you just rendered
them NON-unique. Kinda a bad idea! :)
I
also added the second swap partition to fstab.
So what would you recommend for a softraid mirror setup? my setup works fine,
but I'm not really happy with this manual fix of the duid.
Pretty close to what you did, 'cept use altroot as an alternate bootable
root drive, not something buried inside something you can't get to
without a good boot.
Then, set up your /etc/fstab file something like this:
/dev/sd0a /
biglongduid.d /tmp
biglongduid.e /usr
...
etc
The biglonguid is your softraid device.
Note that I suggest root is specified by device name, not duid. This is
so the system can come up should the primary device fail and you end up
booting from your secondary device. This is assuming your primary
device either failed completely and is no longer recognized as a disk,
or (more likely) you removed the dead device to get the system to boot.
If your primary device still shows up but isn't readable, you will have
an issue with this, but then, you would have the same issue with duid's,
too.
Another question. I read about softraid that booting on it is not supported,
is it true for raid1 too? A disk part of raid 1 may probably a safely mounted
read-only during boot (I know linux software raid is able to do this).
bootable softraid is in progress.
however, unless you are using Sun SPARC hardware, think hard about how
this would really work in real life.
If your primary disk fails...will your BIOS really try to bring up the
second disk? REALLY? For real-life failures? I bet not, at least in
the general case. So...if you still have to yank the failed disk to
bring the system up (which happens sometimes on Sun HW, too), what is
bootable softraid really getting you?
My last question is about swap, I read in the documentation that RAM dump are
written to the swap partition in case of system crashes and that, of course,
the amount of swap should be greater or equal to the amount of RAM. Must the
RAM dump fit into one swap partition, or could it be splitted in e.g. 2 swap
partitions?
even if it did, it doesn't look like savecore(8) would re-assemble them
for you.
But really...how much RAM do you have in your system? are YOU going to
do something with the core files? Do you have a good way to get a 1+GB
core file to the developers? If yes, then yes, valid concern. If
no...it's a detail you can skip.