المــهـندس والمحاسب احـمـد الـنـهـاري ENGINEER AND ACCOUNTANT AHMED ALNEHARY
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.
المــهـندس والمحاسب احـمـد الـنـهـاري ENGINEER AND ACCOUNTANT AHMED ALNEHARY

افكار من ذهب - ابداع -عـلـمـي ثــقافــي اجـتـمـاعــي


أهلا وسهلا بك زائرنا الكريم, أنت لم تقم بتسجيل الدخول بعد! يشرفنا أن تقوم بالدخول أو التسجيل إذا رغبت بالمشاركة في المنتدى

ENG AHMED ALNAHARI SUN

اذهب الى الأسفل  رسالة [صفحة 1 من اصل 1]

1ENG AHMED ALNAHARI SUN Empty ENG AHMED ALNAHARI SUN الأحد يناير 21, 2018 11:10 pm

Admin


Admin

Dladm
dladm show-dev

ifconfig lo0 down
ifconfig lo0 unplumb ( disable)
=============================================

If you want to copy the partition table to another disk, perform

prtvtoc /dev/rdsk/cxtxdxs2 | fmthard -s - /dev/rdsk/cxtxdxs2

1st controller, target and disk should be the source and the 2nd cxtxdxs2 should be your dest disk.
Then newfs the slices accordingly.
After that, you can use ufsdump to copy the data into the relevant partitons
-----------------------------------------------------

ufsdump 0f - /dev/rdsk/c1t0d0s0 | (cd /mnt; ufsrestore xf -) .

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

When you want to back up from disk to disk, for example,
if you want to back up c0t0d0s0 to c0t1d0s0:
# mkdir /tmp/backup
# mount /dev/dsk/c0t1d0s0 /tmp/backup
# ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /tmp/backup;ufsrestore xvf -)
# ufsdump 0f - /dev/rdsk/c0t0d0s7 | (cd /home; ufsrestore xf -) { ok }




Now we need to make our new disk c1t1d0 bootable by using the installboot command: 'installboot /usr/platform//lib/fs/ufs /dev/rdsk/c1t1d0s0', or with installboot /usr/platform/`uname -i`/lib/fs/ufs /dev/rdsk/c1t1d0s0



/usr/sbin/installboot /usr/lib/fs/ufs/bootblk \
/dev/rdsk/c1t1d0s0

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

/usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/yourbootslice


First go to single user mode
mount the file system
mount /dev/dsk/c0t0d0s0 /a
cd /a
cd /usr/platform/'uname -m'
cd /lib/fs/ufs
installboot bootblk /dev/dsk/c0t0d0s0
umount /a
reboot
To Install bootblk on Solaris 5.09/10

ok boot cdrom -s

command to reinstall bootblk(boot block):
#installboot <raw-disk-device>

Example:

#/usr/bin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/cXtXdXsX

#installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0
---------------------------------------------------------------------------------------------

To backup directory to directory

# ufsdump 0f - /data | (cd /tmp/backup;ufsrestore xvf -)
OR
Mount /data1 and /backup
# cd /backup
# ufsdump 0uf - /data1 |ufsrestore -rf -




To find out current runlevel use who command: $ who –r

Power CPLD Test


Verifies the correct power revision of the complex programmable logic device (CPLD).
----------------------------------------------------------------------------------------------------------

Check for Faults
The fmadm faulty command displays the list of faults detected by PSH. You can run this
command from either the host or through the Oracle ILOM fault management shell.
1. Log in to Oracle ILOM.
See “Log In to Oracle ILOM (Service)” on page 30.
2. Check for PSH-diagnosed faults.

At the Oracle ILOM prompt, type the show faulty command.

-> show faulty
Target | Property | Value
--------------------+------------------------+-------------------------------
/SP/faultmgmt/0 | fru | /SYS/PS0
/SP/faultmgmt/0/ | class | fault.chassis.power.volt-fail



This example shows how to check for faults through the Oracle ILOM fault management shell.

-> start /SP/faultmgmt/shell
Are you sure you want to start /SP/faultmgmt/shell (y/n)? y

faultmgmtsp> fmadm faulty
------------------- ------------------------------------

Time UUID msgid Severity
------------------- ------------------------------------

2010-08-11/14:54:23 ********-****-****-****-************ SPT-8000-LC Critical

To check the fault from Solaris OS
# fmadm faulty


On T4-1 on ILOM

-> set /SYS/PS0 clear_fault_action=true
Are you sure you want to clear /SYS/PS0 (y/n)? y
->

Using Fault Management Shell to Clear the Fault

Enter the fault management shell.

-> start /SP/faultmgmt/shell
Are you sure you want to start /SP/faultmgmt/shell (y/n) ? y

faultmgmtsp>

Use 'fmadm repair' to clear the fault.

