Tuesday, June 27, 2017

Solaris 10 - Fixing missing home directory issue

If your environment has autofs, this solution does not work. Check autofs related config file, your share and try to mount manually. On isolated environment, or LAB environment, if you forget to use -m option, home directory will not be created. To fix the issue, follow the steps below.

Missing home directory issue

When you login, you will see following error,

Could not chdir to home directory /export/home/bishal: No such file or directory

# mkdir /export/home/bishal
# id -a bishal
uid=100(bishal) gid=1(other) groups=1(other)
# cp -r /etc/skel/* /export/home/bishal/
# chown -R bishal:1 /export/home/bishal
# chmod 700 /export/home/bishal
#

Login as a root user directory on solaris 10

# vi /etc/ssh/sshd_conf
PermitRootLogin yes

# svcs -a | grep ssh
online          8:19:33 svc:/network/ssh:default
# svcadm restart  svc:/network/ssh:default
#

Relogin to your server

login as: root
Password:
#

Solaris10 - Installing solaris 10 on Sun T-series server

Login to console on SUN t5120

1. Login to console
$ ssh <IP Addr>

2. Power on the system
-> start /SYS

3. Start the console
-> start /SP/console

{0} ok

4. To exit off the console type #.

5. To login to console
-> start /SP/console

6. Once you are on OK prompt, insert the OS CD and boot the system to Install the operating system
{0} ok boot cdrom


Select following options at the prompt
7. Language selection:
Please make a choice (0 - 10), or press h or ? for help: 0
0 for english

8. What type of terminal are you using?  [ we will be using 6) PC Console ]

Type the number of your choice and press Return: 6


9. Press f2 to continue [ Esc-2_Continue ]

10. On Identify This System  windows, press Esc-2_continue

11. on ' Network Connectivity' select the box next to Networked [x]

12. on  Configure Multiple Network Interfaces, select the first instance of the interface since we plug the network cable on that port
Note: to select, go to partucular port and press space bar to select.

13. on DHCP for e1000g0 screen, Use DHCP for e1000g0, select No option

specify the ip address on next screen.

14. on  Subnet for e1000g0 screen, select yes and continue

15. on Netmask for e1000g0  screen, specify your subnet: 255.255.255.0

on IPv6, just select no and continue

16.  on Set the Default Route for e1000g0 screen, just select [X] Detect one upon reboot or you can specify one. for our case 192.168.10.1

17, on ' Confirm Information for e1000g0 ' screen, verify the information and make sure they are correct

18. Esc+2 to continue

19. on ' Configure Security Policy' windows, just select No and ocntinue

20. on  Confirm Information screen, verify the info and continue

21. on ' Name Service' screen, select the one, based on your environment. In our case, we are not using any name service so we will select None. and continue

22. Confirm the info and continue.

23. on  NFSv4 Domain Name - select Use the NFSv4 domain derived by the system and continue

24. On ' Time Zone ' windows, specify the time zone.
    - in our case, select second box, press Esc+2 to continue
    - select the first option: United States and continue
    - Select first option Eastern time and continue
    - next screen on 'Date and Time' windows, just press Esc+2 to continue
    - Next page on 'Confirm Information' page, you verify the info. if you find wrong info, press Esc+4 to change.

25. On ' Root Password' window, specify your root password. and continue by pressing Esc +2

26. on 'Enabling remote services' windows, select no, and continue

27. on 'Provide Oracle Configuration Manager Registration Information' windows, press Esc+2 to continue.

28. Press Esc+2 to continue again.

until now, System identification is completed.

Installation process beginds now.

29. On 'Solaris Interactive Installation' windows, press F2_Standard for standrd installation, and F4_Flash for flash archive installation (from Gold Image). We will select standard installation

30. on 'iSCSI Installation' window, select  Install on non-iSCSI target


eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
Listening on LPF/eth0/00:21:28:24:41:ed
Sending on   LPF/eth0/00:21:28:24:41:ed
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
eth0: status: link up.
eth0: status: link up, 100 Mbps Full Duplex, auto-negotiation complete.
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 192.168.10.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.10.1
bound to 192.168.10.36 -- renewal in 43004 seconds.
done.


