Question

LUCREATE syntax

Asked by: solarisjunkie

I'm familiar with the lucreate command but trying to sort out the correct syntax. I have two disks c0t0d0 and c0t1d0. I want to transfer the info from c0t0d0 to c0t0d1 and wanted to ensure the following syntax is correct:

# lucreate -c first disk -m /:/dev/dsk/c0t1d0s0:ufs -n second disk

Is this the correct syntax which will transfer the information the correct way without having to specify the c0t0d0 disk.

Also can I perform this function while users are on the system?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-19 at 14:27:29ID24825178
Tags

Solaris

Topics

Sun Solaris

,

Unix Systems Programming

,

Unix Setup

Participating Experts
2
Points
500
Comments
8

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. syntax
    What's the syntax (with examples) for 'setting' and 'retrieving' $variables to and from cookies respectivly. -(set variables from a FORM). -(perl, cgi). Thanks.
  2. If Statement syntax check
    I have a flash form that is calling a cdo email script and want flash to make sure that the form has been completed before calling the send script. I have three frames. First containing the form. Second containing a script to generate an error msg. The third is to call the se...
  3. Help with basic comandline syntax
    I'm attempting to apply some user-community (re: Legal) hacks to my Tivo without first gaining a degree in Linux. I need someone to help translate general directions into syntax I can use at the command line. >> I would make sure that your CDROM truly is accessible as ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: yuzhPosted on 2009-10-19 at 18:01:58ID: 25610255

Not sure what you means " I want to transfer the info from c0t0d0 to c0t0d1 ", please have a look at the following tutorials:

http://www.mattzone.com/liveup.html

http://blogs.sun.com/DanX/entry/simple_live_upgrade_example_for

and the Sun doc:

http://docs.sun.com/app/docs/doc/819-2240/lucreate-1m?a=view</A>

If you need more help, please state clearly about what are you trying to achieve.

 

by: turnbulldPosted on 2009-10-19 at 18:20:39ID: 25610357

First, the tutorials named above are good reads.

Second, are you establishing a boot environment on c0t0d1 or c0t1d0?  Your statement says c0t0d1 (like the disk names given to different LUNs presented form hardware RAID) but the command suggest c0t1d0.

With that said, this command:

lucreate -c first disk -m /:/dev/dsk/c0t1d0s0:ufs -n second disk

has a problem if you are using if verbatim, the names of your boot environments contain spaces.  It may be possible to do this like this:

lucreate -c "first disk" -m /:/dev/dsk/c0t1d0s0:ufs -n "second disk"

but I strongly advise against it.  Doing this means you'll have to be careful to quote the boot environment names and you have to hope the guys at Sun who wrote the LU scripts (live upgrade is partly a body of scripts that do what you could do manually; the commands are not all binaries).  I would use this command:

lucreate -c pBE -m /:/dev/dsk/c0t1d0s0:ufs -n sBE

If you have Solaris 10 05/09 and have properly sliced c0t1, this command will create an alternate boot environment on c0t1d0s0 that is a copy of the currently booted / file system.  Please note that if you have broken out /var, /opt, /usr, or others, this command alone will not necessarily be enough; you may have to copy these other file systems as well.

If you have older versions of Solaris 10, live upgrade is REALLY buggy.  You should at least patch to the latest recommended patch set before proceeding.

If you plan to boot from the alternate environment, you would use the luactivate command to boot the alternate boot environment.  

In addition, since the alternate is on a different disk, you may also have to force the system to boot from the correct disk.  On SPARC systems, this would mean specifying the correct disk and slice in openBOOT with the boot <disk name> command.  If this is an X6 server, you will likely have to change the boot order in the BIOS so that the correct disk (the one with the alternate boot environment) appears above the previous boot disk in the boot order.

 

by: solarisjunkiePosted on 2009-10-20 at 06:30:22ID: 25613863

The way I currently have the disks partitioned are below with c0t0d0 being the current boot disk. I had formatted the c0t1d0 disk to include the metadata slice (slice 6). I want to use the lucreate command to
establish the boot environment on the c0t1do disk so I can luactivate the c0t1d0 disk while I reformat the c0t0d0 disk to replica the c0t1d0 disk. I then will luactivate the c0t0d0 disk back to the boot disk and mirror the disks using disksuite.

Also will the lucreate command have to be run for each slice or by specifiying c0t#d#s0 cover all slices on the secondary disk.

c0t0d0 <SUN72G>
{current boot disk}

Part             Tag                Flag            Cylinders              Size                    Blocks
  0                root               wm           3221 -  4026        3.91GB    (806/0/0)        8201856
  1                swap            wu                 0 -  3220       15.63GB    (3221/0/0)      32776896
  2                backup          wm                0 - 14086       68.35GB    (14087/0/0)   143349312
  3               unassigned    wm           4027 -  5234        5.86GB    (1208/0/0)      12292608
  4               usr                 wm           5235 -  7650       11.72GB    (2416/0/0)      24585216
  5               var                 wm           7651 -  9261        7.82GB    (1611/0/0)       16393536
  6              unassigned    wm                  0                     0              (0/0/0)             0
  7              home               wm           9262 - 14086       23.41GB    (4825/0/0)   49099200


