Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

Saturday 29 February 2020

How to reset HP iLO password from command line in Linux

If you have lost or forgotten the iLO password than please find the below steps to reset ilo password from command line.

To reset / set the password of the iLO from within the linux operating system on an HP server, the hponcfg utility needs to be installed

Here is some information about hponcfg

The hponcfg utility is an online configuration tool used to set up and reconfigure the local iLO without requiring a reboot of the server operating system. It can be used to retrieve and change the iLO configuration of the local server from the linux command line.

Please login on the linux machine and create a new xml file

[root@localhost]#vim ilo_password.xml

<RIBCL VERSION="2.0">
  <LOGIN USER_LOGIN="x" PASSWORD="x">
  <USER_INFO MODE="write">
    <MOD_USER USER_LOGIN="Administrator">
      <PASSWORD value="XXXXXXXX*"/>
    </MOD_USER>
  </USER_INFO>
  </LOGIN>
</RIBCL>

save the ilo_password.xml file

In above xml file, you just need to set PASSWORD value - XXXXXXX. Please put your new ILO password here. 

To load this xml file in ILO, please use hponcfg command 

[root@localhost]# hponcfg -w ilo_password.xml

Your iLO password will be reset, now please login in HPE iLO via new password XXXXXXX.

Please let me know in case of any query about this post. Thanks. 

Failed to start lsb bring up/down networking in rhel 7

Such type of error we have received after operating system upgradation from redhat linux operating system from version 7.x to version 7.y.

The root cause for error is network manager upgradation during operating system patching.

To troubleshoot this error, please restart the network service and check the status 

[root@localhost network-scripts]# systemctl restart network

Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

[root@localhost network-scripts]# systemctl status network

You can see " Failed to start lsb bring up/down networking" error message

Solution: To resolve such type of network issue, please perform the below steps.

Go to /etc/sysconfig/network-scripts/ directory and list the files.

[root@localhost]# cd /etc/sysconfig/network-scripts/

You can see the ifcfg-lo filename file which you need to removed it.

after remove this file please take a restart of service. Your network service will restart properly without any issue. Also if you have any other duplicate or backup ifcfg file please remove it.

[root@localhost network-scripts]# rm -rf ifcfg-lo

[root@localhost network-scripts]# systemctl restart network

Now try to access the redhat machine via ssh. Please post your comment if you have any query regarding this post. 

Sunday 29 April 2018

How to install and configure samba server in RHEL 7 or redhat linux 7

Login on Samaba server
Check samba rpm installed or not, if not installed please install it,

[root@localhost ~]# rpm -qa | grep samba
[root@localhost ~]# yum install samba*

Create a directory in root file system which is shared with client.

[root@localhost ~]#mkdir -p /home/testuser/test

Add a new group or can use existing group

To provide access on shared directory,Here we are adding new group called samba

[root@localhost ~]#groupadd samba

Change the group and permission of sharing folder

[root@localhost ~]#chgrp -R samba /home/testuser/test
[root@localhost ~]#chmod -R 777 /home/testuser/test

create user, add into group and set samba password

[root@localhost ~]#useradd testuser
[root@localhost ~]#usermod -G samba testuser
[root@localhost ~]#smbpasswd -a testuser

Now Edit /etc/samba/smb.conf file

Note: Please take a backup of origianl file.

[root@localhost ~]#cd /etc/samba/
[root@localhost ~]#cp -p smb.conf smb.conf.orig

And add the below given contents in last line of /etc/samba/smb.conf file.

vi /etc/samba/smb.conf

[test]
comment = shared-directory
path = /home/testuser/test
public = no
valid users = testuser, @samba
writable = yes
browseable = yes
create mask = 0774
directory mask = 4774

##Edit these lines in /etc/samba/smb.conf . To allow network to reach samba server

interfaces = lo ens32 192.168.1.0/24
hosts allow = 127. 192.168.1.

security = user
passdb backend = tdbsam
netbios name = localhost
server string = Samba Server localhost
workgroup = MYGROUP
log file = /var/log/samba/samba.log
max log size = 50
security = server

Add services in /etc/services files

vi /etc/services
 