Solaris 10 software installation succeeded

Customizing system files
        - Mount points table (/etc/vfstab)
        - Network host addresses (/etc/hosts)
        - Environment variables (/etc/default/init)

Cleaning devices

Customizing system devices
        - Physical devices (/devices)
        - Logical devices (/dev)

Installing boot information
        - Installing boot blocks (c1t0d0s0)
        - Installing boot blocks (/dev/rdsk/c1t0d0s0)
        - Updating system firmware for automatic rebooting
        - Given Disk (/dev/dsk/c1t0d0s0) is not a iSCSI Disk



Installation log location
        - /a/var/sadm/system/logs/install_log (before reboot)
        - /var/sadm/system/logs/install_log (after reboot)

Installation complete
Executing SolStart postinstall phase...
Executing finish script "patch_finish"...


Finish script patch_finish execution completed.
Executing JumpStart postinstall phase...

The begin script log 'begin.log'
is located in /var/sadm/system/logs after reboot.

The finish script log 'finish.log'
is located in /var/sadm/system/logs after reboot.


Launching installer. Please Wait...



Installing Additional Software
|-1%--------------25%-----------------50%-----------------75%--------------100%|

   Pausing for 30 seconds at the "Summary" screen. The wizard will continue to
   the next step unless you select "Pause". Enter 'p' to pause. Enter 'c' to
   continue. [c]


Installing Additional Software
|-1%--------------25%-----------------50%-----------------75%--------------100%|

   Pausing for 30 seconds at the "Summary" screen. The wizard will continue to
   the next step unless you select "Pause". Enter 'p' to pause. Enter 'c' to
   continue. [c] c


   Pausing for 90 seconds at the "Reboot" screen. The wizard will continue to
   the next step unless you select "Pause". Enter 'p' to pause. Enter 'c' to
   continue. [c]

Creating boot_archive for /a
updating /a/platform/sun4v/boot_archive


syncing file systems... done
rebooting...
Resetting...
ChassisSerialNumber BEL0902U3E


SPARC Enterprise T5120, No Keyboard
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.6.f, 32640 MB memory available, Serial #86262244.
Ethernet address 0:21:28:24:41:e4, Host ID: 852441e4.

Friday, June 23, 2017

Linux - Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting

Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting

To increase the size of your VMware Virtual Machine, you need
1. Increase the disk's size in your vSphere Client or through the CLI. to increase the "hardware" disk
2. Then, use  partition option to extend it.


Increase from 3GB to 10 Gb

1) Checking if you can extend the current disk or need to add a new one

Note: If disk is already partitioned in 4 primary partitions, you can not extend it. Check with fdisk -l command


# fdisk -l

/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26        2636    20972857+  8e  Linux LVM

we saw two partitions, you can extent current disk in a virtual machine.
if you have 4 parititon, you have to add new virtual disk to your system.


2) The "hardware" part, "physically" adding diskspace to your VM

- login to your VMware, go to edit setting of VM
- Highlight the disk you want to expand and change the size.
- If the size section is greyed out, shutdown your VM.
Note: you have snapshot taken of that VM, remove it.
- Reboot  your system, if you have complated without reboot, you have to rescan the scsi device.
# ls -l /sys/class/scsi_device


you should have a disk with update disk geometry.



Source - online
















Solaris 11 - Migration of Solaris 10 LDOM oracle database server to Solaris11

Solaris 11 - Migration of Solaris 10 LDOM oracle database server to Solaris11


Prerequisites tasks

For Oracle database on Solaris 11 gold server, install following packages.

# pkg publisher
# pkginfo -l SUNWcsl
# pkg info -r motif
# pkg list | grep -i motif
# pkg install library/motif
# pkg list | grep -i xwplt
# pkg info -r xwplt
# pkg info -r SUNWxwplt
# pkg install compatibility/packages/SUNWxwplt
# pkg install compatibility/ucb


Build LDOM

1. Create domain
# ldm add-domain my_ldm-v01
# ldm list

