Unix Technical Forum

Live Upgrade: Make /opt be shared between old & new BE

This is a discussion on Live Upgrade: Make /opt be shared between old & new BE within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hello. I currently have a system where /, /var and /opt all are on different filesystems. I'd now like ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-17-2008, 06:03 AM
Michael Schmarck
 
Posts: n/a
Default Live Upgrade: Make /opt be shared between old & new BE

Hello.

I currently have a system where /, /var and /opt all are on different
filesystems. I'd now like to merge / and /var. /opt should still be a
filesystem of its own. I'd like /, /var and /opt to be metadevices.
In the system, I've got two 36G internal harddrives.

Beforehand, I created slices the way I want it to be:

partition> p
Volume: S10_v2
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 7297 10.05GB (7298/0/0) 21083922
1 swap wu 7298 - 8023 1.00GB (726/0/0) 2097414
2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wu 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 alternates wm 8024 - 20727 17.50GB (12704/0/0) 36701856
6 home wm 21707 - 24610 4.00GB (2904/0/0) 8389656
7 unassigned wu 24611 - 24619 12.70MB (9/0/0) 26001

After having sliced the disk the way I want it, I created (unused)
metadevices.

$ metastat d300
d300: Mirror
Submirror 0: d20
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 21083922 blocks (10 GB)

d20: Submirror of d300
State: Okay
Size: 21083922 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s0 0 No Okay Yes


Device Relocation Information:
Device Reloc Device ID
c1t1d0 Yes id1,sd@w4849544143484920444b3332454a2d33364e432020 2020203433344e35363431

After that, I ran lucreate

lucreate -c S10_v1 -n S10_v2 -m /:/dev/md/dsk/d300:ufs

This failed, because it tried to put /opt on d300 as well. There's not
enough space for /opt on / (ie. d300).

$ df /opt
/opt (/dev/md/dsk/d250 ): 3845626 blocks 2036299 files

How do I make it so, that lucreate uses the same /opt, ie. d250, for
the new BE S10_v2 and the old S10_v1?

I tried:

lucreate -c S10_v1 -n S10_v2 -m /:/dev/md/dsk/d300:ufs \
-m /opt:/dev/md/dsk/d250reserve

Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
ERROR: the file system on device </dev/md/dsk/d250> is currently mounted at </opt>
ERROR: device </dev/md/dsk/d250> is not available for use with mount point </opt>
ERROR: cannot create new boot environment using file systems as configured
ERROR: please review all file system configuration options
ERROR: cannot create new boot environment using options provided

$ metastat d250
d250: Mirror
Submirror 0: d25
State: Okay
Submirror 1: d15
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 36701856 blocks (17 GB)

d25: Submirror of d250
State: Okay
Size: 36701856 blocks (17 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s5 0 No Okay Yes


d15: Submirror of d250
State: Okay
Size: 39530187 blocks (18 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s5 0 No Okay Yes


Device Relocation Information:
Device Reloc Device ID
c1t1d0 Yes id1,sd@w4849544143484920444b3332454a2d33364e432020 2020203433344e35363431
c1t0d0 Yes id1,sd@SSEAGATE_ST336607LSUN36G_3JA659W600007412LQ FN


I do not want to break the d250 mirror.

What would I need to do, so that I get what I want?

Thanks a lot,

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-17-2008, 06:03 AM
James Carlson
 
Posts: n/a
Default Re: Live Upgrade: Make /opt be shared between old & new BE

Michael Schmarck <usenet-michael@schmarck.cn> writes:
> I currently have a system where /, /var and /opt all are on different
> filesystems. I'd now like to merge / and /var. /opt should still be a
> filesystem of its own. I'd like /, /var and /opt to be metadevices.
> In the system, I've got two 36G internal harddrives.


Since /opt can contain objects delivered with Solaris (just like
/var), and since the whole point of Live Upgrade is to modify only an
inactive copy of the Solaris bits (not the running system), this means
that /opt itself must be unshared between boot environments.

That's why LU refuses to allow a shared /opt. It's the same (as far
as LU is concerned) as sharing /usr -- an infeasible configuration.

However, you can still do this, if you're very careful. You can't
share /opt, but you *can* share subdirectories.

So, don't put /opt on a separate file system. Keep it on the root
file system, and use mounts underneath (for /opt/csw and the like).
Just make sure you don't try to share /opt/SUNWmlib or anything else
delivered with the system, or you'll have chaos.

If you're using S10 or better, ZFS is a great way to create those
subdirectory mounts. Otherwise, put them over in /export/ (or some
suitable other file system) and use lofs entries in vfstab to mount
them into /opt:

/export/home/csw - /opt/csw lofs 2 yes -

One very important note: no matter what you do, there'll just be one
packaging database that will be correct on the system, so be very
careful. An upgrade scheme that works looks like this:

1. Upgrade all non-Solaris software in /opt/ as desired.
2. Use lumake to copy over the BE.
3. Use luupgrade to upgrade the inactive BE.
4. Use luactivate+init 6 to switch BEs.
5. Continue normal operation.

Do not touch the non-Solaris packaged /opt software between steps 2
and 4, or you'll end up with an inconsistent packaging database.

--
James Carlson, Solaris Networking <james.d.carlson@sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:42 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com