netbios-ns    137/tcp    # netbios name service
netbios-ns    137/udp    # netbios name service
netbios-dgm    138/tcp    # netbios datagram service
netbios-dgm    138/udp    # netbios datagram service
netbios-ssn    139/tcp    # netbios session service
netbios-ssn    139/udp    # netbios session service

Note: Please check these above ports are open from this samba server to client machine

Now start the smb and nmb services.

systemctl start smb.service
systemctl start nmb.service

Enable smb and nmb service at booting of system

systemctl enable smb.service
systemctl enable nmb.service

Note 1: firewalld service not enable on this server so no need to add any rule.
Note 2: selinux is in permissive state so no need to change the selinux security context.

Now login on window machine

and mount this samba share on the server.

\\localhost.redhat.com\test

Thursday 26 April 2018

How to check Operating Systems Version is 64-bit or 32-Bit in AIX and Solaris

In this post, you can see how we will check the operating system is 32 bit or 64 bit. Normally when we download any software on Unix platform they have dependency regarding the operating system version. So after following my this post you can easily get the information about the operating system version information.
When you work on Unix operating system then you must know the version of operating system. Because without getting exact version of OS, you can not install the packages on the Linux system.

Here, I mentioned the command and their output using these commands you can easily found the version of operating system. It is 32 bit or 64 bit.

Linux Operating System:

#uname –a
Linux vibhor 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

#uname  -m
x86_64

If the output has "x86_64",the environment is 64 bit.

Solaris Operating System:

#isainfo options

-v         Prints detailed information about the other options
-b         Prints the number of bits in the address space of the native instruction set.
-n         Prints the name of the native instruction set used by portable applications supported by the current version of the OS.
-k         Prints the name of the instruction set or sets that are used by the OS kernel components such as device drivers and STREAMS modules.

[vibhor]# isainfo -v

64-bit sparcv9 applications
        ima fmaf vis2 vis popc
32-bit sparc applications
        ima fmaf vis2 vis popc v8plus div32 mul32

[vibhor]# isainfo -b
64

[vibhor]#isainfo
sparcv9 sparc

The output for the above command should be sparcv9 sparc for a 64-bit operating System.

AIX Operating System:

vibhor:/> getconf -a | grep KERN
KERNEL_BITMODE:                         64

vibhor:/> bootinfo -y
64

The output of the above command should be 64 for a 64-bit hardware. The command must be executed as root.

Note: on AIX, the -y option will specify if the hardware is 32- or 64-bit mode while bootinfo -k will specify if the kernel is 32- or 64-bit (this command must be run as root).

HP-UX Operating system:
         
 hpx:/> getconf KERNEL_BITS
 64
         
The output of the above command should be 64 for a 64-bit operating system.

Job for nfs-server.service failed because the control process exited with error code. See "systemctl status nfs-server.service" and "journalctl -xe" for details. Resolution

On Red Hat Linux 7 operating system, some time you will get below NFS service failed error message.

"Job for nfs-server.service failed because the control process exited with error code. See "systemctl status nfs-server.service" and "journalctl -xe" for details."

The above error occur when you are taking restart of nfs service.

# systemctl restart nfs.service
Job for nfs-server.service failed because the control process exited with error code. See "systemctl status nfs-server.service" and "journalctl -xe" for details.
Resolution

# systemctl status nfs-server.service
nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2018-04-27 09:56:08 IST; 8s ago
  Process: 21370 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
  Process: 21366 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 21362 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
  Process: 21273 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 2714 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
 Main PID: 21273 (code=exited, status=0/SUCCESS)

Apr 27 09:56:07 localhost.redhat.com systemd[1]: Starting NFS server and services...
Apr 27 09:56:08 localhost.redhat.com exportfs[2714]: exportfs: Failed to resolve foobar.com <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Apr 27 09:56:08 localhost.redhat.com exportfs[2714]: exportfs: Failed to resolve foobar.com <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Apr 27 09:56:08 localhost.redhat.com systemd[1]: nfs-server.service: control process exited, code=exited status=1
Apr 27 09:56:08 localhost.redhat.com systemd[1]: Failed to start NFS server and services.
Apr 27 09:56:08 localhost.redhat.com systemd[1]: Unit nfs-server.service entered failed state.
Apr 27 09:56:08 localhost.redhat.com systemd[1]: nfs-server.service failed.

