########################Unix/Linux/Cloud and Storage Tips and procedures################ Welcome to UnixAdministrationSchool blog,I am an Unix System administrator by profession,I had very good opportunity to work with various platform technologies like Solaris, Linux, ,HP-UX,AIX,Veritas Products and SAN. i have been certified SCSA.NCLA,ITIL,VCS and Parallels Cloud Automation Engineer. Thank you, Santhosh Kumar Reddy R
Thursday, December 15, 2011
Non-global Solaris zones
Non-global Solaris zones
Sun's solution for virtualization is Solaris Containers. Actually this solution has two categories: 1. Zones – application isolation 2. Resource management This doc is about Zones only. Zone is virtualized OS environment within single instance of Solaris OS. Every Solaris 10 system contains a global zone (default zone for system and for managing other non-global zones).
# zoneadm list -v ID NAME STATUS PATH BRAND IP 0 global running / native shared |
# svcadm -v disable zones svc:/system/zones:default disabled. # svcs zones STATE STIME FMRI disabled 15:24:37 svc:/system/zones:default |
# zonecfg -z zone-1 zone-1: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:zone-1> create zonecfg:zone-1> set zonepath=/.0/zone-1 zonecfg:zone-1> add net zonecfg:zone-1:net> set physical=eri0 zonecfg:zone-1:net> set address=192.168.etc.etc zonecfg:zone-1:net> end zonecfg:zone-1> verify zonecfg:zone-1> commit zonecfg:zone-1> exit |
# zoneadm -z zone-1 verify /.0/zone-1 must not be group readable. /.0/zone-1 must not be group executable. /.0/zone-1 must not be world readable. /.0/zone-1 must not be world executable. could not verify zonepath /.0/zone-1 because of the above errors. zoneadm: zone zone-1 failed to verify |
# zonecfg -z zone-1 info zonename: zone-1 zonepath: /.0/zone-1 brand: native autoboot: false bootargs: pool: limitpriv: scheduling-class: ip-type: shared inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 192.168.x.x physical: eri0 defrouter not specified |
# zoneadm -z zone-1 install Preparing to install zone . Creating list of files to copy from the global zone. Copying <9161> files to the zone. Initializing zone product registry. Determining zone package initialization order. Preparing to initialize <426> packages on the zone. Initialized <426> packages on zone. Zone is initialized. The file contains a log of the zone installation |
# zoneadm list -vi ID NAME STATUS PATH BRAND IP 0 global running / native shared - zone-1 installed /.0/zone-1 native shared |
# zoneadm -z zone-1 ready # zoneadm list -vi ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 zone-1 ready /.0/zone-1 native shared |
# zoneadm -z zone-1 boot # zoneadm list -vi ID NAME STATUS PATH BRAND IP 0 global running / native shared 4 zone-1 running /.0/zone-1 native shared |
# zlogin -C zone-1
[Connected to zone 'zone-1' console]
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair
Configuring network interface addresses:.
rebooting system due to change(s) in /etc/default/init
[NOTICE: Zone rebooting]
SunOS Release 5.10 Version Generic_139555-08 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: zone-1-zone
Reading ZFS config: done.
zone-1-zone console login:
|
# zlogin zone-1 |
# zlogin zone-1 shutdown # zoneadm list -vi ID NAME STATUS PATH BRAND IP 0 global running / native shared - zone-1 installed /.0/zone-1 native shared |
# zoneadm –z zone-1 uninstall –F # zoneadm list -vi ID NAME STATUS PATH BRAND IP 0 global running / native shared |
# zonecfg -z zone-1 info zonename: zone-1 zonepath: /.0/zone-1 brand: native autoboot: false bootargs: pool: limitpriv: scheduling-class: ip-type: shared inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr |
# zonecfg -z zone-1 delete -F # zonecfg -z zone-1 info zone-1: No such zone configured |
Monday, August 29, 2011
Booting from an alternate boot disk
Booting from an alternate boot disk
If the root disk is encapsulated and mirrored, you can use one of its mirrors to boot the system if the primary boot disk fails.
On a Sun x64 system, the alternate boot disk can be added to the GRUB boot menu, or the
bootpath
can be redefined in the EEPROM without changing the GRUB configuration. - Check that the EEPROM variable
use-nvramrc?
is set totrue
. - Set the value of
use-nvramrc?
totrue
. - Define an alternate boot disk by entering the following command at the
ok
boot prompt: - Use the
devalias
command at the boot prompt to discover the alternate disks from which the system may be booted: - You should now be able to boot the system from an alternate boot disk,
vx-
altboot_disk, by entering the following command at theok
boot prompt:
- Boot the system into the failsafe OS from the GRUB boot menu or from the Solaris installation disc.
- Mount the
root
file system from the root disk mirror (this is usually on slices0
) on a suitable mount point, such as/a
: - List the device that corresponds to the
root
file system on the root disk mirror: - Edit the boot environment configuration file,
/a/boot/solaris/bootenv.rc
, and change the line that defines the boot path so that it points to the PROM path of the root disk mirror, for example: - Update the EEPROM information:
- Edit the GRUB configuration file,
/boot/grub/menu.lst
, and look for the entry for the primary root disk, for example: - Create a similar entry to allow the root disk mirror to be booted, for example:
- Copy the modified GRUB configuration file to the mounted root disk mirror:
- On rebooting the system, the GRUB menu should allow you to boot from the the primary root disk or from a root disk mirror.
On x64 systems, the boot disk device is usually designated as
hd0
by GRUB as it is the first disk to be discovered by the operating system. The alternate boot disk usually corresponds to hd1
. If you change the boot order to boot from the alternate boot disk, the new boot disk becomes hd0
, and the old boot disk becomes hd1
. - If the system will not boot from the primary root disk, and a suitable alternate root disk mirror is not shown in the GRUB menu, boot the system into the failsafe OS from the GRUB boot menu or from the Solaris installation disc.
- Mount the
root
file system from the root disk mirror (this is usually on slices0
) on a suitable mount point, such as/a
: - List the device that corresponds to the
root
file system on the root disk mirror: - Edit the boot environment configuration file,
/a/boot/solaris/bootenv.rc
, and change the line that defines the boot path so that it points to the PROM path of the root disk mirror, for example: - Update the EEPROM information:
- The system should now be bootable from the new device that is defined by
bootpath
. Perform a reconfiguration reboot:
Navigating Among the Platform Shell, the Domain Shell, and Domain Console
Wednesday, August 17, 2011
SUN 6800/4810/4800/3800 systems management manual notes
SUN 6800/4810/4800/3800 systems management manual notes
system controller procedures Wizard
This chapter step by step> Access Platform Shell
There are two ways to visit Platform Shell, through a serial connection (Platform console), a through TELNET (network connection).
Use TELNET to visit Platform Shell
1 through TELNET access to the system controller
2, in the main menu system controller type "P" or "0", entered the Platform Shell, a prompt: schostname: SC>,
Process indicated as follows:
Telnet schostname
Trying xxx.xxx.xxx.xxx
Connected to schostname-sc0.
Escape character is'^]'.
System Controller schostname-sc0:
Type 0 for Platform Shell
Type 1 for domain A
Type 2 for domain B
Type 3 for domain C
Type 4 for domain D
Input: 0
Platform Shell
Schostname: SC>
Use the serial port visit Platform Shell
Use the serial port, you can use three kinds of devices to connect.
ASCII terminal
Network Terminal Server
Workstation
Three different from the process equipment
ASCII terminal connected to the system controller serial port, the system controller will be shown the main menu, type "P" or "0", entered Platform Shell.
Connect to the network terminal server (NTS) to the system controller ports, the importation of TELNET order, followed by host name or IP address, system controller there will be the main menu, the loser "P" or "0" P entered Platform Shell.
Workstation
1, the system controller connected to your serial port serial workstations
2, in the prompt SOLARIS tip hardwire input commands to connect to the system controller
3, P input into the platform shell or 0
Visit a domain
Visit domain is the principal means through TELNET (network connection)
Note: Due to a serial port connection is used to connect platform shell, so do not use the serial port to connect domain
DOMAIN shell
If KEYSWITCH is set to (STANDBY or OFF), Victoria had not been activated, then SOLARIS OPENBOOT PROM or operating environment will not be running. If you are running SOLARIS or OPENBOOT PROM mode, then the domain is activated.
Use TELNET order visit domain.
1, the importation of TELNET order, followed by host name or IP address, system controller there will be the main menu, enter 1, 2, 3 or 4 domain type (which can also enter A, B, C or D) to enter DOMAIN Shell.
As follows:
% Telnet schostname
System Controller schostname-sc0:
Type 0 for Platform Shell
Type 1 for domain A
Type 2 for domain B
Type 3 for domain C
Type 4 for domain D
Input: 1
Connected to Domain A
Domain Shell for Domain A
Schostname: A>
2, if the domain is activated, and domain key KEYSWITCH is set to> Hold down the CTRL key, entered TELNET> prompt
In TELNET> prompt, enter send break, from the domain console to the domain shell prompt
As follows:
Ok Ctrl-]
Telnet> send break
Schostname: A>
Below are a description of how to switch between the three:
System Controller platform platform
System Controller domain Shell
System Controller domain console
To go back to the original shell, just enter orders disconnect from the domain Shell to connect to the domain console, resume the importation of orders from the platform Shell switch to the domain Shell console imported under orders.
By entering telnet schostname 500x, you can directly enter the platform shell or
A domain shells or domain console. You can skip to the main menu system controller
In the telnet command, the 5000 is the platform shell, and X is the other figures, as follows:
X is:
1 for domain A
2 for domain B
3 for domain C
4 for domain D
In the console command, domainID is a, b, c, or d.
Here's how SOLARIS environment domain Shell, toggle between openboot prom
SOLARIS assumption is running in the SOLARIS circumstances, the importation
CTRL]
Telnet> send break
Entered the domain Shell,
In the domain Shell, has returned to resume importing SOLARIS environment, such as the importation of break, to openboot prom environment
Note: importing break, then hung SOLARIS environment
Here's how the domain Shell, toggle between openboot prom, assumptions SOLARIS not running
Openboot prom in the> prompt type:
CTRL]
Telnet> send break
> Importing resume, has returned to the environment openboot prom
If the domain has not been activated from the domain Shell to domain console, in the domain Shell setkeyswitch> Domain console domain is activated> Setkeyswitch> From the domain console access to the domain Shell,
OK prompt and type in
Ok CTRL]
Telnet> send break
Should return to the domain console, input
Schostname: A> resume
If the domain has not been activated (SOLARIS, openboot prom is not running), the system controller to remain in the domain Shell, the show
DomainA is not active
Schostname: A>
From the Platform shell into the domain, input console a, as follows:
Schostname: SC> console a
Connected to Domain A
Domain Shell for Domain A
Schostname: A>
If openboot prom in the running, and you will enter a domain console, if the switch-off keyswitch is set to standby, or you will enter a domain A Shell.
(Hint, from the Platform shell into a different domain, the importation of different domain ID, domainID b, c, or d replace a.)
To suspend a session (if you are from the mouth TELNET Ethernet connectivity)
Imported under the domain Shell disconnect order, as follows
Schostname: A> disconnect
Connection closed by foreign host.
Machine_name_prompt%
Your system interrupt controller conversation
To suspend a session (if you are from the serial connection)
If you are connecting the system controller ports, then use the disconnect, suspension system controller conversation, and then use ~. Suspended TIP (TIP for the transmission INTERNET Protocol) sessions. As follows
Schostname: A> disconnect
Connection closed by foreign host.
Machine_name_prompt% ~.
Your system interrupt controller conversation
system controller procedures Wizard
This chapter step by step> Access Platform Shell
There are two ways to visit Platform Shell, through a serial connection (Platform console), a through TELNET (network connection).
Use TELNET to visit Platform Shell
1 through TELNET access to the system controller
2, in the main menu system controller type "P" or "0", entered the Platform Shell, a prompt: schostname: SC>,
Process indicated as follows:
Telnet schostname
Trying xxx.xxx.xxx.xxx
Connected to schostname-sc0.
Escape character is'^]'.
System Controller schostname-sc0:
Type 0 for Platform Shell
Type 1 for domain A
Type 2 for domain B
Type 3 for domain C
Type 4 for domain D
Input: 0
Platform Shell
Schostname: SC>
Use the serial port visit Platform Shell
Use the serial port, you can use three kinds of devices to connect.
ASCII terminal
Network Terminal Server
Workstation
Three different from the process equipment
ASCII terminal connected to the system controller serial port, the system controller will be shown the main menu, type "P" or "0", entered Platform Shell.
Connect to the network terminal server (NTS) to the system controller ports, the importation of TELNET order, followed by host name or IP address, system controller there will be the main menu, the loser "P" or "0" P entered Platform Shell.
Workstation
1, the system controller connected to your serial port serial workstations
2, in the prompt SOLARIS tip hardwire input commands to connect to the system controller
3, P input into the platform shell or 0
Visit a domain
Visit domain is the principal means through TELNET (network connection)
Note: Due to a serial port connection is used to connect platform shell, so do not use the serial port to connect domain
DOMAIN shell
If KEYSWITCH is set to (STANDBY or OFF), Victoria had not been activated, then SOLARIS OPENBOOT PROM or operating environment will not be running. If you are running SOLARIS or OPENBOOT PROM mode, then the domain is activated.
Use TELNET order visit domain.
1, the importation of TELNET order, followed by host name or IP address, system controller there will be the main menu, enter 1, 2, 3 or 4 domain type (which can also enter A, B, C or D) to enter DOMAIN Shell.
As follows:
% Telnet schostname
System Controller schostname-sc0:
Type 0 for Platform Shell
Type 1 for domain A
Type 2 for domain B
Type 3 for domain C
Type 4 for domain D
Input: 1
Connected to Domain A
Domain Shell for Domain A
Schostname: A>
2, if the domain is activated, and domain key KEYSWITCH is set to> Hold down the CTRL key, entered TELNET> prompt
In TELNET> prompt, enter send break, from the domain console to the domain shell prompt
As follows:
Ok Ctrl-]
Telnet> send break
Schostname: A>
Below are a description of how to switch between the three:
System Controller platform platform
System Controller domain Shell
System Controller domain console
To go back to the original shell, just enter orders disconnect from the domain Shell to connect to the domain console, resume the importation of orders from the platform Shell switch to the domain Shell console imported under orders.
By entering telnet schostname 500x, you can directly enter the platform shell or
A domain shells or domain console. You can skip to the main menu system controller
In the telnet command, the 5000 is the platform shell, and X is the other figures, as follows:
X is:
1 for domain A
2 for domain B
3 for domain C
4 for domain D
In the console command, domainID is a, b, c, or d.
Here's how SOLARIS environment domain Shell, toggle between openboot prom
SOLARIS assumption is running in the SOLARIS circumstances, the importation
CTRL]
Telnet> send break
Entered the domain Shell,
In the domain Shell, has returned to resume importing SOLARIS environment, such as the importation of break, to openboot prom environment
Note: importing break, then hung SOLARIS environment
Here's how the domain Shell, toggle between openboot prom, assumptions SOLARIS not running
Openboot prom in the> prompt type:
CTRL]
Telnet> send break
> Importing resume, has returned to the environment openboot prom
If the domain has not been activated from the domain Shell to domain console, in the domain Shell setkeyswitch> Domain console domain is activated> Setkeyswitch> From the domain console access to the domain Shell,
OK prompt and type in
Ok CTRL]
Telnet> send break
Should return to the domain console, input
Schostname: A> resume
If the domain has not been activated (SOLARIS, openboot prom is not running), the system controller to remain in the domain Shell, the show
DomainA is not active
Schostname: A>
From the Platform shell into the domain, input console a, as follows:
Schostname: SC> console a
Connected to Domain A
Domain Shell for Domain A
Schostname: A>
If openboot prom in the running, and you will enter a domain console, if the switch-off keyswitch is set to standby, or you will enter a domain A Shell.
(Hint, from the Platform shell into a different domain, the importation of different domain ID, domainID b, c, or d replace a.)
To suspend a session (if you are from the mouth TELNET Ethernet connectivity)
Imported under the domain Shell disconnect order, as follows
Schostname: A> disconnect
Connection closed by foreign host.
Machine_name_prompt%
Your system interrupt controller conversation
To suspend a session (if you are from the serial connection)
If you are connecting the system controller ports, then use the disconnect, suspension system controller conversation, and then use ~. Suspended TIP (TIP for the transmission INTERNET Protocol) sessions. As follows
Schostname: A> disconnect
Connection closed by foreign host.
Machine_name_prompt% ~.
Your system interrupt controller conversation
System Controller Navigation Procedures
This chapter explains step-by-step procedures with illustrations describing how to:
- Connect to the platform and the domains
- Navigate between the domain shell and the domain console
- Terminate a system controller session
There are two types of connections: telnet and serial. If you are using a telnet connection, configure the system controller network settings before using telnet.You can access the system controller main menu using either the telnet or serial connections.
You can also bypass the system controller main menu by making a telnet connection to a specific port.
The system controller main menu is displayed. CODE EXAMPLE 2-1 shows how to enter the platform shell.
The system controller prompt, schostname:SC>, is displayed for the platform shell of the main system controller. If you have a redundant SC configuration, the spare system controller prompt is schostname:sc>.
The system controller prompt for the domain shell you connected to is displayed. CODE EXAMPLE 2-2 shows entering the shell for domain A, whose prompt is
schostname:A>.
3. If the domain is active (the domain keyswitch is set to on, diag, or secure which means you are running the Solaris operating environment, or are in the OpenBoot PROM), perform the following steps:
If the domain is active and the domain keyswitch is set to on, diag, or secure (you are running the Solaris operating environment, are in the OpenBoot PROM, or are running POST), perform the following steps:
CODE EXAMPLE 2-4 shows obtaining the shell for domain A from the domain console. Because the domain is active, you will not see a prompt.
To return to the originating shell, use the disconnect command. In a domain shell, to connect to the domain console, use the resume command. To connect to a domain shell from the platform shell, use the console command.
FIGURE 2-1 shows how to navigate between the platform shell, the domain shell, the domain console by using the console and disconnect commands. FIGURE 2-1 also shows how to connect to both the domain shell and platform shell from the operating environment by using the telnet command.
FIGURE 2-2 illustrates how to navigate between the Solaris operating environment, the OpenBoot PROM, and the domain shell. FIGURE 2-2 assumes that the Solaris operating environment is running.
FIGURE 2-2 Navigating Between the Domain Shell, the OpenBoot PROM, and the Solaris Operating Environment
FIGURE 2-3 illustrates how to navigate between the OpenBoot PROM and the domain shell. This figure assumes that the Solaris operating environment is not running.
When you connect to a domain, you will be connected to the domain shell unless the domain is active, in which case you will be connected to the domain console. When you connect to the console, you will be connected to the Solaris operating environment console or the OpenBoot PROM, depending on which of these is currently executing.
The domain console is available only when the domain is active. To make the domain active, you must turn the keyswitch on. You will be automatically switched from the domain shell to the domain console.
This action powers on and initializes the domain. The domain will go through POST and then the OpenBoot PROM. If the OpenBoot PROM auto-boot? parameter of the setupdomain command is set to true, the Solaris operating environment will boot. For details on the domain parameters, refer to the setupdomain command description in the Sun Fire 6800/4810/4800/3800 System Controller Command Reference Manual.
1. Press and hold the CTRL key while pressing the ] key to get to the telnet> prompt (CODE EXAMPLE 2-5).
If the OpenBoot PROM is running, you are returned to the console for domain A. If the keyswitch is set to off or standby, you are returned to the shell for domain A.
If you are connected to the System Controller board with the serial port, use the disconnect command to terminate the system controller session then use a tip command to terminate your tip session.
2. If you are in a domain shell and are connected from the platform shell, type disconnect again to disconnect from the system controller session.
Thanks,
Santhosh Kumar Reddy Rodda
Subscribe to:
Posts (Atom)