Please execute the bellow

Example1 for this case:

faultmgmtsp> fmadm repair 72f08061-3dbb-4c71-e681-a21b037a0f0f
># fmadm repair 01a39b63-82be-c3a1-d82e-a6f975a3d94f

Example 2:

fmadm repair /SYS/MB


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

Using the ILOM Command Line Interface to Clear the Fault


-> set /SYS/MB clear_fault_action=true





TO MAKE SYSTEM SEARCH FOR NEW DEV

Devfsadm

============================================================.
Following is an example of the /etc/hostname files required for a system called sunrise, which has two on-board Sun Gigabit Ethernet interfaces (ce0 and ce1) and a PCI Fast Ethernet adapter card (eri2). A network connected to the on-board ce0 and ce1 interfaces will know the system as sunrise and sunrise-1, while networks connected to the PCI-based eri0 interface will know the system as sunrise-2.
sunrise # cat /etc/hostname.ce0
sunrise
sunrise # cat /etc/hostname.ce1
sunrise-1
sunrise # cat /etc/hostname.eri0
sunrise-2

7. Create an entry in the /etc/hosts file for each active network interface.
An entry consists of the IP address and the host name for each interface.
The following example shows an /etc/hosts file with entries for the three network interfaces used as examples in this procedure.
sunrise # cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
129.144.10.57 sunrise loghost
129.144.14.26 sunrise-1
129.144.11.83 sunrise-2

8. Manually configure and enable each new interface using the ifconfig command.
For example, for the interface eri0, type:
# ifconfig eri0 inet ip-address netmask ip-netmask broadcast +
For more information, see the ifconfig(1M) man page.

Solaris > Add / Install new software packages
by nixCraft on February 1, 2005 • 10 comments• Last updated February 1, 2005
Package can be install from CDROM, Network i.e. NFS or downloading from Internet and then add it to system, or from existing location such as /var/spool/pkg directory if frequently required packages are copied to this location.
Solaris: Adding package from CDROM
1) Mount cdrom
2) To add or install GNU tar package from Solaris CD use command
# pkgadd -d /cdrom/cdrom0/Solaris_9/Product SUNWgtar
Where,
-d /cdrom/cdrom0/Solaris_9/Product: Specify package directory
SUNWgtar: Package name
Solaris: Adding packages to spool directory and then install them
1) Copy package to /var/spool/pkg directory first:
# pkgadd -d /cdrom/cdrom0/Solaris_9/Product -s /var/spool/pkg SUNWgtar
Transferring package instance
Where,
-d /cdrom/cdrom0/Solaris_9/Product: Specify package directory
-s /var/spool/pkg : Directory in which package will get stored
SUNWgtar: Package name
2) Install the packages copied to spool directory
# pkgadd SUNWgtar
Solaris: Install downloaded package
1) If your package is in .bz2 format then first uncompress it using bunzip2 command:
# bunzip2 Packagname.bz2
2) Install package:
# pkgadd –d Packagname
Note .bz2 extension will automatically removed by first command.
For example if your package name is SFWqt.bz2
# buzip2 SFWqt.bz2
# pkgadd –d SFWqt


SUN ships the 890s with the rsc disabled. The easiest way to set it up is

Setting RSC SunFire V890
Diposkan oleh ndevtuna di 12:05 PM Label: solaris
Berikut cara setting RSC (Remote System Console) untuk server SF V890 :

1. Login as root
2. Go to folder rsc
root # cd /usr/platform/`uname -i`/rsc
3. Do configure RSC
root # ./rsc-config