To resolve such issue you need to follow the below process.

You need to check which NFS version rpm is installed on the server.

#rpm -qa | grep nfs

the above command show you the installed nfs version.

Normally the above error occur due to lower version on nfs, so to resolve the issue you need to upgrade the nfs version.

installed the latest nfs rpm nfs-utils-1.3.0-0.33.el7 or later

#yum install nfs

The above command upgrade the nfs rpm, or you can download the manually rpm file and installed it through rpm -uvh command.

After that restart the nfs service again.

# systemctl restart nfs.service

it is started successfully, you can check the status via below command.

# systemctl status nfs.service

[root@localhost ~]# systemctl status nfs.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/nfs-server.service.d
           └─order-with-mounts.conf
   Active: active (exited) since Thu 2018-04-27 03:47:57 IST; 18h ago
  Process: 32477 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 32472 ExecStartPre=/bin/sh -c /bin/kill -HUP `cat /run/gssproxy.pid` (code=exited, status=0/SUCCESS)
  Process: 32469 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 32477 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

Apr 26 03:47:57 localhost systemd[1]: Starting NFS server and services...
Apr 26 03:47:57 localhost systemd[1]: Started NFS server and services.

Tuesday 24 April 2018

How to install or upgrade VMware Tools on linux server

You need to login on the server where you need to install or upgrade the vmware tool.

Check the status of vmtools from vcenter GUI & Servers.

/etc/vmware-tools/services.sh status

Please follow the below steps to install or upgrade the VMware Tools:-

1.    From vsphere select the virtual machine on which vmtools need to be installed and then Choose VM > Install VMware Tools.

2. As root mount the VMware Tools virtual CD-ROM image to /mnt

mount /dev/cdrom /mnt

3. go to /tmp and untar the installation file.

cd /tmp
tar zxf /mnt/VMwareTools-x.0.0-<xxxx>.tar.gz

4. Run the VMware Tools installer:

cd /tmp/vmware-tools-distrib

./vmware-install.pl -d
 
Unmount of the VMware Tools virtual CD-ROM image is done automatically.

Login to server as root and run below command to start the services:

/etc/vmware-tools/services.sh start


Run below command to check the status of vmtools:

/etc/vmware-tools/services.sh status

Uninstall the vmtools by running below command:

/usr/bin/vmware-uninstall-tools.pl

Monday 5 February 2018

How to start/stop and enable/disable Firewall on Redhat 7 Linux system

In RHEL7, to stop/start and enable/disable the firewall is quite different from RHEL6. In Red hat 7 "firewalld" named service we used for local firewall. Please find the below example step by step to check the firewall status.

How to check status of RHEL7 firewall:

