ssa-managers Archive

[Prev][Next][Index][Thread]

much coolness




So, I've got this Ultra with a used SSA attached (thanks columbia!), and
it's going to be a cyrus IMAP mail server (very cool package by the way,
check it out if you need a scalable IMAP solution and aren't impressed
with the washington stuff. Cyrus is amazing in comparison). So, I setup
a 3x3 stripe/mirror across the controllers for inbox. Now, I encapsulate the 
root disk into rootdg and setup a RAID-5 volume across 6 more disks for
folders access. 

 Now, I'm thinking wouldn't it be handy if I could take some of this
unused space from the second internal disk, make most of it a mirror
for the OS disk, but use a small chunk on it for logging the RAID-5
and the mirror from the SSA so as not to destroy the nice symmetry 
going on in the SSA, or have to waste gobs of space on a new disk where
only like 2M will be allocated.

 Experimenting, reading through man pages, looking at the /etc/vx/bin
scripts, I came up with a solution. Ideally, we want the logdisk to be
on the cylinders of the extra internal disk that are closest to 0 (this
being a ZBR disk, and the lower cylinders being faster), so we've got
to do some funky things. It's not feasible to put it on 0 itself because
vxvm uses that to store the disks configuration stuff, as well as the
VTOC, and bad block stuff that are already stored there. This leads me
to this command:

/etc/vx/bin/vxdisksetup -n -i c0t1d0 publen=4107040 puboffset=45600
(which is using the region you see on slice 4 below)

This command depends exactly on the block size of your disk and the
total number of cylinders available. Here's the relevant geometry info
from the partition table for the disk:

  2     backup    wu       0 - 2732        1.98GB    (2733/0/0) 4154160

4154160/2733 = 1520. (this number will be different for different disks but
should hold for any SUN2.1G disk)

Now, my log slice is going to need to be aligned on even cylinder boundaries,
so I reserve 30 cylinders = 45600 blocks for the logdisk. I adjust the
public region length appropriately to (2733-30)*1520=4107040 blocks.
Then, I take these 29 cylinders (the private region takes at cylinder
boundary 0 -1) and add them as a separate slice on the disk manually using
format.
What I end up with is this:

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm      30 - 2020        1.44GB    (1991/0/0) 3026320
  1 unassigned    wm       0               0         (0/0/0)          0
  2     backup    wu       0 - 2732        1.98GB    (2733/0/0) 4154160
  3          -    wu       0 -    0        0.74MB    (1/0/0)       1520
  4          -    wu      30 - 2731        1.96GB    (2702/0/0) 4107040
  5 unassigned    wm       0               0         (0/0/0)          0
  6 alternates    wu       1 -   29       21.52MB    (29/0/0)     44080
  7 unassigned    wm       0               0         (0/0/0)          0

slice 6 is the one that I added manually. 

Now, I can run
vxdisk -f init c0t1d0s6 type=simple

Which takes c0t1d0s6 and adds a new public/private region pair to this
area of the disk only. I need the -f, because without it I get an error
about aliases that I don't quite understand. (This is the only part that
makes me a bit nervous.. But after a couple of reboots and nothing going
wrong, I am less so -- If any of the veritas folks see egregious problems
here, please let me know)

Now, I can take this new logical disk and encapsulate it into the storage
array disk group which I call cyrus.

vxdg -g cyrus adddisk logdisk=c0t1d0s6

Now, I can do:

vxassist -g cyrus addlog cyrus1 logdisk
vxassist -g cyrus addlog folders logdisk

So, In essence I get the best of both worlds here. Most of the time
the emergency mirror is going to be unused by the mirroring stuff.
The root disk is fairly static. In that time, it will be used for
logdisk by the storage array for the two volumes. One is a MIRROR/DRL
log, and the other is a RAID-5 log.

Result: one disk split and in 2 separate disk groups.

Works out pretty well so far. Hope somebody else finds this hackery 
interesting or useful.


Cheers, 
	Doug


Follow-Ups:
ssa-managers list home | ssa-managers Index | Thread Index