c0t1d0 <SUN72G>
{disk needing boot environment }

 Part       Tag              Flag             Cylinders         Size                 Blocks
  0          root             wm            3222 -  4027       3.91GB    (806/0/0)     8201856
  1          swap          wu                  0 -  3221      15.63GB    (3222/0/0)   32787072
  2          backup        wu                  0 - 14086     68.35GB    (14087/0/0) 143349312
  3          unassigned  wm          4028 -  5235        5.86GB    (1208/0/0)   12292608
  4          usr               wm          5236 -  7651       11.72GB    (2416/0/0)   24585216
  5          var               wm          7652 -  9263         7.82GB    (1612/0/0)   16403712
  6          unassigned  wm               0 -     2           14.91MB    (3/0/0)         30528
  7          home            wm         9264 - 14086       23.40GB    (4823/0/0)   49078848

 

by: solarisjunkiePosted on 2009-10-20 at 07:04:34ID: 25614221

Also as turnbulld mentioned I have the opt, var and usr filesytems broken out and mounted under their own slice under the vfstab and was wondering lucreate what commands would I have to use in addition to  "lucreate -c pBE -m /:/dev/dsk/c0t1d0s0:ufs -n sBE".

 

by: turnbulldPosted on 2009-10-20 at 08:17:54ID: 25615059

First, let me answer the direct question.  There is a larger issue though.  More below.

Ok, so the disks are c0t0d0 and c0t1d0 which is fine.  The command to copy the root from c0t0d0s0 to c0t1d0s0 is

lucreate -c pBE -m /:/dev/dsk/c0t1d0s0:ufs -n sBE

For each of the other filesystems you want to include, you would add an additional -m switch.  For example, if /usr is on slice 3, the command would become:

lucreate -c pBE -m /:/dev/dsk/c0t1d0s0:ufs -m /usr:/dev/dsk/c0t1d0s3:ufs -n sBE

Again, remember, after using luactivate, you will also have to manage which disk the server selects to boot from the BIOs or openBOOT depending on whether you have x64 or SPARC hardware.  The luactivate command does not handle this.

The larger issue is to ask why mess with moving the boot environment around at all.  I am assuming that the slice configuration on c0t1 is what you want to move to form that on c0t0.  If you ar eplanning a more radical change that is not reflected in the material you posted, just ignore the rest of this post.

It looks like the difference between the disks is extremely small (around 5MB per cylinder).  Slice 1 is one cylinder larger on c0t1 than c0t0; slice 6 is one cylinder larger on c0t1 than c0t0, and slice 7 is two cylinder's smaller on c0t1 than c0t0.  These differences don't amount to a lot of space (~10MB) and can be resolved without moving the boot environment.

To use the partitions as shown, standardize on the slice scheme for c0t0 (the existing boot disk).  You can use this command to make c0t1 look exactly like c0t0:

prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2

Be warned that this will change the label and slice boundaries on c0t1 so, if you have mounted filesystems on c0t1, you need to copy that material somewhere else (tar or cpio will do nicely).  Since you are planning to mirror c0t0 to c0t1, I am assuming that c0t1 is unused at the moment.

Once this is done, mirror the disks.

 

by: solarisjunkiePosted on 2009-10-20 at 09:25:22ID: 25615728

Tks much for your solution and the partition scheme I want to use is on c0t1d0 as it has the metadata slice (slice 6) added. The c0t0d0 disk was partitioned without that slice and data was added to the disk. The only solution I could come up with was to format the c0t1do disk, lucreate the data from c0t0d0 to c0t1do per slice and temporarily make it the boot disk while I correctly format c0t0d0. Your response is dead on and also will I be able to perform this lucreate command while users are on the system or should I wait until after hours? Agn tks for all your assistance.

 

by: turnbulldPosted on 2009-10-20 at 10:50:01ID: 25616636

You can run lucreate while users are on though it may well affect performance.

Again, however, I think it's overkill.  If you wait until the system's quiet, you could handle the one partition issue this way:

1) Make a UFS file system on an unused partition on c0t1
2) Copy the material that is now on c0t0d0s7 to this temporary space
3) Unmount just the one file system based on c0t0d0s7
4) Change the slices on c0t0d0 (this is fine to do even while booted on the disk so long as you don't change a mounted slice or change an unmounted slice to overlap a mounted one)
5) Recreate the file system on s7
6) mount the changed s7 slice and copy the material back.

Assuming the s7 is home, this set of commands would do the job:

newfs /dev/rdsk/c0t1d0s7
mount /dev/dsk/c0t1d0s7 /mnt
cd /export/home
find . | cpio -dumpB /mnt
cd /
umount /export/home

   -make sure there are no other users logged on or processes attached to the home folders.
    Single user mode is a good idea if convenient but not necessary)\

format c0t0d0

   -in the format utility, make the s6 slice smaller and the s7 slice bigger

newfs /dev/rdsk/c0t0d0s7
mount /export/home
cd /mnt
find . | cpio -dumpB /export/home

The cpio command will protect the file privs and what not and you won't have to reboot or mess with the BIOS.  This is a lot less intrusive than using LU (which is a fine tool but like killing flies with a ball bat here I think).

 

by: solarisjunkiePosted on 2009-10-20 at 12:12:29ID: 31643141

Excellent solution and very easy to understand.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...