Thursday, 2 June 2011

Solaris 10 RAID bug 6901327 - better workaround

Ahoy.
If you've just initialized RAID 1 on 2 disks with a recent Solaris 10, you'll hit a bug - 6901327. Label can't be written to the disks after you initialize a RAID volume.

The workaround in the bugnotes is pretty shit - you have to use an earlier version of Solaris, boot off that in Single user mode and create your label. This sucks so here's a quicker way:

After you create the volume, issue (if c1t0d0 is your new RAID volume):
format -e c1t0d0
label
1
Yes
q
format -e c1t0d0
label
0
[enter]
[enter]
[enter]

You'll create an EFI label, which isn't what you want but it will write. Then you change this to an SMI label - which is what couldn't be written in the first place.

Laters

DHCP interface on startup with Solaris 10

I want interface 3 to bring up DHCP on startup. I asked the Internet and it said:
Create a file called dhcp.e1000g2 in /etc, upon reboot all will be fine. Neins! I get an error on startup, 'Failed to configure IPv4 DHCP' etc....
So instead of spending more time troubleshooting, you can get around this with a script in rc2:

/etc/rc2.d/S30g2IFConf
#!/sbin/sh
# Script to bring up g1000e2 and assign DHCP on startup for management
ifconfig e1000g2 plumb
ifconfig e1000g2 dhcp
exit 0

Putting the script in RC2 makes it run on runlevel2. Read up on Google for more info on that.

Laters