Skip to main content

Posts

Showing posts from March, 2020

Renaming a file system Mount Point

1. To check  if any use is currently active on the partition to be renamed. fuser -cu /oem10g 2.unmount the file system umount -f /oem10g 3.Confirm whether the file system is unmounted and not used by anyone df -gI 4.Create a new mount point mkdir oem10g-new 5.Change the attribute of file system using below command: chfs -m /oem10g-new  /oem10g 6.Mount the file system  mount /oem10g-new 7.Confirm whether the file system is mounted  df -gI

Solaris IPS Vocabulary in brief

1. Manifest : describes an IPS package 2. Repository : location either local or remote where packages are stored. The location is specified by Universal Resource Identifier (URI) 3. Publisher : Person or organisation that provides the packages. 4. Image : Location where IPS package can be installed. 5. Catalog : Lists all the packages in a repository 6. Package archive : File containing publisher information and packages provided by the publisher 7. Boot environment : Bootable instance of an Image 9. Origin : Repository with both package metadata and package content. 10. Mirror : Repository that contains only package content. Similar to a download mirror to a file on the Internet. A secondary repository you may say. For more Details :  Visit here

NTP Sync In Solaris

For Solaris 5.11: a) Create the /etc/inet/ntp.conf           $ cat ntp.conf             server 10.xx.x.xx       prefer b) Start the NTP Service.           # svcadm disable ntp           # svcadm enable ntp c) ntpq -p  ntpdate -q 10.xx.x.xx to (check time difference). For more info please refer: Visit here 2 . For Solaris 5.10:    a) Create the /etc/inet/ntp.conf           $ cat ntp.conf             server 10.xx.x.xx       prefer    b) Start the NTP Service.           # svcadm disable svc:/network/ntp:default           # svcadm enable svc:/network/ntp:default    c) ntpq -p  /usr/sbin/ntpdate -q 10.xx.x.xx to (check time difference). 3. For Solaris 5.9:  ...

Solaris Zone Migration with no Downtime

Step 1:  Export zone to be migrated  zonecfg -z  zonename export -f /abc Step 2:  modify the zone config according to next/destination server  Step 3:  Take tar /cpio backup of zonepath tar cvf zone.tar /zone/zonename step 4:  do scp or tapebackup and restore the zone data on destination server step 5:  zonecfg -z zonename -f zone-config-file_from_old_server zoneadm -z zonename boot

Cloning a Zone in Solaris

Step1: export zone config  zonecfg -z webzone-1 export -f /zones/webzone-2-profile Step 2: modify template   vi /zones/webzone-2-profile create -b set zonepath=/zones/webzone-2 set brand=solaris set autoboot=true set ip-type=exclusive add anet set linkname=net0 set lower-link=auto set configure-allowed-address=false set link-protection=mac-nospoof set mac-address=random set auto-mac-address=2:8x:2:xx:xx:xx end Step 3: configure new zone zonecfg -z webzone-2 -f /zones/webzone-2-profile Step 4: Create a zone template sysconfig create-profile -o /zones/webzone-2-template.xml step5: clone the existing zone for all software configs zoneadm -z webzone-2 clone -c /zones/webzone-2-template.xml webzone-1''

NFS Enabling & Sharing

First verify  if  nfs packages are installed and service is running. pkg info | grep -i nfs Step 1:  zfs set share=name=fs1,path=/fs1,prot=nfs mypool/fs1 Step 2: zfs set sharenfs=on mypool/fs1 Solaris 10 Way of Doing the Same vi /etc/dfs/sharetab # share -F nfs /fs1 # cat /etc/dfs/sharetab /fs1       -       nfs     rw Save and exit the file. Get Share information zfs get all mypool/fs1 | grep nfs # zfs get sharenfs mypool/fs1 NAME           PROPERTY    VALUE     SOURCE mypool/fs1   sharenfs    on        local # zfs get share mypool/fs1 NAME          PROPERTY  VALUE                                  SOURCE mypool/fs1  share     name=mypool_fs1,path=/fs1,prot=nfs   l...

Solaris Zone Memory Increase

Back up the existing zone configuration >>cp -p /etc/zones/<zonename>.xml /etc/zones/<zonename_date>.xml >>zonecfg -z <zonename> info >>zlogin <zonename> prtconf -vp | grep Memory >>zoneadm -z <zonename> halt >>zonecfg -z <zonename> >>     select capped-memory >>         info >>        set physical=current+required >>        info >>     end >>  verify >>  commit >>  exit Check the increased memory using command >>zonecfg -z <zonename> info   

Ldom Ram Upgrade

