RAID-1 for root/swap on Solaris 10 x86
OK, now that I have solved my problem with the update manager I am in the process of trying to create RAID-1 volumes for root and swap. I am working my way through the process by following the procedure in Solaris Volume Manager Administration Guide. I have run into a few errors in the doc, e.g. referent to using installboot as opposed to installgrub.
Now I am trying to create my new volume using the Enhanced Storage tool within the Solaris Management Console. I get as far as trying to create the new volume (RAID-0) with the root slice in it but it fails with metainit telling me that the slice is already mounted on /. (No kidding -- that is the whole idea.)
Does anyone have a working procedure to create RAID-1 for root and swap?
(BTW, I am trying to do this from the doc and admin guides without stealing time from folks on the list here but I just keep running into walls.)
(Once I get that done I hope to use zfs for the rest of the storage.)
Brian
Message was edited by: brian -- initial post was truncated.
brian.lloyd
# 1
> Now I am trying to create my new volume using the
> Enhanced Storage tool within the Solaris Management
> Console. I get as far as trying to create the new
> volume (RAID-0) with the root slice in it but it
> fails with metainit telling me that the slice is
> already mounted on /. (No kidding -- that is the
> whole idea.)
Do you really mean RAID-0 or RAID-1?You cannot create a slice and keep the existing data.
If you mean a mirror (RAID-1), the docs differentiate between creating a mirror on an unused slice and on an existing filesystem. See:
http://docs.sun.com/app/docs/doc/816-4520/6manpiejj?a=view
When creating on an existing filesystem:
Use the following form of the metainit command:
# metainit -f volume-name number-of-stripes components-per-stripe component-name
-f
Forces the command to continue. You must use this option when the slice contains a mounted file system.
> Does anyone have a working procedure to create RAID-1
> for root and swap?
>
> (BTW, I am trying to do this from the doc and admin
> guides without stealing time from folks on the list
> here but I just keep running into walls.)
Which doc?
--
Darren
# 2
I am attempting to set up RAID-1 (mirroring) for root and swap. I am attempting to work from "Solaris Volume Manager Administration Guide," Part No: 816?520?2. (Same place you pointed me except I downloaded the pdf so I could page through it faster.) On page 105 you will find an entry for "Create a mirror from the root (/) filesystem," which directs you to page 122, "搙86: How to Create a RAID-1 Volume From the root (/) File System by Using DCA?
I have two identical 300GB PATA drives with 20GB root/boot and swap partitions. The slices are all identical as to size and location, i.e. c0d0s0 is root and c1d0s0 will be the mirror for root. (I will use "mirror drive" to refer to c1d0.
Proceeding through the steps I have verified I can boot the mirror. I have created the slices. I have used fdisk to put the master boot block on the mirror drive. I have installed grub on the mirror drive.
At this point I am on step six which reads:
"Create a new RAID-0 volume on the slice from the previous step by using one of the following
methods. Only the single slice can be included in the RAID-0 volume. " At that point I decided to try to proceed using the Enhanced Storage Tool from smc.
As to RAID-0 vs. RAID-1, it is my understanding from the doc that one must first create the RAID-0 volumes, each containing just the single slice, one for each of the two volumes that will be combined to make the RAID-1 mirror, hence my comment about RAID-0.
I see your point about using the -f option to force the creation of the volume for the mounted root filesystem. One would think that, if they included the option of using the Enhanced Storage Tool that perhaps it might work. (I did not see a way to force the creation of the RAID-0 volume.) Certainly using metainit with the -f flag makes sense.
Next step will be to go back and punt EST in favor of using metainit from the command line.
I get the feeling that no one at sun is actually trying what is in the manuals to ensure correctness.
Brian
# 3
Calling it a RAID-0 at that point is not a good idea. SVM treats a concatenation or a stripe very similarly, and I think the author used the term RAID-0 to mean both. Unfortunatly, there is no stripe in this case, so to my mind the term is incorrectly used.
I'd never made the connection in that document until you pointed it out. I'd certainly suggest sending any improvements or bug reports about the documents in.
--
Darren
# 4
I agree, it makes no sense to call it RAID-0 but since that is the term used in the manual, I tried to be consistent. OTOH I supose you could consider it to be the degenerate case of a stripe or a concatenation with only one member.
I think that the key is that they want the partition to appear as a volume within the volume manger and the way to do that is to create a stripe or concatenation with only one member. At least, that is how I took it.
I suppose I should submit it.
Thanks.
zfs is so much simpler. Too bad you can't use zfs to manage the boot/root partition.
--
Brian
# 5
> At this point I am on step six which reads:
> "Create a new RAID-0 volume on the slice from the
> previous step by using one of the following
> methods. Only the single slice can be included in the
> RAID-0 volume. " At that point I decided to try to
> proceed using the Enhanced Storage Tool from smc.
>
> I see your point about using the -f option to force
> the creation of the volume for the mounted root
> filesystem. One would think that, if they included
> the option of using the Enhanced Storage Tool that
> perhaps it might work. (I did not see a way to force
> the creation of the RAID-0 volume.) Certainly using
> metainit with the -f flag makes sense.
I've run into the same problem, and after my attempt with the GUI tool failed, I tried the cli method, but that doesn't seen to work either.
# metainit d1 -f 1 1 c3t0d0s0
metainit: [hostname]: d1: "-f": illegal option
Without the -f option I get (as expected) the error about the file system being mounted on /.
# 6
> # metainit d1 -f 1 1 c3t0d0s0> metainit: [hostname]: d1: "-f": illegal optionGeneric options (like -f) come before the device name./sbin/metainit [generic options] concat/stripe numstripes width component [-i interlace]-- Darren
# 7
put the "-f" switch in front of "d1"
Boroa at 2007-7-9 5:45:23 >