2. Add CPU/Memory/Network info
a. Add CPU/Mem
# ldm add-vcpu 2 my_ldm-v01
# ldm add-memory 2g my_ldm-v01
# ldm list | grep sol11
b. Add network info. since its IPMP, you need to add two NIC,
Get source LDOM network info, and match it to destination
# ldm list-bindings my_ldm-v01
    vnet0            primary-vsw2@primary 
    vnet1            primary-vsw3@primary 

# ldm add-vnet link-prop=phys-state vnet0 primary-vsw0 <ldom>
# ldm add-vnet linkprop=phys-state vnet0 primary-vsw0 my_ldm-v01
# ldm add-vnet linkprop=phys-state vnet1 primary-vsw1 my_ldm-v01
# ldm list-bindings my_ldm-v01
# ldm list | more

3. Assign Disk space

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note from storage team:

From Solaris 11 Goldsrv  SOL-MG-P01 (VM: sol-11-goldsrv    LUN 35/ID:  31D)    present to     
SOL-MG-P02 (VM:  my_ldm_v02-sol_11) LUN 48/ID: 035e



1.  From Compellant Control Center, under SOL-MG-P02, create the following VM Folders:
       my_ldm_v03-sol_11
       my_ldm_v02-sol_11

2.  Create the following LUN COPY (not Replay):
      From Solaris 11 Goldsrv  SOL-MG-P01 (VM: sol-11-goldsrv    LUN 35/ID:  31D)    present to      SOL-MG-P02 (VM:  my_ldm_v03-sol_11)  LUN

47/ID:035d
      From Solaris 11 Goldsrv  SOL-MG-P01 (VM: sol-11-goldsrv    LUN 35/ID:  31D)    present to      SOL-MG-P02 (VM:  my_ldm_v02-sol_11) LUN

48/ID: 035e

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


a. Scan the LUNS
# cfgadm -al
# cfgadm -al -o show_FCP_dev
b. Find LUN Number
# luxadm display /dev/rdsk/c3t6000D310006D640000000000000001FFd0s2
Look under    
Device Address              5000d310006d6431,1c
here, for eg, 1c is the hex number, you have to conver it to DEC, use programmer calculator to change.
to convert 1c to dec it is 28.

# echo | format | egrep "0356|0357"
# ldm add-vdsdev /dev/dsk/c0t6000D310006D64000000000000000356d0s2 DL42@primary-vds0
# ldm add-vdsdev /dev/dsk/c0t6000D310006D64000000000000000357d0s2 DL43@primary-vds0
# ldm add-vdisk VDL42 DL42@primary-vds0 my_ldm_v04_sol11
# ldm add-vdisk VDL43 DL43@primary-vds0 my_ldm-v01
# ldm list-bindings my_ldm_v04_sol11
# ldm list-bindings my_ldm-v01
# ldm list-bindings my_ldm_v04_sol11
# ldm list

4. Set auto boot to false so that system does not boot upon power on.
# ldm set-variable auto-boot\?=false my_ldm-v01
# ldm set-variable auto-boot\?=false my_ldm_v04_sol11

5. Bind and start LDOM
# ldm list
# ldm bind my_ldm_v04_sol11
# ldm start my_ldm_v04_sol11
LDom my_ldm_v04_sol11 started
# ldm start my_ldm-v01


6. List detail about Solaris 11 LDOM
# ldm list-bindings my_ldm-v01 | more

7. List detail about SOlaris 10 server LDOM
# ldm list-bindings my_ldm_v05 | more

8. Connect to the console
# telnet 0 5013
{0} ok boot -s

Enter user name for system maintenance (control-d to bypass):

root@sol-11-goldsrv:~# ifconfig -a
ipmp0: flags=10c001000842<BROADCAST,RUNNING,MULTICAST,IPv4,DUPLICATE,IPMP,PHYSRUNNING> mtu 1500 index 2
        inet 192.168.10.66 netmask ffffff80 broadcast 192.168.10.127
        groupname ipmp0
net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 3
net1: flags=100061000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY,INACTIVE,PHYSRUNNING> mtu 1500 index 4


9. change the following info based on your new env for initial set up of ip/hostname and run it
root@sol-11-goldsrv:/var/tmp/initial-setup# vi setup.sh

ENCLAVE=<dev>
HOSTNAME=<sol-11-goldsrv>
DOMAIN=<expanor.dev>
IP_ADDRESS=<192.168.10.69>

root@sol-11-goldsrv:/var/tmp/initial-setup# export EDITOR=vi
root@sol-11-goldsrv:/var/tmp/initial-setup# export TERM=vt100
root@sol-11-goldsrv:/var/tmp/initial-setup# sh setup.sh


root@sol-11-goldsrv:/var/tmp/initial-setup# svcs -a | grep network/physical
online          9:53:04 svc:/network/physical:upgrade
online          9:54:13 svc:/network/physical:default


root@sol-11-goldsrv:/var/tmp/CAC# ifconfig -a

ipmp0: flags=108001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP,PHYSRUNNING> mtu 1500 index 2
        inet 192.168.10.69 netmask ffffff80 broadcast 192.168.10.127
        groupname ipmp0
net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 3
net1: flags=100061000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY,INACTIVE,PHYSRUNNING> mtu 1500 index 4

Verify hostname/ipaddress of the output.
root@sol-11-goldsrv:/var/tmp/CAC/DEV# svcprop identity:node | more


10. Change role into user.

root@sol-11-goldsrv:/var/tmp/CAC/DEV# usermod -R "" jay
root@sol-11-goldsrv:/var/tmp/CAC/DEV# usermod -R "" sam
root@sol-11-goldsrv:/var/tmp/CAC/DEV# rolemod -K type=normal root


11. Now, reboot the machine and login to server using new IP and set up LDAP-CAC
my_ldm_v04 console login:
root@sol-11-goldsrv:/var/tmp/CAC/DEV# reboot
root@sol-11-goldsrv:/# cd /var/tmp/CACDEV/
root@sol-11-goldsrv:/var/tmp/CAC/DEV# sh ldap_inst_dev.sh



12. Go to source server, review cat /etc/ passwd, shadow and group and copy all the user entry related to database/application account.

# egrep "gridmon|iascan|oinstall|oracle" /etc/passwd
# egrep "gridmon|iascan|oinstall|oracle" /etc/shadow
# for i in gridmon iascan oinstall oracle;  do id -a $i; done
# egrep "102|501|503" /etc/group


13. Copy the content of /export/home directory and also /var/opt/oracle
a. Enable direct root login to destination host
# vi /usr/local/ssh6.6p1/etc/sshd_config
PermitRootLogin Yes

b. And restart the service
# /etc/init.d/ssh stop/start



14. Copy important files/directories (/home dir /var/opt/oracle) from source, and update to destination server.
A. Copy from source server
a. Copy directly (use tar and scp without saving on source host

# cd /var/opt
# tar cfE - oracle | ssh root@192.168.10.69 "( cd /var/opt; tar xfBp - )"
# cd /export/home
# tar cfE - gridmon oradev oinstall | ssh root@192.168.10.69 "( cd /export/home; tar xfBp - )"


b. Tar the content at /var/tmp and use scp to copy
# cd /export/home/; du -sh gridmon iascan oinstall oracle
# tar -cvf /var/tmp/home_dir.tar gridmon iascan oinstall oracle
# cd /var/opt;# du -sh *
# tar -cvf /var/tmp/var_opt_oracle.tar oracle
# ls -lh /var/tmp/var_opt_oracle.tar /var/tmp/home_dir.tar
# cd /var/tmp; scp var_opt_oracle.tar home_dir.tar sam@192.168.10.69:/var/tmp


B. Update destination server if needed

root@my_ldm_v04:~# vi /etc/passwd
root@my_ldm_v04:~# vi /etc/passwd
root@my_ldm_v04:~# vi /etc/shadow
root@my_ldm_v04:~#
root@my_ldm_v04:~# vi /etc/group
root@my_ldm_v04:~#

# tar -tvf /var/tmp/home_dir.tar | more
# cd /export/home/; tar -xvf /var/tmp/home_dir.tar
# cd /var/opt; tar -xvf /var/tmp/var_opt_oracle.tar
# cd oracle; ls
# df -h

verify user env,
# su - oinstall
[oinstall@my_ldm_v04]>env


15. Update sudoers file
# visudo

make sure you verify source/destination file content.


16. Update vfstab, system, and projects file
# vi /etc/vfstab
make sure you verify source/destination file content.



root@my_ldm_v04:~# cat /etc/system

Review/change your zfs arc size.

set zfs:zfs_arc_max=2147483648
set zfs:zfs_arc_min=67108864
* Setting max file descriptors
set rlim_fd_max=65536
set rlim_fd_cur=1024
* To prevent buffer overflow
* set noexec_user_stack = 1
* set noexec_user_stack_log = 1
* Enable BSM Auditing
set c2audit:audit_load = 1
* Monitor for unauthorized connections of mobile devices
exclude: scsa2usb


Review oracle sga size and update your project file. (GB in size?)
# projects -l

user.oinstall
        projid : 101
        comment: ""
        users  : oinstall
        groups : oinstall
                 dba
        attribs: process.max-sem-nsems=(priv,810,deny)
                 project.max-sem-ids=(priv,512,deny)
                 project.max-shm-ids=(priv,512,deny)
                 project.max-shm-memory=(priv,4294967296,deny)
oracle
        projid : 220
        comment: ""
        users  : oinstall
                 oracle
        groups : oinstall
                 dba
        attribs: process.max-sem-nsems=(priv,256,deny)
                 project.max-sem-ids=(priv,100,deny)
                 project.max-shm-ids=(priv,100,deny)
                 project.max-shm-memory=(priv,4294967296,deny)
root@my_ldm_v04:~#



17. refresh nfs/client
# svcadm enable -r nfs/client


18. Now, time to shutdown source system. stop the source LDOM.
Login to console on destination host and change the IP address info

root@SOL-MG-P02 # ldm stop my_ldm_v05
root@SOL-MG-P02 # ldm stop my_ldm_v04
root@SOL-MG-P02 # ldm unbind my_ldm_v05
root@SOL-MG-P02 # ldm unbind my_ldm_v04

# telnet 0 5014
a. Review existing IP/host info
# ifconfig -a | more
ipmp0: flags=108001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP,PHYSRUNNING> mtu 1500 index 2
        inet 192.168.10.69 netmask ffffff80 broadcast 192.168.10.127
        groupname ipmp0
net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 3
net1: flags=100061000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY,INACTIVE,PHYSRUNNING> mtu 1500 index 4

# ipadm show-addr
b. Remove old IPMP setting
# ipadm delete-addr ipmp0/v4

c. Assign new IP
# ipadm create-addr -T static -a  192.168.10.33 ipmp0
# svccfg -s identity:node setprop private_data/mapped_addresses=192.168.10.33
# svcadm refresh identity:node
# svcadm restart identity:node
# svcprop identity:node | more

19. Login to control domain and set CPU/MEM
Note: change CPU/Mem while on multi user mode or on power off state.

a. Change CPU/Mem info
root@SOL-MG-P02 # ldm set-vcpu 16 my_ldm_v04_sol11
root@SOL-MG-P02 # ldm set-mem 10G my_ldm_v04_sol11

root@SOL-MG-P02 # ldm set-mem 8G my_ldm-v01
root@SOL-MG-P02 # ldm set-vcpu 16 my_ldm-v01

b. if you are at OK prompt, stop the LDOM and allocate resources.
root@SOL-MG-P02 # ldm stop my_ldm-v01
root@SOL-MG-P02 # ldm set-mem 8G my_ldm-v01


root@SOL-MG-P02 # ldm set-mem 8G my_ldm-v01
root@SOL-MG-P02 # ldm set-vcpu 16 my_ldm-v01
root@SOL-MG-P02 #



20. If you are on multiuser mode, reboot your system.
# init 5 or reboot

or

if your VM is powered off, Power on your VM and boot the system and login to console

root@SOL-MG-P02 # ldm start my_ldm-v01
root@SOL-MG-P02 # ldm start my_ldm-v01

Login to console
# telnet 0 5014

{0} ok boot


Once you login, check logs, filesystem and login using CAC

root@SOL-MG-P02 # ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  UART    8     8G       1.2%  48d 23h 24m
my_ldm-v01        bound      ------  5013    16    8G
my_ldm_v04_sol11   active     -n----  5014    16    10G      0.1%  1d 7h 3m
my_ldm_v02       active     -n----  5010    32    16G      0.2%  48d 23h 19m
my_ldm_v03       active     -n----  5001    16    8G       1.7%  48d 23h 19m
my_ldm_v05       inactive   ------          16    8G
my_ldm_v04       inactive   ------          16    10


To change IP Address:

# Delete OLD IP Address
echo "Deleting old IP Address" && sleep 1; IPADDROBJ=`ipadm show-addr | sed -n '/^ipmp*/p' | awk '{print $1}'` ipadm delete-addr "$IPADDROBJ"

# Assigning NEW IP Address
echo "Assigning New IP Address" && sleep 1; ipadm create-addr -T static -a "$IP_ADDRESS" ipmp0

Update IP Address in SMF:
svccfg -s identity:node setprop private_data/mapped_addresses=192.168.10.41
svcadm refresh identity:node
svcadm restart identity:node

**don't forget to copy over /var/opt/oracle

**don't forget NFS entries
SOL-MG-P01:/repository - /repository nfs - yes rw,soft 192.168.10.16:/backup - /BACKUP nfs - yes

hard,rw,rsize=32768,wsize=32768,suid,proto=tcp,vers=3

** don't forget to update /etc/hosts,  add #repo entry as well # Repo
192.168.10.11   SOL-MG-P01.expanor.dev    SOL-MG-P01




root@my_ldm_v04:/data#  svcs -a | grep rad
disabled       20:11:26 svc:/system/device/mpxio-upgrade:default
disabled       20:11:29 svc:/network/inetd-upgrade:default
disabled       20:11:29 svc:/system/device/policy-upgrade:default
disabled       20:11:36 svc:/system/rad:remote
online         20:11:30 svc:/network/connectx/unified-driver-post-upgrade:default
online         20:11:31 svc:/system/name-service/upgrade:default
online         20:11:36 svc:/network/eoib/eoib-post-upgrade:default
online         20:11:44 svc:/system/logadm-upgrade:default
online         20:11:45 svc:/system/rad:local
online         20:11:45 svc:/system/rad:local-http
online         20:11:46 svc:/network/physical:upgrade
online         20:11:46 svc:/network/location:upgrade
root@my_ldm_v04:/data# svcadm disable svc:/system/rad:local
root@my_ldm_v04:/data# svcadm disable svc:/system/rad:local-http
root@my_ldm_v04:/data#


root@my_ldm_v04:~#  svcs -a | grep -i rad
disabled       Jun_19   svc:/system/device/mpxio-upgrade:default
disabled       Jun_19   svc:/network/inetd-upgrade:default
disabled       Jun_19   svc:/system/device/policy-upgrade:default
disabled       Jun_19   svc:/system/rad:remote
online         Jun_19   svc:/network/connectx/unified-driver-post-upgrade:default
online         Jun_19   svc:/system/name-service/upgrade:default
online         Jun_19   svc:/network/eoib/eoib-post-upgrade:default
online         Jun_19   svc:/system/rad:local-http
online         Jun_19   svc:/system/rad:local
online         Jun_19   svc:/system/logadm-upgrade:default
online         Jun_19   svc:/network/physical:upgrade
online         Jun_19   svc:/network/location:upgrade
root@my_ldm_v04:~#



#  passwd root
#  passwd sam
#  chmod 700 /export/home/*
#  for i in `ls /export/home/*/.bash_history`; do ls -l $i; done
#  for i in `ls /export/home/*/.bash_history`; do cat /dev/null > $i; done
#  for i in `ls /export/home/*/.bash_history`; do ls -l $i; done
#  for i in `ls /export/home/*/.profile /export/home/*/.bash_profile`; do echo "export HISTCONTROL=ignorespace" >> $i; done
#  for i in `ls /export/home/*/.profile /export/home/*/.bash_profile`; do grep HISTCONTROL $i; done
#  ls -ld /export/home/*
#  svcs -a | grep -i mile
#  uname -a

Sunday, June 11, 2017

Solaris 10 - Installing OS on Sun SPARC T5120 server

Login to console on SUN t5120

1. Login to console
$ ssh <IP Addr>

2. Power on the system
-> start /SYS

3. Start the console
-> start /SP/console

{0} ok

4. To exit off the console type #.

5. To login to console
-> start /SP/console

6. Once you are on OK prompt, insert the OS CD and boot the system to Install the operating system
{0} ok boot cdrom


Select following options at the prompt
7. Language selection:
Please make a choice (0 - 10), or press h or ? for help: 0
0 for english

8. What type of terminal are you using?  [ we will be using 6) PC Console ]

Type the number of your choice and press Return: 6


9. Press f2 to continue [ Esc-2_Continue ]

10. On Identify This System  windows, press Esc-2_continue

11. on ' Network Connectivity' select the box next to Networked [x]

12. on  Configure Multiple Network Interfaces, select the first instance of the interface since we plug the network cable on that port
Note: to select, go to partucular port and press space bar to select.

13. on DHCP for e1000g0 screen, Use DHCP for e1000g0, select No option

specify the ip address on next screen.

14. on  Subnet for e1000g0 screen, select yes and continue

15. on Netmask for e1000g0  screen, specify your subnet: 255.255.255.0

on IPv6, just select no and continue

16.  on Set the Default Route for e1000g0 screen, just select [X] Detect one upon reboot or you can specify one. for our case 192.168.10.1

17, on ' Confirm Information for e1000g0 ' screen, verify the information and make sure they are correct

18. Esc+2 to continue

19. on ' Configure Security Policy' windows, just select No and ocntinue

20. on  Confirm Information screen, verify the info and continue

21. on ' Name Service' screen, select the one, based on your environment. In our case, we are not using any name service so we will select None. and continue

22. Confirm the info and continue.

23. on  NFSv4 Domain Name - select Use the NFSv4 domain derived by the system and continue

24. On ' Time Zone ' windows, specify the time zone.
    - in our case, select second box, press Esc+2 to continue
    - select the first option: United States and continue
    - Select first option Eastern time and continue
    - next screen on 'Date and Time' windows, just press Esc+2 to continue
    - Next page on 'Confirm Information' page, you verify the info. if you find wrong info, press Esc+4 to change.