[root@localhost ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: active (running) since Thu 2018-02-05 12:37:47 IST; 0 months 1 days ago
Main PID: 332 (firewalld)
CGroup: /system.slice/firewalld.service
           └─332 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Feb 05 12:37:47 localhost systemd[1]: Starting firewalld - dynamic firewall daemon...
Feb 05 12:37:49 localhost systemd[1]: Started firewalld - dynamic firewall daemon.

In the above status firewall is by default enable on the linux system. It is enable automatically when system restart or on.

How to Stop and Start RHEL7 firewall:
 
Please use the below commands to start stop the firewall on redhat linux 7 operating system. 

[root@localhost ~]# service firewalld stop
Redirecting to /bin/systemctl stop  firewalld.service
Stopped firewall will start again after system's reboot.

[root@localhost ~]# service firewalld start
Redirecting to /bin/systemctl start  firewalld.service

How to Disable and Enable RHEL7 firewall:

If you want to disable permanently firewall so that after reboot it is not enable again, please use the below command.

[root@localhost ~]# systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'

If you want to enable the firewall again run please use the below command.

[root@localhost ~]# systemctl enable firewalld
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/basic.target.wants/firewalld.se

Tuesday 16 January 2018

How to Flush Memory Cache and Buffer Cache on Linux Server

When you run the "free -m" command and get the below output, then you observe free memory section will be low value but comparatively buffers+cache value would be higher.

Now this is not a bad thing actually since your OS has reserved this memory to speed up your most used process by keeping them in the cache. But in case any new process is executed and your system is low on memory then these cache would be automatically released to make space for memory reservation of new processes.

[root@localhost]# free -m
             total       used       free     shared    buffers     cached
Mem:          2345       1234        1145          0         24        400
-/+ buffers/cache:        664        345
Swap:         4032          0       4032

if you want to clear or free cache/buffer memory then you need to run the below command.

[root@localhost]# echo 3 > /proc/sys/vm/drop_caches

These are the different values which you can use with the above command

echo 1 is clearing only page cache

[root@localhost]# echo 1 > /proc/sys/vm/drop_caches

echo 2 is to clear free dentries and inodes

[root@localhost]# echo 2 > /proc/sys/vm/drop_caches

echo 3 is clearing page cache, dentries and inodes

[root@localhost]# echo 3 > /proc/sys/vm/drop_caches

Thursday 21 December 2017

Multipath command with an examples

In linux operating system device mapping through multipath is widely used. Here, we can give you some example how we will use the multipath commands in Linux server

➤ Normally multipath device has a Word Wide Identifier (WWID), which is globally unique and unchanging.

➤ When new devices are brought under the control of DM-Multipath, the new devices may be seen in three different places under the /dev directory: /dev/mapper/mpathn, /dev/mpath/mpathn, and /dev/dm-n

➤ The devices in /dev/mapper are created early in the boot process. Use these devices to access the multipathed devices, for example when creating logical volumes.
The devices in /dev/mpath are provided as a convenience so that all multipathed devices can be seen in one directory. These devices are created by the udev device manager and may not be available on startup when the system needs to access them.

Note: Do not use these devices for creating logical volumes or filesystems

➤ Any devices of the form /dev/dm-n are for internal use only and should never be used.

Please find the multipath syntax which we used in the Linux operating system.


l    -> Display the current multipath configuration gathered from sysfs and the device mapper.
ll  -> Display the current multipath configuration gathered from sysfs, the device mapper, and all other available components on the system.
f    -> Remove the named multipath device.
F   -> Remove all unused multipath devices.
v   ->  Verbosity level
          . 0 no output
          . 1 print created devmap names only
          . 2 default verbosity
          . 3 print debug information
d   -> Dry run, do not create or update devmaps
r    -> Force devmap reload

⧪ How to display the current multipath configuration with all information.

[root@localhost~]# multipath -ll
Dec 21 11:27:17 | multipath.conf line 35, invalid keyword: selector
mpathf (3600c0ff00019e9e9dc94c25801000000) dm-6 HP,MSA 2040 SAN
size=466G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=70 status=active
  |- 1:0:0:4 sdg 8:96 active ready running
  |- 2:0:0:4 sdj 8:144 active ready running
  |- 1:0:1:4 sdq 65:0 active ready running
  `- 2:0:1:4 sdt 65:48 active ready running

⧪ How to remove multipath devices with multipath Command

[root@localhost~]# multipath -f mpathf

Note: if we use -F option then it is remove all unused devices.

⧪ How to Force reload device map with multipath Command

[root@localhost~]# multipath -r

Solaris Server process Monitoring tool- prstat

We have different type of tools and command which are used in Solaris or other Unix system to monitor the system process. But if we are talking about only Sun Solaris server then we have very good process tool which is called "prstat".

In this post, we will find that how prstat is work on the Solaris platform.

   !-[solaris]# prstat

When you run the above command on the command line you will get the below output on the CLI screen which are refreshing in every few seconds and sorting all the information regarding the system resource.

  PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP

 21322 root      11M 3236K cpu0    59    0   0:00:00 0.0% prstat/1

 21323 root      18M 4788K sleep   59    0   0:00:00 0.0% sshd/1

 22345 root      10M 2188K sleep   59    0   0:00:00 0.0% bash/1

   584 root       13M 3832K sleep   59    0   0:01:59 0.0% nscd/51

   154 root       13M 2068K sleep   59    0   0:00:00 0.0% syseventd/18

   183 root     1772K  776K sleep   59    0   0:00:13 0.0% utmpd/1

   538 root       11M 2572K sleep   59    0   0:00:00 0.0% picld/4

Total: 12 processes, 31 lwps, load averages: 0.00, 0.00, 0.00


This is a quick view of the prstat command but if you wanted to get a different view of the same info, like a summary of what users own these CPU consuming processes

   !-[solaris]# prstat -a

If you run prstat with the -a option (prstat -a) you will get an output similar to the default one, but the last few lines of it will be used for providing a really useful report of the users consuming top system resources.


  PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP

 21322 root      11M 3236K cpu0    59    0   0:00:00 0.0% prstat/1

 21323 root      18M 4788K sleep   59    0   0:00:00 0.0% sshd/1

 22345 root      10M 2188K sleep   59    0   0:00:00 0.0% bash/1


 NPROC USERNAME  SWAP   RSS MEMORY      TIME  CPU

     5 root      52M   13M   1.3%   0:00:00 0.0%

    50 root      841M  571M    56%   0:22:22 0.0%

     2 daemon     17M 4520K   0.4%   0:00:04 0.0%

Total: 12 processes, 31 lwps, load averages: 0.00, 0.00, 0.00

We have different type of syntax which we can used to monitor the Solaris server process which are listed below.

!-[solaris]# prstat -L  -> This shows thread per line instead of one process per line
!-[solaris]# prstat -s -> prstat output can be sorted using set of sub-options .sub options are                  cpu,pri,rss,size,time 
!-[solaris]# prstat -t  -> It provides complete users resource utilization.
!-[solaris]# prstat -Z  -> It provides summary per local zone.

Sunday 10 December 2017

How to check number of CPU and processor in linux operating system

In this post, we will find all the command using which we can find that how many CPU and processor are used in Linux operating system.

⇾ This command are applicable in both RedHat & CentOS operating machine.

➤ How to check number of processor on operating system.

      cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l

   Using above command it show you the number of processor which are currently used on server.

➤ How to check number of cores on Linux operating system.

     cat /proc/cpuinfo | grep "core id" | sort -u | wc -l

➤ You can used other command as well like "lscpu" to check number of processor and core per socket.

➤ Please find the other command which are also used to check the number of processor and cores in  Linux operating system.

    cat /proc/cpuinfo | grep 'model name' | uniq
   cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l
   cat /proc/cpuinfo | grep "core id" | sort -u | wc -l

Friday 20 October 2017

How to mount CIFS file system on Linux Operating Server

Step by Step method for Mount CIFS on Linux Server:

➤ In the initial step we will gather all rpm's or packages information which is required for CIFS file system.

[root@localhost]# rpm -qa | grep cifs 
cifs-utils-4.8.1-20.el6.x86_64

if you see the above output, this packages is required for CIFS file system on Linux system. So you can install this rpm using rpm command if you have rpm packages on the server otherwise you will install the packages using YUM utility.

[root@localhost]#rpm -ivh cifs-utils-4.8.1-20.el6.x86_64.rpm

if you are using YUM, then please install the packages using below command.

[root@localhost]#yum install cifs-utils*

it is installed all required dependency related to CIFS file system.

➤ In this step, we will create the mount point on the server where we need to mount the CIFS file system.

[root@localhost]# mkdir -p /backup/cifs

We will create the above mount directory where i will mount the file system.

➤ Now, we will create a CIFS user and assign a password so the user can access mount folder.

[root@localhost]# touch /etc/cifspasswd
[root@localhost]# chmod 600 /etc/cifspasswd

[root@localhost]#vi /etc/cifspasswd

user=castwebsvc
password=*******

➤ In this step we need to make a permanent entry of mounted file system so once we reboot the machine mounted file system not umount.

[root@localhost]# vi /etc/fstab

ADD fstab entry :

//WindowsServer/share /mount/point cifs rw,mand,user=USER,password=PASS 0 0

Example :
//192.168.0.1/CAST_data4/AICCodeUpload  /backup/cifs cifs   rw,mand,credentials=/etc/cifspasswd         0 0

You can take an example for your system. Please change the mount point as per your requirement.

➤ In the final step you need to mount the file system using below command.

[root@localhost]# mount /backup/cifs
[root@localhost]# mount -a

Using above command the CIFS file system has been mounted successfully.

Tuesday 18 July 2017

How to use zoneadm command in Solaris Servers

Please find the "zoneadm" commands with an example as describe below.
 
How to Verify a Solaris zone:

To verify the local solaris zone you need to run the below command with syntax.

!-[solaris]#zoneadm -z <zone> verify

Example: !-[solaris]#zoneadm -z sunz01 verify

In this example once you run the above command, if your zone is installed properly without any error then this is not showing you any output, that's means it is verified. After running the command if it is showing a message then you need to check the configuration of this zone.

How to Installing a Solaris zone:

To install the local Solaris zone you need to run the below command with syntax.

!-[solaris]#zoneadm -z <zone> install

Example: !-[solaris]#zoneadm -z sunz01 install

In this example when you run the above command then your local zone has been started for installation. It is installed the local zone using the Solaris repostiory or flar images which you are kept at server location.

How to Ready a Solaris zone:

To move the local zone in ready or maintainance state you need to run the below command.

!-[solaris]#zoneadm -z <zone> ready

Example: !-[solaris]#zoneadm -z sunz01 ready

In this example, when we run the above command then your local zone moved in to ready or maintianance state.

How to Boot a Solaris zone:

To boot the solaris zone on global system, you need to run the below command with syantx.

!-[solaris]#zoneadm -z <zone> boot

Example: !-[solaris]#zoneadm -z sunz01 boot

After running the above command your local solaris zone has been boot successfully if it is not showing any error during boot time. If you see any message during the boot time then please check where is the issue.

How to Reboot a Solaris zone:

To reboot or restart the solaris zone on Solaris server, you need to perform the below command on global zone.

!-[solaris]#zoneadm -z <zone> reboot

Example: !-[solaris]#zoneadm -z sunz01 reboot

Using this command the local zone "sunz01" has been restart again successfully. You need to run this command from global zone only.

➤ How to Shutdown/Halt a Solaris zone:

If you want to shutdown or halt your local zone without login it, then you need to run the below command from global zone.

!-[solaris]#zoneadm -z <zone> halt

Example: !-[solaris]#zoneadm -z sunz01 halt

After running this command local solaris zone state change from running to installed state that's means your server is shutdown now.

How to Uninstall a Solaris zone:

If you want to uninstall any solaris zone then you need to run the below command for uninstall the zone.

!-[solaris]#zoneadm -z <zone> uninstall -F

Example: !-[solaris]#zoneadm -z sunz01 uninstall -F

"-F" syntax is used to uninstall the zone forcefully.

How to Viewing a Solaris zone:

if you want to local zone current status and any other display information you need to run the below command.

!-[solaris]#zoneadm list -icv

 ID NAME       STATUS      PATH               BRAND   IP
   0 global         running        /                        solaris      shared
   1 sunz01        running       /zones/sunz01   solaris      excl
   2 sunz02        running       /zones/sunz02   solaris      excl

Using above command you can check the current status of all installed zones on Solaris server. It is show you the zone path and zone information. All the above command you need to run from Global zone with root privileges

Thursday 13 July 2017

How to mount CIFS file system on Linux Operating server machine

Generally on linux or Unix operating system servers when we are mounting the any other linux machine folder is quite easiy in comparision to mount the window shared folder on linux machine.

Step by Step method for Mount CIFS on Linux Server:
 
➤ In the initial step we will gather all rpm's or packages information which is required for CIFS file system.

[root@localhost]# rpm -qa | grep cifs
cifs-utils-4.8.1-20.el6.x86_64

if you see the above output, this packages is required for CIFS file system on Linux system. So you can install this rpm using rpm command if you have rpm packages on the server otherwise you will install the packages using YUM utility.

[root@localhost]# rpm -ivh cifs-utils-4.8.1-20.el6.x86_64.rpm

if you are using YUM, then please install the packages using below command.

[root@localhost]# yum install cifs-utils*

it is installed all required dependency related to CIFS file system.
 
➤ In this step, we will create the mount point on the server where we need to mount the CIFS file system.

[root@localhost]# mkdir -p /backup/cifs

We will create the above mount directory where i will mount the file system.
 
➤ Now, we will create a CIFS user and assign a password so the user can access mount folder.

[root@localhost]# touch /etc/cifspasswd
[root@localhost]# chmod 600 /etc/cifspasswd

[root@localhost]# vi /etc/cifspasswd

user=castwebsvc
password=*******
 
➤ In this step we need to make a permanent entry of mounted file system so once we reboot the machine mounted file system not umount.

[root@localhost]# vi /etc/fstab

ADD fstab entry :

//WindowsServer/share /mount/point cifs rw,mand,user=USER,password=PASS 0 0

Example :
//192.168.0.1/CAST_data4/AICCodeUpload  /backup/cifs cifs   rw,mand,credentials=/etc/cifspasswd         0 0

You can take an example for your system. Please change the mount point as per your requirement.
 
➤ In the final step you need to mount the file system using below command.

[root@localhost]# mount /backup/cifs
[root@localhost]# mount -a

Using above command the CIFS file system has been mounted successfully

How To Fix “Device eth0 does not seem to be present, delaying initialization” Error

This Ethernet card error is normally occur on Linux operating system like CentOS, Red Hat Linux etc. When you try to up the Ethernet card it is showing you the above topic error.

So in this post, we will provide you the step by step solutions and troubleshoot all the issue related this error.

In the initial step, you will check which Ethernet card is down , for this you can run the "ifconfig -a" command. Using this command you can check how many internet card is present on the server and on which Ethernet card used IP address.

Let's suppose you are using eth0 on your machine, and if this Ethernet card not taking any ip address and now show on your device that means it is down right now, so please try to start Eth0 device as given below command.

[root@localhost]# ifup eth0
Device eth0 does not seem to be present, delaying initialization

If your internet card show such issue that means you have an issue with MAC address. So in this post I would explain you how to resolve such issue.

1. In this step, please check the MAC Addresses are set correctly or not. For checking this you need to go the network card directory "/etc/sysconfig/network-scripts"

[root@localhost]# cd /etc/sysconfig/network-scripts

[root@localhost]# cat ifcfg-eth0

HWADDR=”00:15:5D:00:91:91”

In the configuration file, you can see the current hardware address of eth0 card, I have show you only HWADDR entry of my eth0 file. In this directory you can see if other Ethernet card is present or not. In my Linux machine i have two Ethernet card , please find the below second Ethernet card MAC address.

[root@localhost]# cat ifcfg-eth1

HWADDR=”00:15:5D:00:91:90”

2. Now we will see which link is present on the system currently and which is not active, for this you can use the below command to check the status.

[root@localhost]# ip -o link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN \    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000\    link/ether 00:15:5D:00:91:90 brd ff:ff:ff:ff:ff:ff

3: eth2: mtu 1500 qdisc   pfifo_fast state UP qlen 1000\ link/ether 00:15:5D:00:91:91 brd ff:ff:ff:ff:ff:ff

Here, no eth1 but there is an eth2 present on the system, so might be problem is that the eth0 is renamed to eth2 but we will confirm with below command.

[root@localhost]# dmesg | grep eth0

udev: renamed network interface eth0 to eth2
udev: renamed network interface rename3 to eth0

From this command it shows that udev rename the network interface, so in the next step we will remove the wrong entry and configure the Ethernet card 

3. Now please open the network rules file to confirm the mac address. Please open this file "/etc/udev/rules.d/70-persistent-net.rules" 

[root@localhost]# cat /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:00:91:90", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:00:91:91", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:5d:00:91:91", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Looks like there are multiple entries for the same MAC address. Removed the incorrect entry and restart the interface using below command.

[root@localhost]# ifup eth0

Now you eth0 card is up and if you are running "ifconfig -a" command you can see the eth0 card with mac address.