To upgrade Ram on the logical domain we first login to the base-machine/Controller Domain. Calculate the total memory >>prtdiag -v |more Save the existing configuration as backup/rollback plan >>ldm add-config config-name To check for the backed up configuration >>ldm list-config >>ldm add-memory 8G Ldom-name The above command will increase the existing  Ram by 8Gb. Save the new configuration as backup/rollback plan >>ldm add-config new-config-name Just to make sure that the configuration was backed up >>ldm list-config And that’s it!

ZFS Partition Creation

Login to Controller Domain >>ldm list >>telnet 0 5000 >>echo |format >>echo |format |grep -I 60050768XXXXXXXXXXXXXXXX     where 60050768XXXXXXXXXXXXXXXX is the LUN ID     If present then format and label the same >>format 60050768XXXXXXXXXXXXXXXX      type la and then y , then quit by typing q If not present then check for fabric devices >>cfgadm -al  >>cfgadm -c configure c5       and so on >>devfsadm -Cv >>echo |format |grep -I   60050768XXXXXXXXXXXXXXXX  Label the disk >>format 60050768XXXXXXXXXXXXXXXX  >>ldm list-services >>ldm add-vds new-vds >>ldm add-vdsdev /dev/rdsk/60050768XXXXXXXXXXXXXXXX_disk1@newvds >>ldm list-services >>ldm add-vdisk disk1 disk1@newvds Ldom-name >>ldm list-services >>ldm add-config config_name Login to the LDOM   Che...

Root Password Recovery Solaris 10

root@Base-Machine:~# ldm list NAME             STATE     FLAGS   CONS    VCPU  MEMORY   UTIL   UPTIME primary            active     -n-cv-     UART     8          82432M     0.3%     95d solaris-LD01    active     -n----      5000      62         62G           0.0%     6m solaris-LD02    active     -n----      5001      62         62G           0.0%     1m root@IBase-Machine::~# ldm set-variable auto-boot?=False solaris-LD02 root@Base-Machine::~# ldm list-variable  solaris-LD02 auto-boot?=False keyboard-l...

Root Password Recovery Solaris 11

1. Set the auto-boot options to false.  ldm set-variable auto-boot\?=false Ldom-name 2. To check the disk resources attached to your ldm  ldm list -o disk Ldom-name 3. Check for any existing services on Primary/IO Domain  ldm list-services primary 4. You can use the existing one , if any or else create a new one. l dm add-vds primary-cdrom primary 5. Add a vdsdev to the service created in step 4 l dm add-vdsdev options=ro  /tmp/sol-11_2-text-sparc.iso  cdrom01@primary-cdrom where ro=read-only /tmp/sol-11_2-text-sparc.iso = path of The Solaris 11 iso image   6. Add a virtual disk to the vdsdev created in step 5 l dm add-vdisk cdrom cdrom01@primary-cdrom Ldom-name 7. From the primary domain break into the ldom whose password is to be recovered telnet 0 500x (ldm port number) Trying 0.0.0.0.. Connected to 0 Escape character is '^]' telnet> send break c)ontinue, s)ync, r)eset? Enter r Resetting.. NOTICE: ...

Solaris 11 IP configuration after Passing Vlan on Base Machine and Ldom

To check which Vlan is passed (Physical/Base-Machine) ldm list-services  ldm list-bindings ldom-name To pass Vlan On base machine(aggregation) ldm set-vsw vid=343,75,800,801,74,55 primary-aggr0 ldm set-vsw vid=343,75,800,801,74,55 primary-aggr1 To pass Vlan On Ldom ldm set-vnet  pvid=55 vnet0 ldom-name ldm set-vnet  pvid=55 vnet1 ldom-name  root@:~# ldm list -o network ldom-name Create New interfaces on which  IP is to be configured (On Ldom) root@::~# ipadm create-ip net0 root@::~# ipadm create-ip net1 root@::~# ipadm create-ipmp ipmp0 Add the two interfaces to ipmp group root@:: # ipadm add-ipmp -i net0 -i net1 ipmp0 Configure  IP root@:: # ipadm create-addr -T static -a local=10.16.240.107/24 ipmp0/v4 Add Gateway route add default 10.24.188.5

Solaris Boot Process

The boot process in solaris comprises of mainly five stages 1.   Boot PROM Phase :  The boot PROM runs the (POST) Power On Self Test     to test the hardware like Ram, Keyboard , Cpu ,Ethernet Adress and Host Id       etc. Boot PROM reads the primary   boot program Bootblk [Sector 1-15]        and executes it. 2. B oot Program Phase :  Bootblk loads the secondary boot program       i-e ufsboot into the memory. Ufsboot  reads and loads the kernel .       The Kernel is composed of two parts       a). Unix (Platform specific kernel)      b). Genunix (Platform independent Kernel)      Ufsboot combines these two kernels into one complete kernel       and loads into memory.   3.  Kernel Initialization Phase :  The kernel reads the configuration       file /etc/system...