25. On ' Root Password' window, specify your root password. and continue by pressing Esc +2

26. on 'Enabling remote services' windows, select no, and continue

27. on 'Provide Oracle Configuration Manager Registration Information' windows, press Esc+2 to continue.

28. Press Esc+2 to continue again.

until now, System identification is completed.

Installation process beginds now.

29. On 'Solaris Interactive Installation' windows, press F2_Standard for standrd installation, and F4_Flash for flash archive installation (from Gold Image). We will select standard installation

30. on 'iSCSI Installation' window, select  Install on non-iSCSI target




^^^^^^^^^^^^^^^^^^^^^^^^^




The output of console while login through serial console.

eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
Listening on LPF/eth0/00:21:28:24:41:ed
Sending on   LPF/eth0/00:21:28:24:41:ed
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
eth0: status: link up.
eth0: status: link up, 100 Mbps Full Duplex, auto-negotiation complete.
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 192.168.10.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.10.1
bound to 192.168.10.36 -- renewal in 43004 seconds.
done.





Friday, June 9, 2017

Solaris 10 - changing role to user - login issue




sudo_solaris_install_user_cant sudo_after changing to normal user



remove the user id from file

root@sol-11-goldsrv:/etc/sudoers.d# pwd
/etc/sudoers.d
root@sol-11-goldsrv:/etc/sudoers.d# ls -l
total 1
-r--r-----   1 root     root           0 Dec  6 11:16 svc-system-config-user
root@sol-11-goldsrv:/etc/sudoers.d#


Solaris 10 - Rename hostname of LDOM

Solaris 10 - Rename hostname of LDOM