Continue with RSC setup (y|n): y
Set RSC date/time now (y|n|?) [y]:
Server Hostname [SFV890-SC]:
Edit customer info field (y|n|?) [n]:
Enable RSC Ethernet Interface (y|n|s|?) [n]: y
RSC IP Mode (config|dhcp|?) [dhcp]: config
RSC IP Address []: 192.168.1.10
RSC IP Netmask [255.255.255.0]:
RSC IP Gateway []: 192.168.1.1
Enable RSC Alerts (y|n|s|?) [n]: y
Enable Email Alerts (y|n) [n]:
Enable RSC Serial Port Interface (y|n|s|?) [n]: y
Serial port baud rate (9600|19200|38400|57600|115200) [9600]:
Serial port data bits (7|Cool [8]:
Serial port parity (even|odd|none) [none]:
Serial port stop bits (1|2) [1]:
Setup RSC User Account (y|n|?) [y]:
Username []: admin
User Permissions (c,u,a,r|none|?) [cuar]:



--------------------
Verifying Selections
--------------------


General Setup 890-SC
-------------
Set RSC date now = y
Server Hostname = SFV890-SC
Set Customer Info = n

Is this correct (y|n): y



Ethernet Setup
--------------
IP Mode = config
IP Address = 192.168.1.10
IP Netmask = 255.255.255.0
IP Gateway = 192.168.1.1

Is this correct (y|n): y

Alert Setup
-----------
Email Enabled = n
Is this correct (y|n): y



Serial Port Setup
-----------------
Serial Port Baud = 9600
Serial Port Data Bits = 8
Serial Port Parity = none
Serial Port Stop Bits = 1

Is this correct (y|n): y

User Setup
----------
User Name = admin
User Permissions = cuar

Is this correct (y|n):y

This script will now update RSC, continue? (y|n): y
Updating flash, this takes a few minutes

Download completed successfully

when this script completes,
use the rscadm command to correct the error.

Resetting RSC (takes about 90 seconds):
Are you sure you want to reboot RSC (y/n)? y
DONE
Setting up RSC date: DONE

*******************************
RSC has been successfully setup
*******************************
888888888888888888888888888888888888
How to extract cpio file ?


for Example the file is abcd.cpio

to extract to the same directory use command as follows

cpio -icvdu < abcd.cpio


FTP command
You are now ready to connect to a remote server and transfer files.
While you have FTP running, enter help to bring up a list of available commands that can be used. To learn more about a command, type help command.
To end the FTP session, type quit.

Connecting to a Server
At the ftp> prompt, type open hostname where hostname is the domain name or numerical IP address of the remote server (e.g. open troybrophy.com).
If you have entered a valid hostname you should eventually see the greeting, Connected to hostname. When the FTP server is ready it will notify you, and then ask for the account’s username, followed by the password.

lcd "c:\Program Files"
Changes the working directory on the local machine to Program Files
Changing the Transfer Mode
Once you have located the target directory on the remote server, you can begin the process of uploading (or downloading) files. At this point it is a good idea to set the file transfer mode. This tells the FTP client whether to send the file as ASCII text or as a binary.
If you are uploading images, multimedia, database data or executable files, you will want to toggle the transfer mode to Binary. This is done simply by issuing the command: binary
Likewise, for all text-based and script files (HTML, PHP, CSS style sheets, etc.) you should issue the command: ascii
ASCII is the default setting, but you can always check which mode is set by using the status command.
Putting Files
The command used to upload a file to a remote directory is put:
put index.html
Uploads the file index.html from your local machine to the remote server if the file exists in your local directory (or if you used the lcd command to change to the local directory where the file lives)
put "c:\websites\index.html"
Uploads the file index.html from a directory other than the current local directory connected to the FTP client
put *
Uploads all files from the current local directory to the present work directory on the remote server
Getting Files
The get command retrieves files from the remote server and places them in your current local directory. It works the same way as the put command. Remember to set the transfer mode before getting files.
get index.html
Downloads the file index.html to your local machine from the remote server
get images/backgrounds/stripes.png
Downloads the file stripes.png from the subdirectory of a subdirectory of the present working directory
get *.png
Downloads all files in the present working directory that have the .png extension
Closing and Quitting
When you have finished with the FTP client, first close the connection to the remote server by issuing the close command.
You can then type quit to exit the FTP client.
===================================
How to extract cpio file ?
for Example the file is abcd.cpio
cpio -icvdu < abcd.cpio
cpio -i (Filename)
cpio -idmv (file_name)
cpio -idcmv (filename)
cpio -Hhpodc -idmv (file_name)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
To display network cards status and define the port {YEMENIA}
Dladm show-dev or dladm show-link
V890 v245
Vi /etc/hosts vi /etc/hosts
10.129.136.1 t4-2 10.129.136.2 v440cl
Vi /etc/hostname.net3 vi /etc/hostname.ce1
T4-2 v440cl
Ifconfig ce1 plumb t4-2 up same
Share {to see shared } mkdir /bkup1
/backa… Mount –F nfs 10.129.136.1:/backa… /bkup1



To solve maintenance problem on meta device
# metastat
d0: Mirror
Submirror 0: d10
State: Needs maintenance
Submirror 1: d20
State: Okay

Use the metareplace(1M) command to re-enable the submirrors.
# metareplace -e d0 c0t3d0s0

The RAID5 metadevice d20 has a slice, c2t0d0s2, which had a soft error. The metareplace command with the -e option enables the slice.
# metareplace -e d20 c2t0d0s2


To check the metadevices
bash-3.2# metastat –p



How Do I Find The Largest Top 10 Files and Directories On a Linux / UNIX / BSD
# du -a /var | sort -n -r | head -n 10
du -hsx * | sort -rh | head -10 (don’t work)
==============
The following example lists files from largest to smallest on the root filesystem:

$ du –h -akd / | sort -nr | more
or

$ du -akd / | sort -nr > /tmp/du.out
delete your mailbox?

$ rm /var/spool/mail/rfestus
OR
echo 'd *' | mail -N


Copy files and directories recursively
To copy all of the files and subdirectories in the current working directory to the directory /target, use:
tar cf - * | ( cd /target; tar xfp -)




LOM to OK Prompt on netra t1

wrote in message news:8182eebc-b08f-4bbd-898b-38d5121d1dab@s19g2000prg.googlegroups.com...

> Hi, After typing the 'console' command at LOM> prompt, it prints a
> message "Stand By", then show LOM> prompt again.
> Besides, your instruction doesn't work on my Netra T1.
> As soon as I typed poweron at LOM> prompt, the system booted up
> automatically.

Try "bootmode forth" which iirc means that when it is rebooted,
it will go to the ok prompt rather than return to the lom.

**********************
sc> Console session already in use. [view mode]

To take console write capability away from another user, type:

sc> console -f


Mounting an Existing ISO CD-ROM Image under Solaris UNIX
If your image name is cd.iso, you can type command:
# lofiadm -a /path/to/cd.iso
Output:
/dev/lofi/1
Please note that the file name argument on lofiadm must be fully qualified and the path must be absolute not relative (thanks to mike for tip).
/dev/lofi/1 is the device, use the same to mount iso image with mount command:
# mount -o ro -F hsfs /dev/lofi/1 /mnt
# cd /mnt
# ls -l
# df -k /mnt
Mount the loopback device as a randomly accessible file system with
mount -F hsfs -o ro /dev/lofi/X /mnt.
Alternatively, use this combined format:
mount -F hsfs -o ro `lofiadm -a /path/to/image.iso` /mnt
Unmount and detach the images
Use umount command to unmount image:
# umount /mnt
Now remove/free block device:
# lofiadm -d /dev/lofi/1
To install Oracle VM Manager from a CD, burn the Oracle VM Manager ISO file to
a CD. Insert and mount the Oracle VM Manager CD using the following
commands:
# mkdir mount-point
# mount /dev/cdrom mount-point


To install Oracle VM Manager from a CD, burn the Oracle VM Manager ISO file to
a CD. Insert and mount the Oracle VM Manager CD using the following
commands:
# mkdir mount-point
# mount /dev/cdrom mount-point
Where mount-point refers to the directory on which you mount the ISO file.

■ To install Oracle VM Manager from a hard drive, locate the folder that contains the
ISO file. Mount the ISO file to an existing directory using the following

commands:
# mkdir mount-point
# mount -o loop OracleVM-Manager-version.iso mount-point
Where mount-point refers to the directory on which you mount the ISO file. For
example:
# mkdir /OVMCD
# mount -o loop OracleVM-Manager-3.0.x.iso /OVMCD (tested ok)
You can find all the mounted files under the directory /OVMCD.
mount -t iso9660 -o loop /home/tecmint/Fedora-18-i386-DVD.iso /mnt/iso/
Note: The location of the mounted Oracle VM Manager ISO file
should be accessible by the oracle user.


********************************************************************
decompress .tar.bz2 file
you'll need to do the extraction in two stages:
bzip2 -d file.tar.bz2
tar xvf file.tar
Tks. I can also do it on the fly;

# bzip2 -d file.tar.bz2;tar xvf -
NetBackup Server (vnb)

On UNIX systems, run the following command:
/usr/openv/netbackup/bin/jnbSA &
The login box appears.
3 Enter the password for root.

Displaying Tape Drive Status
You can use the status option with the mt command to get status information about tape drives. The mt command reports information about any tape drives that are described in the /kernel/drv/st.conf file.
How to Display Tape Drive Status
1. Load a tape into the drive you want information about.
2. Display the tape drive status.
# mt -f /dev/rmt/n status
Example 21-1 Displaying Tape Drive Status
The following example shows the status for a QIC-150 tape drive (/dev/rmt/0):
$ mt -f /dev/rmt/0 status
Archive QIC-150 tape drive:
sense key(0x0)= No Additional Sense residual= 0 retries= 0
file no= 0 block no= 0

Explorer

To install SUNWexplo package, it is not installed by default , please install it from your Solaris DVD
pkgadd –d SUNWexplo

package will be installed at /opt/SUNWexplo

before running it 1st time you will need to do configure SUN explorer

run the explorer first time with the command


/opt/SUNWexplo/bin/explorer –g

It will ask you questions like the system location, address, region and configuration file path and options for adding explorer task to cron or sending it via email.
Just enter the address details etc and skip the rest of options. After that you are ready to collect the explorer data

Execute the explorer /opt/SUNWexplo/bin/explorer (# ./explorer )
******
Run Explorer for Different Modules/Groups
Explorer can be run for the following modules/groups:
• explorer -w all
• # explorer -w !disks
• results in /opt/SUNWexpo/output/
• using ftp to copy .
get /opt/SUNWexplo/output/filename
********************
How to Shut Down a Server
1. Become superuser or assume an equivalent role.
2. Find out if users are logged in to the system.
# who
A list of all logged-in users is displayed. You might want to send mail or broadcast
a message to let users know that the system is being shut down.
3. Shut down the system.
# shutdown -iinit-level -ggrace-period -y
-iinit-level Brings the system to an init level that is different from the default
of S. The choices are 0, 1, 2, 5, and 6.
Run levels 0 and 5 are reserved states for shutting the system
down. Run level 6 reboots the system. Run level 2 is available as
a multi-user operating state.
-ggrace-period Indicates a time (in seconds) before the system is shut down. The
default is 60 seconds.
-y Continues to shut down the system without intervention..

Example — SPARC: Creating a Mirror From root (/)
# metainit -f d11 1 1 c0t3d0s0
d11: Concat/Stripe is setup
# metainit d12 1 1 c1t3d0s0
d12: Concat/Stripe is setup
# metainit d10 -m d11
d10: Mirror is setup
# metaroot d10
# lockfs -fa
# reboot
...
# metattach d10 d12
d10: Submirror d12 is attached
# ls -l /dev/rdsk/c1t3d0s0
lrwxrwxrwx 1 root root 88 Feb 8 15:51 /dev/rdsk/c1t3d0s0 ->

../../devices/iommu@f,e0000000/vme@f,df010000/SUNW,pn@4d,1080000/ipi3sc@0,0/i
d@3,0:a,raw

Example — Creating a Mirror From swap
# metainit -f d11 1 1 c0t0d0s1
d11: Concat/Stripe is setup
# metainit d21 1 1 c1t0d0s1
d21: Concat/Stripe is setup
# metainit d1 -m d11
d1: Mirror is setup
(Edit the /etc/vfstab file so that swap references the mirror)
/dev/dsk/c0t0d0s1 - - swap - no -
should be changed to:
/dev/md/dsk/d1 - - swap - no -
# reboot
...
# metattach d1 d21

How to Recover From a Boot Device Failure


# metadb
flags first blk block count
M p unknown unknown /dev/dsk/c0t3d0s3
M p unknown unknown /dev/dsk/c0t3d0s3
a m p luo 16 1034 /dev/dsk/c0t2d0s3
a p luo 1050 1034 /dev/dsk/c0t2d0s3
a p luo 16 1034 /dev/dsk/c0t1d0s3
a p luo 1050 1034 /dev/dsk/c0t1d0s3
# metadb -d c0t3d0s3
# metadb -c 2 -a c0t3d0s3
# metadb
flags first blk block count
a m p luo 16 1034 /dev/dsk/c0t2d0s3
a p luo 1050 1034 /dev/dsk/c0t2d0s3
a p luo 16 1034 /dev/dsk/c0t1d0s3
a p luo 1050 1034 /dev/dsk/c0t1d0s3
a u 16 1034 /dev/dsk/c0t3d0s3
a u 1050 1034 /dev/dsk/c0t3d0s3

Use the metareplace(1M) command to re-enable the submirrors.

# metareplace -e d0 c0t3d0s0
Device /dev/dsk/c0t3d0s0 is enabled

metareplace -e d1 c0t3d0s1



00000000000000000000000000000000000000000000000000000000

check the new volume of storage in server

On v880
1. check now and see the existing disks
# iostat –En
# luxadm probe
2. Connect the storage and run
# devfsadm
# cfgadm –al
# luxadm probe
888888888888888888888888888888888
Adding a New Directly Attached Printer

Example 5–1 Adding a New Directly Attached Printer by Specifying a PPD File

This example shows how to add a new attached printer with PPD files. Using he -n option with the lpadmin command enables you to add a new print queue by specifying PPD files. The following information is used as an example only.
• Printer name: paper
• Port device: /dev/printers/0
• File content type: postscript
• PPD file: /path/Lexmark-Optra_E312-Postscript.ppd.gz

# lpadmin -p paper -v /dev/printers/0 (1)
# lpadmin -p paper -I postscript (2)
# lpadmin -p paper -m standard_footmatic (3)
# lpadmin -p paper -n /path/Lexmark-Optra_E312-Postscript.ppd.gz(4)
# lpadmin -p paper -D "Color printer on third floor, rm 3003" (5)
# cd /etc/lp/fd

# accept paper
destination “paper” now accepting requests
# enable paper (6)
printer “paper” now enabled
# lpstat -p paper (7)
printer paper is idle. enabled since Feb 28 11:21 2004...
1. Defines the printer name and the port device that the printer will use
2. Sets the file content types to which the printer can print to directly
3. Specifies the interface script for utilizing PPD files
________________________________________
Note –
This command also copies the PPD file to the user label in the user PPD file repository, if /path is not in an existing PPD file repository on the system.
________________________________________
4. Specifies the path to the PPD file and the PPD file name
5. Adds a description for the printer
6. Accepts print requests for the printer and enables the printer
7. Verifies that the printer is ready for printing
999999999999999999999999999999999
CONFIGURING A PRINTER
The host name and IP address of the print server must exist in the local systems /etc/inet/hosts file.


1. Log in as the root user and open two terminal windows. In one of the windows, use the tty command to identify the pseudo-terminal device it uses. Use this device name as the port for the new printer.

# tty


2. In the other terminal window, run the Solaris OS print manager.

# /usr/sbin/printmgr &

change hostname on linux
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=newHostName
vi /etc/hosts
192.168.1.100 newhostname
=========================================
change IP on linux
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=none
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE="Ethernet"
IPADDR=192.168.1.2
PREFIX=24
GATEWAY=192.168.1.1
DEFROUTE=yes
Usig GUI
system-config-network

Bonding

/etc/sysconfig/network-scripts/ifcfg-bond0 { on student guide 1 )

DEVICE=bond0
IPADDR=192.168.1.2
NETMASK=255.255.255.0
=============
DEVICE=bond0 ( Thomas )
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.11.30.0
NETMASK=255.255.255.0
IPADDR=10.11.30.40
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"

#eth0
DEVICE=eth0
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
HWADDR="00:10:E0:69:29:5A"
#eth2
DEVICE=eth2
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
HWADDR="00:10:E0:69:29:5A"


Setup a default Gateway on linux
Open /etc/sysconfig/network file:
# vi /etc/sysconfig/network
Setup GATEWAY={Router-IP}, if router IP is 74.86.49.129, type:
GATEWAY=74.86.49.129
Save and close the file. Here is my complete file:
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=wan.nixcraft.in
GATEWAY=74.86.49.129

Linux
Format the new disk using mkfs.ext3 command
To format Linux partitions using ext2fs on the new disk:
# mkfs.ext3 /dev/sdb1
Step#3 : Mount the new disk using mount command
First create a mount point /disk1 and use mount command to mount /dev/sdb1, enter:
# mkdir /disk1
# mount /dev/sdb1 /disk1
# df –H
99999999999999999999999999
Removing a FRU From a Domain
to get the component status
#cfgadm –a
to disconnect the component from the domain
# cfgadm -c disconnect Ap_Id
to confirm the component is now disconnected
cfgadm –a
Removing and Replacing a FRU
Adding a FRU Into a Domain
# cfgadm -c configure Ap_Id
# cfgadm –a
4.2.4 Verifying Hardware Operation
Note – Note - If the hard disk drive is the boot device, the hard disk will have to be
replaced using cold replacement procedures. However, active replacement can be
used if the boot disk can be isolated from the Solaris OS by disk mirroring software
and other software
0000000000000000000000000000
fmadm repair /SYS/MB
fmadm repair /SYS/PSU1
zip
zip -r myfiles.zip /dir/ ( -r for recursive) option to do entire directory trees at once)

zip syntax is
zip archivefile1 file1 file2 file3
for compression,
unzip archivefile1
for decompression.
To test IO on hard dsik
U can use
mkfile 20g test

upgrade ILOM on x4450 using CLI
2. From the ILOM CLI, use the following command:
load -source tftp://tftpserver/ilom.firmware.ima
where tftpserver is the trivial file-transfer protocol (TFTP) server that contains the update and ilom.firmware.ima is the firmware image file, for example:
ilom.X6220-2.0.3.2-r26980.ima
&&&&&&&&&&&&&
M5000
XSCF>showhardconf
showhardconf [-u]
[-M] Displays text by page.
Displays the number of installed FRUs in the M5000 server
XSCF> showhardconf –u
showstatus - display the degraded Field Replaceable Units (FRUs)

XSCF> showstatus –M
XSCF> showroute xscf#0-lan#0
XSCF> shownetwork –a
XSCF> setnetwork xscf#0-lan#0 -m 255.255.255.0 192.168.10.10
XSCF> shownetwork xscf#0-lan#1
XSCF> setdate -s 2011.05.16-15:46:00

………………………
snapshot - collect and transfer environment, log, error, and FRUID data
snapshot –L F –d usb0 (to collect data to flash on server)(Osama)
to replace FRU
XSCF>replacefru
*****************************
Login to XSCF
snapshot -L F -t root@10.100.1.53:/tmp

where
-L Specifies which set of logs will be collected.
F Full log set.
-t user@host:directory Sets the network host and remote directory for data destination. The host field specifies the host name or IP address of the network host. The user field specifies the user name for the ssh login to the archive host.


*8888888888888888888888888888888
Prepare Acess
chmod 666 /etc/default/login
vi /etc/default/login and hash in front of console
vi /etc/ftpd/ftpusers and hash in front of root
vi /etc/ssh/sshd_config and make PermitRootLogin yes
svcs -a | grep ssh
svcadm restart svc:/network/ssh:default

8888888888888888888888
Enable stms (multparh when using LUNs)
stmsboot -e
==============================================================================


To check Alert log on Database (YFS)
# tail -100 /u01/app/oracle/admin/MXPPROD/bdump/alert_MXPPROD.log
To list the files in reverse order use :
#ls –ltr
=============================
Mount dvd on oracle linux 6
Mount /dev/cdrom /mnt
**************
Network configuration ZFS ( from admin)
caji:> configuration net
caji:configuration net> devices show
caji:configuration net> datalinks show
caji:configuration net> interfaces show
caji:configuration net> routing show


Oracle Shared Shell from ( zfs doc )
Login
To login, perform the following steps:
1. From a web browser, go to: http://oracle.com/123
2. Click the Launch Oracle Shared Shell link. The Shared Shell Login screen appears

&&&&&&&&&&&&&&&&&&&




How to change Default Gateway/Default Router in Sun Solaris
This Default Gateway is maintained in the file
/etc/defaultrouter [IPv4 only
# netstat –rn
Now, remove the existing default gateway;
# route delete default 172.1.1.1
Add the new Default Gateway using:
# route add default 192.168.1.1
7777777777777777777777777777
OVM


The Oracle VM Manager configuration file is located at :

/u01/app/oracle/ovm-manager-3/.config
To display hard disk UUID and typeon linux
#blkid
+++++++++++++
Example 13–3 SPARC: Booting a System for Recovery Purposes (Damaged Password File)

The following example shows how to repair an important system file (in this case, /etc/passwd) after booting from a local CD-ROM.

ok boot cdrom -s
# mount /dev/dsk/c0t3d0s0 /a
# cd /a/etc
# TERM=vt100
# export TERM
# vi passwd
(Remove invalid entry)
# cd /
# umount /a
# init 6

===================

To mount nfs

Mount –F nfs 10.129.136.1:/backap /bkup1
Or in /etc/vfstab add

192.168.10.23:/data - /mnt nfs

To show all Hardware from ILOM

->show -d properties -level all /SYS
hardware info
-> show -level all -output table /SYS type==DIMM (show DIMMS)
-> show -level all -output table /SYS type=='Host Processor' (show CPUs)
-> show -l all /SYS type=='Hard Disk' (show disks)



#dmsg

or

#view /var/adm/messages
OPB command from ILOM
From Oracle ILOM, set the OpenBoot auto-boot? parameter to false.
-> set /HOST/bootmode script="setenv auto-boot? false"
-> set /HOST send_break_action=break
======================
To clear submirror

# metastat d20
d20: Mirror
Submirror 0: d21
State: Okay
Submirror 1: d22
State: Needs maintenance
...
# metadetach -f d20 d22
d20: submirror d22 is detached
# metaclear d22
d22: Concat/Stripe is cleared

===============
editing /etc/vfstab in single user mode
remounting the root file system in read write mode with the below command
#mount -o rw,remount /dev/dsk/c0t0d0s0 /
==============
• On the system that has an inconsistent boot archive, become superuser or assume an equivalent role.
• Boot the failsafe archive.
• On a SPARC based system, type:

# reboot -- "-F failsafe"
• To boot the failsafe archive from the ok prompt, type:

ok boot -F failsafe


Use the metastat command to determine the primary submirror.

# metastat -p
• Mount the primary submirror.
For example:

# mount /dev/dsk/c0t0d0s0 /a
• Temporarily update the /etc/vfstab file to use a single root (/) partition.
a. Make a copy of the original vfstab file.

# cp /a/etc/vfstab /a/etc/vfstab.orig
b. Using a text editor, edit the vfstab file as follows:
a. Comment out the line for the root (/) mirror metadevice.

• In the previous example, the line, /dev/md/dsk/d10, was commented out.
• Add a new line for the disk device of the primary submirror.

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
.
.
.
#/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
.
• To prevent the system from attempting to boot from the metadevice, temporarily update the /etc/system file as follows:
a. Make a copy of the original /etc/system file.

# cp /a/etc/system /a/etc/system.orig
b. Using a text editor, edit the /etc/system file, commenting out the rootdev line. This line is located between the Begin MDD root and the End MDD root lines.

* Begin MDD root info (do not edit)
# rootdev:/pseudo/md@0:0,0,blk
* End MDD root info (do not edit)
c. Save the changes.
d. • Run the command to update the boot archive.

# bootadm update-archive -R /a
e. • Unmount the primary submirror, then reboot the system.

# umount /a
# shutdown -i 6


Example 14–2 SPARC: Manually Updating the Boot Archive on a RAID-1 (Mirror) Volume

This example shows the steps for manually updating the boot archive on a system with an SVM root (/) mirrored metadevice. The system that was used for this example is a SPARC based system running the Solaris 10 10/08 FCS release.

SunOS Release 5.10 Version Generic_137137-09 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
WARNING: Unexpected EOF on line 14 of /kernel/drv/md.conf
Hostname: pilgrim1

WARNING: The following files in / differ from the boot archive:

changed /kernel/drv/md.conf

The recommended action is to reboot to the failsafe archive to correct
the above inconsistency. To accomplish this, on a GRUB-based platform,
reboot and select the "Solaris failsafe" option from the boot menu.
On an OBP-based platform, reboot then type "boot -F failsafe". Then
follow the prompts to update the boot archive. Alternately, to continue
booting at your own risk, you may clear the service by running:
"svcadm clear system/boot-archive"

Sep 18 15:22:06 svc.startd[7]: svc:/system/boot-archive:default:
Method "/lib/svc/method/boot-archive" failed with exit status 95.
Sep 18 15:22:06 svc.startd[7]: system/boot-archive:default
failed fatally: transitioned to maintenance (see 'svcs -xv' for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run

Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode

Sep 18 15:22:18 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
# reboot -- "-F failsafe"
syncing file systems... done
rebooting...
Resetting ...
Rebooting with command: boot -F failsafe
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args: -F failsafe
SunOS Release 5.10 Version Generic_137137-08 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring devices.
Searching for installed OS instances...
/dev/dsk/c0t0d0s0 is under md control, skipping.
/dev/dsk/c1t3d0s0 is under md control, skipping.
No installed OS instance found.

Starting shell.

pilgrim1# metastat -p
d10 -m d0 d1 1
d0 1 1 c0t0d0s0
d1 1 1 c1t3d0s0

# mount /dev/dsk/c0t0d0s0 /a
# cp /a/etc/vfstab /a/etc/vfstab.orig
# vi /a/etc/vfstab

<< input changes to vfstab file, then save changes >>

# cp /a/etc/system /a/etc/system.orig
# vi /a/etc/system

<< input changes to /etc/system file, then save changes >>

# bootadm update-archive -R /a
Creating boot_archive for /a
updating /a/platform/sun4u/boot_archive
15+0 records in
15+0 records out
# umount /a
# shutdown -i 6

<< reboot the system >>

Rebooting with command: boot
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args:
SunOS Release 5.10 Version Generic_137137-08 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
[...]
# metastat -p d10
# metadetach d10 d1
# cp /a/etc/vfstab.orig /a/etc/vfstab
# cp /a/etc/system.orig /a/etc/system
# shutdown -i 6

<< reboot the system >>

Rebooting with command: boot
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args:
SunOS Release 5.10 Version Generic_137137-08 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
[...]
# metattach d10 d1
# metastat | grep 'Resync in progress'
Resync in progress: 4 % done
# metastat | grep 'Resync in progress'

Identifying boot device at OK prompt
ok> printenv boot-device

boot-device = rootdisk mirrordisk

ok> devalias screen /pci@1f,0/SUNW,m64B@13
net /pci@1f,0/network@c,1
cdrom2 /pci@1f,0/ide@d/cdrom@2,0:f
cdrom1 /pci@1f,0/ide@d/cdrom@1,0:f
cdrom /pci@1f,0/ide@d/cdrom@1,0:f
rootdisk /pci@1f,0/ide@d/disk@0,0 -- the physical path to the 'rootdisk' alias
mirrordisk /pci@1f,0/ide@d/disk@3,0 -- the physical path to the 'mirrordisk' alias
disk2 /pci@1f,0/ide@d/disk@2,0
disk1 /pci@1f,0/ide@d/disk@1,0
disk0 /pci@1f,0/ide@d/disk@0,0
Identifying boot device using OS command line
Using the eeprom command
We can also find out the boot device using the operating system commands. Use the eeprom command to find the boot device :
# eeprom | grep boot-device
boot-device=rootdisk mirror-disk
Here, again the primary boot-device is a devalias “rootdisk”, So in order to find out the physical path of the primary boot disk use :
# prtconf -vp | grep 'rootdisk':
rootdisk: '/pci@1f,0/ide@d/disk@0,0'
========================
you can find it this way:

prtconf -vp|grep boot ( for x86)
prtconf -vp|grep bootpath ( for sparc)
================
Netmask in solaris
more/etc/netmasks


https://alnehary.yoo7.com

الرجوع الى أعلى الصفحة  رسالة [صفحة 1 من اصل 1]

صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى