Monday, March 5, 2012

Xen Server Recovery

- license: /etc/xensource/license
              /opt/xensource/gpg/pubring.gpg, trustdb.gpg

Customize XenServer 6.0
- use gdisk, mkfs to repartition and create /iso; add loca ISO repository
- install tcsh-6.13-10.el4.i386.rpm
- install hp-agents-xs-8.6.iso
- install hpcciss-4.6.28-XS60E16.zip (http://support.citrix.com/article/CTX133952)

XenCenter Role Based Access Control https://support.citrix.com/article/CTX126442
Host Base Access Control http://support.citrix.com/article/CTX118504
XenServer System Recovery Guide http://support.citrix.com/servlet/KbServlet/download/17140-102-671536/XenServer%20System%20Recovery%20Guide.pdf

Where’s the XenServer 6 auto start VM feature

http://www.virtues.it/2011/10/xenserver6-vm-auto-start-feature/

http://www.danieletosatto.com/2011/05/10/tools-for-xenserver-troubleshooting/
http://blogs.citrix.com/?s=Tools+for+XenServer+Troubleshooting
XenServer HA http://www.citrix.com/content/dam/citrix/en_us/documents/products/citrixxenserverhaquickstartguide.pdf
HA under hood http://blogs.citrix.com/2008/09/17/peeking-under-the-hood-of-high-availability/

Citrix XenServer 6.0 PXE installation

XenServer System Recovery
  1. Is the Pool Master Down? (No -> 3)
    xe host-list or xe host-is-in-emergency-mode
  2. Recover Pool operations. Promote a member server to a master:
    • xe pool-emergency-transition-to-master
    • xe pool-recover-slaves
  3. Verify which XenServer(s) failed. At any surviving pool member:
    xe host-list params=uuid,name-label,host-metrics-live
    Any servers listed as host-metrics-live=false have failed.
  4. Verify which VMs failed. (If a failure has occurred in another subsystem on the server (for example, the xapi service has failed) and virtual machines are still active, starting the VMs again could in rare cases cause data corruption.)
    xe vm-list is-control-domain=false resident-on=UUID_of_failed_server
  5. Reset Power state on failed VMs
    xe vm-reset-powerstate resident-on= UUID_of_failed_server --force --multiple
    Caution! Incorrectly using the "--multiple" option could result in ALL virtual machines within the pool being reset. Be careful to use the "resident-on" parameter as well. Alternately, you can reset VMs individually.
    Repeat Step 4 to verify.
  6. Restart VMs on another XenServer
    verify in XenCenter VMs running on the failed server are halted. VMs have a home server assigned will not appear in XenCenter, because that specific home server host is still down. A workaround for this ischanging the home server by changing the affinity parameter from the CLI:
    xe vm-param-set uuid=<uuid of vm to change> affinity=<uuid of new homeserver>
XenServer Loses Management Parameters (http://support.citrix.com/article/CTX119240)
- xsconsole "Status Display" shows XenServer version as <Unknown> <Unknown>; management network parameters as <No network configured> and Confgure Management Interface->Select NIC shows <No interfaces present>.
--------------

Resetting XenServer Networking Configuration in an Emergency

Incorrect networking settings can cause loss of network connectivity, and a XenServer host may become
inaccessible via XenCenter or remote SSH. Emergency Network Reset provides a simple mechanism to recover and reset a host's networking.

This feature is available from the Command Line Interface (CLI) using the xe-reset-networking command
and within the Network and Management Interface section of xsconsole.

Incorrect settings which could cause a loss of network connectivity could include renaming network interfaces, creating bonds or VLANs, or mistakes when changing the management interface (for example, entering the wrong IP address). In addition, you may want to run this utility if a rolling pool upgrade, manual upgrade, hotfix installation or driver installation causes a lack of network connectivity, or if a Pool master or host in a resource pool is unable to contact with other hosts.

This utility should only be used in an emergency as it will remove the configuration for all PIFs, Bonds, VLANs and tunnels associated with the host. Guest Networks and VIFs are preserved. As part of this utility, VMs will be shutdown forcefully, where possible before running this command, VMs should be cleanly shutdown. Before applying a reset, users can make changes to the Primary Management Interface and specify which IP configuration, DHCP or Static, should be used.

If the Pool Master requires a network reset, it must be carried out before a network reset of any other pool
members. It should then be followed a network reset on all remaining hosts in the pool to ensure that the pool's networking configuration is homogeneous. This is a particularly important factor for XenMotion.

Note:

If the Pool Master's IP address (the Primary Management Interface) changes, as a result of a network reset or xe host.management_reconfigure, you must also apply the network reset command to other hosts in the pool, so that they can reconnect to the Pool Master on its new IP address. In this situation, the IP address of the Pool Master must be specified.

Network reset is NOT supported if High Availability (HA) is enabled. To reset network configuration in this scenario, you must first manually disable HA, and then run the network reset command.

Verifying the Network Reset

After specifying the configuration mode to be used after the network reset, xsconsole and the CLI will display the settings which will be applied after host reboot. This offers a final chance to make any modifications before applying the emergency network reset command. After reboot, the new network configuration can be verified in XenCenter and xsconsole. In XenCenter, with the host selected, click the Networking tab, this displays the new network configuration. In xsconsole, this information is displayed in the Network and Management Interface section.

Note:

Emergency Network Reset should also be applied on other pool members to replicate bonds, VLANs or tunnels from the Pool Master's new configuration.

Using the CLI for Network Reset

The following table shows the available optional parameters which can be used with the xe-reset-networking
command.

Warning:

Users are responsible for ensuring the validity of parameters for the xe-reset-networking command, check the parameters carefully. If invalid parameters are specified, network connectivity and configuration will be lost. In this situation, Citrix advises customers to re-run the command xe-reset-networking without using any parameters.

Resetting the networking configuration of a whole pool must begin on the Pool Master, and should then be followed by network reset on all remaining hosts in the pool

ParameterRequired/Optional Description
-m, --master Optional
IP address of the Pool Master's primary management interface.
Defaults to the last known Pool Master's IP address.
--device Optional
Device name of the primary management interface. Defaults to
the device name specified during installation.
--mode=static Optional
Enables the following four networking parameters for static
IP configuration for the primary management interface. If not
specified, networking will be configured using DHCP.
--ip
Required if
mode=static

IP address for the host's primary management interface. Only
valid if mode=static.
--netmask
Required if
mode=static

Netmask for the primary management interface. Only valid if
mode=static.
--gateway Optional
Gateway for the primary management interface. Only valid if
mode=static.
--dns Optional
DNS Server for the primary management interface. Only valid if
mode=static.


Pool Master Command Line Examples

Examples of commands that could be applied on a Pool Master:

To reset networking for DHCP configuration:

xe-reset-networking

To reset networking for Static IP configuration:

xe-reset-networking --mode= static --ip=<ip-address> \
  --netmask=<netmask> --gateway=<gateway> \
  --dns=<dns>

To reset networking for DHCP configuration if another interface became the primary management interface
after initial setup:

xe-reset-networking --device=<device-name>

To reset networking for Static IP configuration if another interface became the primary management interface
after initial setup:

xe-reset-networking --device=<device-name> --mode=static \
--ip=<ip-address> --netmask=<netmask> \
--gateway=<gateway> --dns=<dns>

Pool Member Command Line Examples

All previous examples also apply to pool members. Additionally the Pool Master's IP address can be specified (which will be necessary if it has changed.)

To reset networking for DHCP configuration:

xe-reset-networking

To reset networking for DHCP if the Pool Master's IP address was modified:

xe-reset-networking --master=<master-ip-address>

To reset networking for Static IP configuration, assuming the Pool Master's IP address didn't change:

xe-reset-networking --mode=static --ip=<ip-address> --netmask-<netmask> \
  --gateway=<gateway> --dns=<dns>

To reset networking for DHCP configuration if the primary management interface and the Pool Master's IP
address was modified after initial setup:

xe-reset-networking --device=<device-name> --master<master-ip-address>

--------------


在XenServer中,碰到VM挂起(hang)的情况,也不是那么少见,而VM长时间挂起,那么很影响心情和后续的操作。
一般情况下,为了关闭VM或者重启VM,我们推荐这样的操作顺序:
  1. 进入到VM内,使用系统的关机或者重启功能
  2. 通过XenCenter的菜单选择ShutDown或者Restart。虽然这个菜单的实现是通过XenServer tool来控制系统的命令来实现,但是不保证在XenServer Tools工作异常的情况下,导致VM挂起(Hang),而且,这个应该也是VM挂起(XenCenter中VM标志处于黄色状态)的主要原因。
  3. 尝试通过XenCenter菜单的Force Shutdown和Force Restart来强制操作。
如果这些操作都进行了以后,VM也长时间处于挂起状态,为了让VM能够关机,或者说是强制关机来重置其状态,我们有以下几种解决方法,这些解决方法的危害会逐渐增加,所以,请按顺序尝试:
  1. 尝试重置VM的电源状态
    1
    xe vm-reset-powerstate force=true vm=<vm name>
  2. 尝试重启toolstack
    1
    xe-toolstack-restart
  3. 尝试destroy domain
    1
    2
    3
    4
    5
    6
    #首先获取VM的UUID
    xe vm-list name-label=<vm name> params=uuid
    #获取VM的Domain ID
    list_domains | grep <VM-UUID>
    #尝试重置hang状态的VM
    /opt/xensource/debug/xenops destroy_domain -domid <vm domain id>
  4. 到这里还不行,就可以强制VM进入崩溃状态
    1
    2
    3
    4
    5
    6
    #首先获取VM的UUID
    xe vm-list name-label=<vm name> params=uuid
    #获取VM的Domain ID
    list_domains | grep <VM-UUID>
    #手动触发VM的Crash机制
    /usr/lib/xen/bin/crash_guest <domain ID>
  5. 如果连Crash机制都不起作用的情况下,那么就只剩下强制关闭XenServer主机电源一条途径了。
注:在Crash VM以后,VM会处于蓝屏状态,这个时候,可以再试试正常的关机或者强制关机命令来关闭虚机。
BTW:某些情况下,可能关机等操作会由于某些原因,导致操作延迟,而且取消也会失败,这个时候可能稍微多等一下就OK了。
---
Auto Restart VM for XenServer 6.0
http://forums.citrix.com/thread.jspa?threadID=300865
http://burm.net/2012/01/28/xenserver-tips-and-tricks-auto-start-your-vm/

When using the free edition of XenServer 6.0, you’ll want to do a few things such as enabling Auto Start / Auto Boot / Auto Power On.  For some reason this feature was removed from the “Free” version in 6.0, so lets go ahead and set this up.
First your going to want to get the UUID of the VM’s you wish to enable auto start on as well as the UUID of the pool these VM’s reside in.
To get the list of the pool’s on your XenServer type:
xe pool-list
Copy the UUID of the pool, in my case there ist just one pool. Then issue the following command, and replace the UUID with your pools UUID.
xe pool-param-set uuid=UUID other-config:auto_poweron=true
Then, at the command prompt of your XenServer type:
xe vm-list
You should get a full list of the VM’s on the server, along with their name and UUID. Copy the UUID of the VM you wish to enable autostart then issue the command below, again replacing the UUID with the UUID of the VM you wish to auto start.
To Auto Start your Pool (replace UUID with the UUID of your Pool):
xe pool-param-set uuid=UUID other-config:auto_poweron=true
To Auto Start your VM (replace the UUID with the UUID of your VM):
xe vm-param-set uuid=UUID other-config:auto_poweron=true
xe vm-param-set uuid=UUID other-config:auto_poweron=true
And thats it, the next time you ever need to power cycle your main server, the Xen instances should power up automatically.

---
Force remove dead pool member
Prolog:
We had a XenServer go down and it required a rebuild.  The problem was that we could not use the same name until the old server was removed from XenCenter.  Using XE Host-Forget UUID=<Host UUID> did not work because the pool master thought a VM was still running on the missing server.  However, using some other, more drastic commands, we managed to remove the host UUID from the pool master so we could not use the typical XE commands to shut down the VM and remove the host.
Get to work:
Here are the steps I used to remove the host (these commands were culled from different sources, so hopefully putting them in once place will be a benefit).  For the purposes of this example the dead server will be known as FISHHEAD and the pool master IP will be 192.168.1.1.
I first had to get the UUID of FISHHEAD which was no longer in the host list, so I ran this command from a server with XenCenter installed:
xe –s 192.168.1.1 – u root –pw <MYROOTPW> pool-sync-database
This generated the following error:
You attempted an operation which involves a host which could not be contacted.
host: 5491fe8d-70ae-4a82-aae1-ab2719f1469e (FISHHEAD)
Now with the UUID of FISHHEAD I ran this from the pool-master’s console.
xe vm-list resident-on=5491fe8d-70ae-4a82-aae1-ab2719f1469e
Which listed FISHHEADGUEST (UUID=1d75984e-1b9c-0ea0-0a22-8db2175ca70f) which was preventing the removal of FISHHEAD.
I used this command to power off FISHHEADGUEST :
xe vm-reset-powersate uuid=1d75984e-1b9c-0ea0-0a22-8db2175ca70f force=true
Finally, I could use host-forget to remove FISHHEAD.
xe host-forget UUID=5491fe8d-70ae-4a82-aae1-ab2719f1469e

Tuesday, February 28, 2012

Linux/Unix misc

  • Configuration file for the ls color command is /etc/DIR_COLORS for Linux
  • sftp only
  • Using loop devices is very convenient when training with Raid for instance. To create usable devices for a Raid, it works as for a file-system, except that instead of mounting the file as a loop device they must be setup with the tool ”losetup” that is part of the Linux utilities. In fact, it is not possible to prepare devices for a Raid that are already mounted, and losetup makes a loop device in /dev/ ready to be mounted in a way that it is possible to run ”mount /dev/loop0 mount-point” instead of ”mount -o loop file mount-point”.

    Preparing a Raid5 works as follow:
    1. Create 3 files:
      • dd bs=1M count=100 if=/dev/zero of=0
      • dd bs=1M count=100 if=/dev/zero of=1
      • dd bs=1M count=100 if=/dev/zero of=2
    2. Setup loop devices:
      • losetup /dev/loop0 0
      • losetup /dev/loop1 1
      • losetup /dev/loop2 2
    3. Prepare the Raid5 device:
      • mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/loop0 /dev/loop1 /dev/loop2
    4. Mount the Raid5 device:
      • mount /dev/md0 mount-point
  • Why VNC not showing actual Remote Desktop
    • vncserver doesn't connect to the actual desktop; it creates a virtual desktop that is configured separately, on another display, probably :1. the X11 session defined in ~/.vnc/xstartup, a minimal X11 session. 
    • To access a different desktop that looks the same, you have to start it in this xstartup file, e.g. with exec gnome-session or something similar, have a look for documentation on xinitrc or xsession[rc])
    • To access the same desktop session, you need a different VNC server. x11vnc can dodesktop sharing; in your GNOME environment, Vino is probably the preferable choice
    • you might be able to use Xvnc with inetd as described in its man page (last paragraph of the linked section). Another (kind of high-overhead but neat) solution might be using the Guacamole remote desktop gateway and configuring access there
    • Please uncomment following two lines in xstartup file under ~/.vnc/xstartup:
      Before:
      #unset SESSION_MANAGER
      #exec /etc/X11/xinit/xinitrc
      
      [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
      [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
      xsetroot -solid grey
      vncconfig -iconic &
      xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
      twm &
      
      After:
      unset SESSION_MANAGER
      exec /etc/X11/xinit/xinitrc
      
      [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
      [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
      xsetroot -solid grey
      vncconfig -iconic &
      xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
      twm &
  • ttt

Wednesday, January 18, 2012

Oracle

Oracle Data Pump in Oracle Database 10g (expdp and impdp)

Getting Started

For the examples to work we must first unlock the SCOTT account and create a directory object it can access. The directory object is only a pointer to a physical directory, creating it does not actually create the physical directory on the file system.
CONN / AS SYSDBA
ALTER USER scott IDENTIFIED BY tiger ACCOUNT UNLOCK;

CREATE OR REPLACE DIRECTORY test_dir AS '/u01/app/oracle/oradata/';
GRANT READ, WRITE ON DIRECTORY test_dir TO scott;
Existing directories can be queried using the ALL_DIRECTORIES view.

Table Exports/Imports

The TABLES parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax.
expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log
For example output files see expdpEMP_DEPT.log and impdpEMP_DEPT.log.
The TABLE_EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.

Schema Exports/Imports

The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is used to specify the schemas to be exported. The following is an example of the schema export and import syntax.
expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log
For example output files see expdpSCOTT.log and impdpSCOTT.log.

Database Exports/Imports

The FULL parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax.
expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log

impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.log
For an example output file see expdpDB10G.log.

INCLUDE and EXCLUDE

The INCLUDE and EXCLUDE parameters can be used to limit the export/import to specific objects. When the INCLUDE parameter is used, only those objects specified by it will be included in the export/import. When the EXCLUDE parameter is used, all objects except those specified by it will be included in the export/import. The two parameters are mutually exclusive, so use the parameter that requires the least entries to give you the result you require. The basic syntax for both parameters is the same.
INCLUDE=object_type[:name_clause] [, ...]
EXCLUDE=object_type[:name_clause] [, ...]
The following code shows how they can be used as command line parameters.
expdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

expdp scott/tiger@db10g schemas=SCOTT exclude=TABLE:"= 'BONUS'" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
If the parameter is used from the command line, depending on your OS, the special characters in the clause may need to be escaped, as follows. Because of this, it is easier to use a parameter file.
include=TABLE:\"IN (\'EMP\', \'DEPT\')\"
A single import/export can include multiple references to the parameters, so to export tables, views and some packages we could use either of the following approaches.
INCLUDE=TABLE,VIEW,PACKAGE:"LIKE '%API'"

or

INCLUDE=TABLE
INCLUDE=VIEW
INCLUDE=PACKAGE:"LIKE '%API'"
The valid object type paths that can be included or excluded can be displayed using the DATABASE_EXPORT_OBJECTS, SCHEMA_EXPORT_OBJECTS, and TABLE_EXPORT_OBJECTS views.

Network Exports/Imports (NETWORK_LINK)

The NETWORK_LINK parameter identifies a database link to be used as the source for a network export/import. The following database link will be used to demonstrate its use.
CONN / AS SYSDBA
GRANT CREATE DATABASE LINK TO test;

CONN test/test
CREATE DATABASE LINK remote_scott CONNECT TO scott IDENTIFIED BY tiger USING 'DEV';
In the case of exports, the NETWORK_LINK parameter identifies the database link pointing to the source server. The objects are exported from the source server in the normal manner, but written to a directory object on the local server, rather than one on the source server. Both the local and remote users require the EXP_FULL_DATABASE role granted to them.
expdp test/test@db10g tables=SCOTT.EMP network_link=REMOTE_SCOTT directory=TEST_DIR dumpfile=EMP.dmp logfile=expdpEMP.log
For imports, the NETWORK_LINK parameter also identifies the database link pointing to the source server. The difference here is the objects are imported directly from the source into the local server without being written to a dump file. Although there is no need for a DUMPFILE parameter, a directory object is still required for the logs associated with the operation. Both the local and remote users require the IMP_FULL_DATABASE role granted to them.
impdp test/test@db10g tables=SCOTT.EMP network_link=REMOTE_SCOTT directory=TEST_DIR logfile=impdpSCOTT.log remap_schema=SCOTT:TEST

impdp

impdp help=y

Import: Release 10.1.0.2.0 - Production on Saturday, 11 September, 2004 17:22

Copyright (c) 2003, Oracle.  All rights reserved.


The Data Pump Import utility provides a mechanism for transferring data objects
between Oracle databases. The utility is invoked with the following command:

     Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

You can control how Import runs by entering the 'impdp' command followed
by various parameters. To specify parameters, you use keywords:

     Format:  impdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
     Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

USERID must be the first parameter on the command line.

Keyword               Description (Default)
------------------------------------------------------------------------------
ATTACH                Attach to existing job, e.g. ATTACH [=job name].
CONTENT               Specifies data to load where the valid keywords are:
                      (ALL), DATA_ONLY, and METADATA_ONLY.
DIRECTORY             Directory object to be used for dump, log, and sql files.
DUMPFILE              List of dumpfiles to import from (expdat.dmp),
                      e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.
ESTIMATE              Calculate job estimates where the valid keywords are:
                      (BLOCKS) and STATISTICS.
EXCLUDE               Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.
FLASHBACK_SCN         SCN used to set session snapshot back to.
FLASHBACK_TIME        Time used to get the SCN closest to the specified time.
FULL                  Import everything from source (Y).
HELP                  Display help messages (N).
INCLUDE               Include specific object types, e.g. INCLUDE=TABLE_DATA.
JOB_NAME              Name of import job to create.
LOGFILE               Log file name (import.log).
NETWORK_LINK          Name of remote database link to the source system.
NOLOGFILE             Do not write logfile.
PARALLEL              Change the number of active workers for current job.
PARFILE               Specify parameter file.
QUERY                 Predicate clause used to import a subset of a table.
REMAP_DATAFILE        Redefine datafile references in all DDL statements.
REMAP_SCHEMA          Objects from one schema are loaded into another schema.
REMAP_TABLESPACE      Tablespace object are remapped to another tablespace.
REUSE_DATAFILES       Tablespace will be initialized if it already exists (N).
SCHEMAS               List of schemas to import.
SKIP_UNUSABLE_INDEXES Skip indexes that were set to the Index Unusable state.
SQLFILE               Write all the SQL DDL to a specified file.
STATUS                Frequency (secs) job status is to be monitored where
                      the default (0) will show new status when available.
STREAMS_CONFIGURATION Enable the loading of Streams metadata
TABLE_EXISTS_ACTION   Action to take if imported object already exists.
                      Valid keywords: (SKIP), APPEND, REPLACE and TRUNCATE.
TABLES                Identifies a list of tables to import.
TABLESPACES           Identifies a list of tablespaces to import.
TRANSFORM             Metadata transform to apply (Y/N) to specific objects.
                      Valid transform keywords: SEGMENT_ATTRIBUTES and STORAGE.
                      ex. TRANSFORM=SEGMENT_ATTRIBUTES:N:TABLE.
TRANSPORT_DATAFILES   List of datafiles to be imported by transportable mode.
TRANSPORT_FULL_CHECK  Verify storage segments of all tables (N).
TRANSPORT_TABLESPACES List of tablespaces from which metadata will be loaded.
                      Only valid in NETWORK_LINK mode import operations.
VERSION               Version of objects to export where valid keywords are:
                      (COMPATIBLE), LATEST, or any valid database version.
                      Only valid for NETWORK_LINK and SQLFILE.

The following commands are valid while in interactive mode.
Note: abbreviations are allowed

Command               Description (Default)11g
------------------------------------------------------------------------------
CONTINUE_CLIENT       Return to logging mode. Job will be re-started if idle.
EXIT_CLIENT           Quit client session and leave job running.
HELP                  Summarize interactive commands.
KILL_JOB              Detach and delete job.
PARALLEL              Change the number of active workers for current job.
                      PARALLEL=.
START_JOB             Start/resume current job.
                      START_JOB=SKIP_CURRENT will start the job after skipping
                      any action which was in progress when job was stopped.
STATUS                Frequency (secs) job status is to be monitored where
                      the default (0) will show new status when available.
                      STATUS=[interval]
STOP_JOB              Orderly shutdown of job execution and exits the client.
                      STOP_JOB=IMMEDIATE performs an immediate shutdown of the
                      Data Pump job.
Oracle 10g Release 2 (10.2) added the following parameter.
Keyword               Description (Default)
------------------------------------------------------------------------------
ENCRYPTION_PASSWORD   Password key for accessing encrypted column data.
                      This parameter is not valid for network import jobs.
Oracle 11g Release 1 (11.1) added the following parameters.
Keyword               Description (Default)
------------------------------------------------------------------------------
DATA_OPTIONS          Data layer flags where the only valid value is:
                      SKIP_CONSTRAINT_ERRORS-constraint errors are not fatal.
PARTITION_OPTIONS     Specify how partitions should be transformed where the
                      valid keywords are: DEPARTITION, MERGE and (NONE)
REMAP_DATA            Specify a data conversion function,
                      e.g. REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO
Oracle 11g Release 1 (11.2) altered the format of the help output as well as adding the following parameters.
CLUSTER
Utilize cluster resources and distribute workers across the Oracle RAC.
Valid keyword values are: [Y] and N.

SERVICE_NAME
Name of an active Service and associated resource group to constrain Oracle RAC resources.

SOURCE_EDITION
Edition to be used for extracting metadata.

TARGET_EDITION
Edition to be used for loading metadata.

Thursday, December 22, 2011

easyboot制作xp、win7、ubuntu、老毛桃winpe、深山红叶dos工具箱多合一光盘

http://blog.csdn.net/chengli42/article/details/6121395


一. 首先,准备需要用到的工具:
    1. 5个映像文件:自己去网上下载
    2. easyboot:必备,网上下载,主要靠他
    3. ultraiso: 必备,软碟通,提取映像启动文件,修改ISO用
    4. photoshop:可选,制作背景图片用
二. 制作背景图片
    Easyboot自带的背景图片太丑了,还有讨厌的LOG,所以我们可以自己DIY自己喜欢的图片做背景图片。新版的easyboot支持分辨率800X600,16位的BMP格式的图片,其他格式和分辨率的图片需要打开photoshop转换一下,转换没有特殊要求。
    调整分辨率:图像---图像大小---宽度:800像素,高度600像素,记得把约束比例前面的勾去掉。
    转换格式:调整好分辨率后,文件---另存为---格式选择BMP,保存----弹出的框里,文件格式:windows,深度:16位,保存就OK了
三. 提取映像的启动文件
    打开UltraISO,找到下载好的映像,菜单栏---启动---保存引导文件,自己根据需要命名,以此提取winxp.bif,win7-32.bif,winpe.bif
    ubuntu的启动文件提取比较简单,直接打开ubuntu的ISO,找到isolinux文件夹下的isolinux.bin文件,复制出来。
四. 制作光盘
    打开装好的easyboot目录,可以看到三个文件夹,disk1文件夹就是制作出的光盘的根目录,存放文件的,第二个iso是放制作好的新光盘的映像文件的,第三个系统自动生成,不用改动
    打开disk1文件夹,将第三步中提取的4个引导文件,拷贝到ezboot文件夹中,将dos工具箱的img文件也直接拷贝到该文件夹下。
    用UltraISO提取映像文件到disk1目录,顺序如下:XP,WIN7,UBUNTU,WINPE
    XP:提取I386文件夹、WIN51,WIN51IP,WIN51IP.SP3,一共是1个文件夹和3个文件
    WIN7:全部提取,提取结束后打开source文件夹,删除ei.cfg文件,这个文件删除后,可以让WIN7安装时自主选择安装版本。
    ubuntu,winpe:直接提取整个光盘,如有提示重复,直接覆盖
    顺序不要弄反,否则可能造成某些无法启动
五. 修改easyboot菜单设置
     1.修改图片格式:打开easyboot.exe,会弹出提示,背景图片格式不对,修改方法:点击选项---配置---屏幕模式:64K色(16位),屏幕分辨率:800X600
     2. 修改菜单栏:将选项卡移到菜单条,可以根据坐标自己新建菜单栏,我们需要8个菜单项:XP,WIN7,UBUNTU,WINPE,DOS工具,硬盘启动,重新启动,关闭计算机。
         高亮属性是指光标移到该菜单项时,菜单项显示的颜色;正常属性就是光标没有选中时,菜单显示的颜色。
         编辑完菜单项后,需要设定执行命令和快捷键,执行命令设定如下:
        XP:run winxp.bif
        win7: run win7-32.bif
        ubuntu:bcdw /ezboot/isolinux.bin
        winpe:run winpe.bif
        dos:run dos98.img
        硬盘启动:boot 80
        重新启动:reboot
        关机:bcdw:poweroff
        在设定菜单栏时,有一项要非常注意,就是菜单项的范围不能有交叉,不光是文字不能有重复,用坐标控制的菜单范围也不能有交叉。否则会引起菜单项处花屏,为这个我折腾了一个星期,一开始以为是背景图片问题,到处找如何设置背景图片,后来才发现,原来是菜单项的范围有交叉,离远点就好了。
六. 制作ISO
      这一步需要注意,选项里的优化光盘文件,DOS,Joliet都不要勾上,尤其是下面的允许小写字母不可以勾上,不知道为什么我勾上这个XP安装程序就启动不了了。也是找了很久才发现问题出在这个上面。设置文件日期可以勾上,让作出的光盘更专业。
七. 刻盘
      去VMVARE中测试,可以先用DOS工具箱给虚拟机中硬盘分区,然后安装XP,WIN7,UBUNTU3系统,用PE进系统进行维护,测试无误后就可以刻盘了。

      有些朋友用easyboot制作多启动光盘后,别的都正常,但是在启动WINPE时,无法进入WINPE迷你系统,弹出如下提示:
line 1 of the inf file winnt xpe is invalid
      这个问题困扰了我很久,后来终于找到解决方案,原因是一张DVD光盘可以放4.37G的东西,我不想让空间浪费,就放了一些常用工具进去,ISO超过了4G,问题就来了,据说WINPE在超过4G的光盘上运行就会出问题,我一试还真是这样,现找到解决方案,共享给大家,亲测可用:
      用UltraISO打开制作好的ISO,打开EZBOOT文件夹,在PE.BIF上点右键—“文件属性”,将“优先级”设为“9”—“确定”。
      同样的办法把XP.BIN、VISTA.BIF的优先级也设为“9”
      打开MINIPE,将里面的OP.WIM、WINPE.INI、WINPE.IS_的优先级设为“9”
      打开WXPE,将里面的NTDETECT.COM、SETUPLDR.BIN的优先级设为“9”
      将光盘根目录下的Autounattend.xml、BOOTMGR、WIN51、WIN51IP、WIN51IP.SP3、WINNT.XPE、README.DISKDEFINES、UBUNTU、WUBI.EXE的优先级也都设为“9”
      点“文件”—“保存”,等待镜像重制完成后,ISO的修改就成功了。

      下面还有一种方法,我没有测试过:    
另,很早就看到过很多帖子说在集成dvd系统光盘时出现容量大于4G就不能正常启动,本人也出现这个问题,久而未决,心想众多高手尚且如此,何况我这个无名小辈。
以下是雨林论坛的一个帖子:http://www.ylmf.net/read.php?tid=1080140。帖主也遇到这个问题。
以前都是用nMaker生成引导文件,用zeboot集成,也没有多想。不久前潜水个论坛是才发现cdimage才是根本,于是用ezboot做好图片什么的,只是在集成时用cdimage,刚开始也是努力把光盘容量控制在4G以内,但后来我有意识的试了一下超过4G,在虚拟机下测试居然成功了。
说到这里大家都明白了吧?就是用ezboot把什么都做好,然后用cdimage来集成就可以超过4G的限制了。好了,不要再浪费你的dvd光盘了,赶快试试吧。至于它们的使用我就不说了吧。本人表达能力有限,附下几张图片,大家看看怎么样?

2.启动WINPE出现如下提示: line 1 of the inf file winpe.xpe is invalid

setup cannot continue, press any key to exit 。

光盘大于4G,WINPE,特别是格式如MAX(221)的,或者DOS8.3的,都不支持大于4G的光盘启动。光盘的格式问题和目录排序问题

解决方法:使用UltraISO(转换DVD光盘格式,使用 windows/unix(31) 格式) 或者重新做一个DVD镜像 ,但用UltraisoR软件制作的ISO文件有可能用虚拟机能启动,但刻成盘后可能就不能启动,已经有个例子了。强烈推荐用CDIMAGE来制作ISO文件,是最最好的!绝对不会出现问题,而且也不用改成windows/unix(31)格式,直接就是MAX(221),也能正常启动WINPE,大于4G的情况下哦,看来还是老外的比较好!要不人家微软为什么制作的MSDN的系统都是用CDIMAGE来制作的呢?那个肯定有它的好处!


上几篇文章中,已经介绍了如何用easyboot制作多启动光盘,现在介绍如何做多启动U盘
1. 首先,对U盘进行量产,量产要根据U盘不同的芯片,去网站下载不同的量产工具,将U盘量产成USB—CDROM和USB—HDD两个区
2. 将用EASYBOOT制作的ISO,复制进USB—CDROM分区中
3. 重新启动即可。
这样做的好处就是,只要将U盘量产后,将光盘映像ISO文件复制到CDROM分区后,就可以直接从DOS下启动了。