Showing posts with label Oracle Linux. Show all posts
Showing posts with label Oracle Linux. Show all posts

Tuesday, September 8, 2020

 

Configuring Sendmail with a Smart Host and SMTP Authentication

In this blog post, we’ll examine how to edit the sendmail. mc file to configure Sendmail to relay mail through an external SMTP service, such as SMTP2GO.

This setup will be userfull when:

  • You want to send emails through a third-party SMTP provider.

  • Your server is blocked from sending mail directly on port 25.

  • You must authenticate with your SMTP provider using a specific port (e.g., 2525).


🔧 Step-by-Step Sendmail Configuration

Here’s a snippet from the sendmail.mc file:

#dnl define(`SMART_HOST', `smtp.your.provider')dnl

define(`SMART_HOST', `mail.smtp2go.com')dnl

FEATURE(`authinfo')dnl

define(`RELAY_MAILER_ARGS', `TCP $h 2525')dnl

dnl #

Let’s break it down:

 Explanation of Each Line

1. Smart Host Definition

#dnl define(`SMART_HOST', `smtp.your.provider')dnl

This is a commented-out placeholder. You can use this format to set a different SMTP server if needed.

2. Actual Smart Host in Use

define(`SMART_HOST', `mail.smtp2go.com')dnl

This tells Sendmail to route all outbound mail through SMTP2GO.

3. Authentication Info Feature

FEATURE(`authinfo')dnl

This enables authentication support, allowing you to send email through a secure SMTP server that requires login credentials.

4. Relay Mailer Arguments

define(`RELAY_MAILER_ARGS', `TCP $h 2525')dnl

This specifies the port to use when connecting to the SMTP server. Here, we're using port 2525, a common alternative to port 25 (which is often blocked by ISPs).

5. Final Comment Line

dnl #

A dummy comment or placeholder, no operational effect.

Next Steps After Configuration

Once your sendmail.mc file is configured:

  1. Rebuild sendmail configuration

    m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
    
  2. Create the authinfo file Add your SMTP credentials in /etc/mail/authinfo:

    AuthInfo:mail.smtp2go.com "U:root" "I:your_username" "P:your_password"
    
  3. Hash the authinfo file

    makemap hash /etc/mail/authinfo < /etc/mail/authinfo
    
  4. Restart sendmail

    systemctl restart sendmail
    

Test the Configuration

Send a test email using mail or sendmail to confirm that everything is working.

echo "Test Email from Sendmail via SMTP2GO" | mail -s "Sendmail Test" your@email.com

Final Thoughts

Using a smart host like SMTP2GO makes your email delivery more reliable and helps avoid issues with ISPs blocking direct mail traffic. With a few lines in sendmail.mc, and some authentication setup, you're good to go!


Wednesday, June 1, 2016

EXIM



Managing and Clearing the Exim Mail Queue on a cPanel Server

When running a cPanel-based mail server, it’s not uncommon to encounter situations where the Exim mail queue grows unexpectedly—sometimes due to spam, mail loops, or misconfigured scripts. Regularly monitoring and clearing the mail queue is essential for maintaining a healthy email environment.

Here’s a step-by-step guide on how to view, analyze, and clear Exim’s mail queue using command-line tools

Step 1: Viewing the Exim Mail Queue

exim -bp

exim -bp | exiqsumm

root@vserver622 [~]# exim -bp | exiqsumm

Count  Volume  Oldest  Newest  Domain
-----  ------  ------  ------  ------

    1     740      2m      2m  alshirawi.ae
    1     677      2m      2m  yahoo.com
---------------------------------------------------------------
    2    1417      2m      2m  TOTAL

This quickly shows you which domains have messages stuck in the queue and how many there are.

 Step 2: Removing Messages from the Queue


exiqgrep -i|xargs exim -Mrm

exiqgrep -i lists all message IDs.

xargs exim -Mrm deletes each message by its ID.

If a message is locked, Exim will notify you (e.g., Message ... is locked). In this case, you may need to retry after a few minutes or investigate why the message is locked.

B. Alternative Bulk Removal Methods

exim -bp|grep "<"|awk {'print $3'}|xargs exim -Mrm


exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash

root@vserver622 [/usr/local/cpanel/whostmgr/bin]# exiqgrep -i|xargs exim -Mrm
Message 1b86cI-0000yS-EX is locked

Step 3: Verifying the Mail Queue is Cleared


 bashvserver622 [~]#  exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' |

root@vserver622 [~]# exim -bp | exiqsumm

Count  Volume  Oldest  Newest  Domain
-----  ------  ------  ------  ------

    2    6553      2h      2h  pooae.com
    8    26KB      2h      2h  yahoo.com
---------------------------------------------------------------
   10    32KB      2h      2h  TOTAL

 Step 4: Removing Specific Locked Messages

root@vserver622 [~]# exim -Mrm 1b86cI-0000yS-EX
Message 1b86cI-0000yS-EX has been removed

root@vserver622 [~]# exim -bp | exiqsumm

Count  Volume  Oldest  Newest  Domain
-----  ------  ------  ------  ------

    1     740      0m      0m  alshirawi.ae
    1     677      0m      0m  yahoo.com
---------------------------------------------------------------
    2    1417      0m      0m  TOTAL

Conclusion

Regularly monitoring and managing the Exim mail queue is essential for email delivery health on any cPanel server. With these command-line tools, you can quickly identify, summarize, and clean up problematic or stuck mail, ensuring that your users experience reliable email service.



Pro Tip:

If you regularly encounter large queues or locked messages, investigate the root cause—check for scripts sending excessive mail, look for authentication issues, or consider rate limiting outbound mail to avoid future problems.

 

Thursday, November 21, 2013

Error in CreateOUIProcess( ): 13


Please wait ...Error in CreateOUIProcess(): 13: Permission denied

When we try to launch the 12c database run installer from the Linux  we are getting the below error

Step 1

[oracle@oracledb1 database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB.   Actual 1356 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 49151 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-11-21_06-59-43AM. Please wait ...Error in CreateOUIProcess(): 13: Permission denied

Step 2

Check the file permission of the java which will execute the oui  the java of the run installer can be located in the /tmp/OraInstall

[oracle@oracledb1 bin]$ pwd
/tmp/OraInstall2013-11-20_11-19-33PM/jdk/jre/bin
[oracle@oracledb1 bin]$ ls
ControlPanel  java  java_vm  javaws  jcontrol  keytool  orbd  pack200  policytool  rmid  rmiregistry  servertool  tnameserv  unpack200
[oracle@oracledb1 bin]$ ./java
-bash: ./java: Permission denied
[oracle@oracledb1 bin]$

Check the file whether it is corrupted 

[oracle@oracledb1 bin]$ file java
java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.0, not stripped
Once the file show the details it is not corrupted and we can use 

Step 3
Solution 1

Export the TMP directory to the home folders tmp directory so it will not touch the /tmp
export TMP=$HOME/tmp
Now the installer starts and goes through 
[oracle@oracledb1 database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 2510 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 49151 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual
16777216    Passed
Preparing to launch Oracle Universal Installer from
/home/oracle/tmp/OraInstall2013-11-21_07-22-10AM. Please wait
...[oracle@oracledb1 database]$

Now we have permission to execute the java to invoke the GUI screen because the tmp folder is present in the home folder of the oracle user 
[oracle@oracledb1 bin]$ ./java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
[oracle@oracledb1 bin]$ pwd
/home/oracle/tmp/OraInstall2013-11-21_07-22-10AM/jdk/jre/bin
[oracle@oracledb1 bin]$

Solution 2

cat /etc/fstab

/dev/mapper/vglocal20130819-tmp00 /tmp                    ext4    defaults,nosuid,nodev,noexec        1 2

the execution permission was no execute and the java will not execute and start the oui installer change the mount option in the fstab and restart the ./runinstaller.. once you restart the run installer we need to reboot the Server to take effect ...





Sunday, August 5, 2012

BUG: soft lockup - CPU#11 stuck for 10s! [updatedb:20793] update db mlocate consuming 100% of cpu resources

Updatedb process consumes the 100% of resources and the NFS or iscsci storage mount points staled 

the update db process consumes log resources when the Server io is high so in the high io system we can stop the updatedb command by commenting the mlocate  file in the /etc/cron.daily 
if you check the /var/log/messages you can find the error messages 

Aug  5 04:03:57 fahmid kernel: BUG: soft lockup - CPU#11 stuck for 10s! [updatedb:20793]
Aug  5 04:03:57 fahmid kernel: CPU 11:
Aug  5 04:03:57 fahmid kernel: Modules linked in: autofs4 hidp nfs fscache nfs_acl rfcomm l2cap bluetooth lockd sunrpc bonding be2iscsi ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp bnx2i cnic uio cxgb3i cxgb3 8021q libiscsi_tcp libiscsi2 scsi_transport_iscsi2 scsi_transport_iscsi dm_mirror dm_multipath scsi_dh video backlight sbs power_meter hwmon i2c_ec i2c_core dell_wmi wmi button battery asus_acpi acpi_memhotplug ac ipv6 xfrm_nalgo crypto_api parport_pc lp parport st joydev sr_mod cdrom sg qla2xxx hpilo scsi_transport_fc bnx2 serio_raw pcspkr dm_raid45 dm_message dm_region_hash dm_log dm_mod dm_mem_cache ata_piix libata shpchp cciss sd_mod scsi_mod ext3 jbd uhci_hcd ohci_hcd ehci_hcd
Aug  5 04:03:57 fahmid kernel: Pid: 20793, comm: updatedb Not tainted 2.6.18-194.el5 #1
Aug  5 04:03:57 fahmid kernel: RIP: 0010:[<ffffffff88052f98>]  [<ffffffff88052f98>] :ext3:ext3_find_entry+0x20f/0x575
Aug  5 04:03:57 fahmid kernel: RSP: 0018:ffff8106ba77fb48  EFLAGS: 00000206
Aug  5 04:03:57 fahmid kernel: RAX: 0000000000000000 RBX: ffff81025c11bc10 RCX: 000000003386148f
Aug  5 04:03:57 fahmid kernel: RDX: ffff81061cf64c00 RSI: ffff8106ba77fb28 RDI: ffff8101157326e8
Aug  5 04:03:57 fahmid kernel: RBP: 0000000000000000 R08: ffff8109bf933a48 R09: 0000000000000034
Aug  5 04:03:57 fahmid kernel: R10: ffff81063510c790 R11: 000000005019c3a3 R12: 0000000000000002
Aug  5 04:03:57 fahmid kernel: R13: ffff81025c11bc10 R14: ffffffff80064ab0 R15: ffff810b8ded8740
Aug  5 04:03:57 fahmid kernel: FS:  00002ae9f2950260(0000) GS:ffff810c1fc25cc0(0000) knlGS:0000000000000000
Aug  5 04:03:57 fahmid kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Aug  5 04:03:57 fahmid kernel: CR2: 000000009ff81bbc CR3: 00000001a233d000 CR4: 00000000000006e0
Aug  5 04:03:57 fahmid kernel:


Step 1 Check the top command for the highest consuming resources

[root@fahmid cron.daily]# top
top - 17:42:35 up 25 days,  8:02,  8 users,  load average: 775.61, 776.08, 775.54
Tasks: 1594 total,   6 running, 1588 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.3%us,  6.4%sy,  0.9%ni, 18.4%id, 74.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  49454804k total, 49333240k used,   121564k free,   107464k buffers
Swap: 50331636k total,  5675056k used, 44656580k free,  4303088k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  20793 root      34  19  3904  592  504 R 100.0  0.0   5139:00 updatedb
  380 oracle    21   0 3693m 1.4g 4804 S  6.2  3.0   1560:36 java
  432 oracle    20   0 3579m 1.4g 4024 S  5.6  3.0   1674:38 java

Step 2 Check the updatedb process

[root@fahmid log]# ps -ef |grep updatedb
root      6046     1  0 Aug03 ?        00:00:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root      6657     1  0 04:03 ?        00:00:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root     20793     1 99 Aug02 ?        3-14:02:05 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root     21571     1  0 Aug04 ?        00:00:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root     21982 20160  0 18:05 pts/16   00:00:00 grep updatedb

Step 3 Kill the process by using the hard kill

Try to kill all the process by hard killing but still it will not kill the process 

[root@fahmid log]# kill -9 6046
[root@fahmid log]# kill -9 6657
[root@fahmid log]# kill -9 20793
[root@fahmid log]# kill -9 21571
[root@fahmid log]# ps -ef |grep updatedb
root      6046     1  0 Aug03 ?        00:00:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root      6657     1  0 04:03 ?        00:00:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root     20793     1 99 Aug02 ?        3-14:05:54 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root     21571     1  0 Aug04 ?        00:00:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?securityfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?nfs?nfs4?autofs
root     22232 20160  0 18:09 pts/16   00:00:00 grep updatedb

Step 4 Check the mlocate  in the /etc/cron.daily 

[root@fahmid cron.daily]# pwd
/etc/cron.daily
[root@fahmid cron.daily]# ls
0anacron  0logwatch  cups  logrotate  makewhatis.cron  mlocate.cron  prelink  rpm  tetex.cron  tmpwatch
[root@fahmid cron.daily]# vi mlocate.cron
#!/bin/sh
nodevs=$(< /proc/filesystems awk '$1 == "nodev" { print $2 }')
renice +19 -p $$ >/dev/null 2>&1
/usr/bin/updatedb -f "$nodevs"

Step 5 comment the mlocate file in the cron .daily

change the mlocate  to another name 
[root@fahmid cron.daily]# vi mlocateold.cron
#!/bin/sh
#nodevs=$(< /proc/filesystems awk '$1 == "nodev" { print $2 }')
#renice +19 -p $$ >/dev/null 2>&1
#/usr/bin/updatedb -f "$nodevs"

Step 6 Try to kill the process but still the process is alive then restart the server

[root@fahmid cron.daily]# reboot

Broadcast message from root (pts/16) (Sun Aug  5 18:35:36 2012):

The system is going down for reboot NOW!
Some times the reboot from the terminal does not work  if we had the console then try to reboot through the console
or physical reboot






Friday, June 29, 2012

Creating the Public Yum repositiry for Oracle Linux 5

   


To Create the Public yum please we need to use the wget option to get the .repo file from internet .. so please check the net connection before running the command

[root@fahtestdb ~]# cd /etc/yum.repos.d
[root@fahtestdb yum.repos.d]# ls
[root@fahtestdb yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
--2012-06-30 01:01:03--  http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3974 (3.9K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[==============================================================================================================================>] 3,974       --.-K/s   in 0.001s

2012-06-30 01:01:06 (4.58 MB/s) - `public-yum-el5.repo' saved [3974/3974]



By using the Public Yum we can install the necessry packages through the internet from the Oracle repository Servers

[root@fahtestdb yum.repos.d]# yum install vnc*
Loaded plugins: security
el5_latest                                                                                                                                       | 1.1 kB     00:00
el5_latest/primary                                                                                                                               | 9.4 MB     00:37
el5_latest                                                                                                                                                    9130/9130
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vnc.x86_64 0:4.1.2-14.el5_6.6 set to be updated
---> Package vnc-server.x86_64 0:4.1.2-14.el5_6.6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                Arch                               Version                                         Repository                              Size
========================================================================================================================================================================
Updating:
 vnc                                    x86_64                             4.1.2-14.el5_6.6                                el5_latest                             159 k
 vnc-server                             x86_64                             4.1.2-14.el5_6.6                                el5_latest                             2.0 M

Transaction Summary
========================================================================================================================================================================
Install       0 Package(s)
Upgrade       2 Package(s)

Total download size: 2.2 M
Is this ok [y/N]: Y
Downloading Packages:
(1/2): vnc-4.1.2-14.el5_6.6.x86_64.rpm                                                                                                           | 159 kB     00:00
(2/2): vnc-server-4.1.2-14.el5_6.6.x86_64.rpm                                                                                                    | 2.0 MB     00:32
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                    64 kB/s | 2.2 MB     00:34
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
el5_latest/gpgkey                                                                                                                                | 1.4 kB     00:00
Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>" from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
Is this ok [y/N]: Y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : vnc-server                                                                                                                                       1/4
  Updating       : vnc                                                                                                                                              2/4
  Cleanup        : vnc-server                                                                                                                                       3/4
  Cleanup        : vnc                                                                                                                                              4/4

Updated:
  vnc.x86_64 0:4.1.2-14.el5_6.6                                                   vnc-server.x86_64 0:4.1.2-14.el5_6.6

Complete!
[root@fahtestdb yum.repos.d]#

Mounting the Partitions in the Oracle Linux


Mounting Oracle Data Partitions on Linux

To prepare the system for Oracle installation, we need to mount the necessary partitions on the Linux server. This includes creating the required directory structure, mounting the devices, and ensuring persistence across reboots.


To mount the partitions, we have created the labels to mounted the volumes

Step 1: Create Directory Structure

[root@fahtestdb ~]# mkdir /u01/app/oracle
mkdir: cannot create directory `/u01/app/oracle': No such file or directory


To create the full directory structure, use -p .. option it is user to make the directory with the parent.  


[root@fah ~]# mkdir -p /u01/app/oracle
[root@fah ~]# mkdir -p /u02/app/oracle
[root@fah ~]# mkdir -p /u03/app/oracle

To mount the partition, use the mount command  with the device name and label.

Step 2: Mount the Partitions

[root@fah ~]# mount /dev/sda1 /u01/app
[root@fah ~]# mount /dev/sdb1 /u02/app
[root@fah ~]# mount /dev/sdc1 /u03/app

If you have not formatted the device, then you will get the message that the file system must be specified. 
 
[root@fahtestdb ~]# mount /dev/sdc1 /u03/app

Mount: You must specify the filesystem type

Make sure the devices are formatted (e.g., ext3, ext4, etc.) before mounting.

Step 3: Verify Mounts

We can use the df -h or mount command to check if the file system is mounted.  

[root@fahtestdb ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p5      24G  3.0G   20G  14% /
/dev/cciss/c0d0p6     9.7G  232M  9.0G   3% /var
/dev/cciss/c0d0p3      24G  173M   22G   1% /home
/dev/cciss/c0d0p1      99M   16M   79M  17% /boot
tmpfs                  79G     0   79G   0% /dev/shm
/dev/sda1             413G  199M  392G   1% /u01/app
/dev/sdb1             150G  188M  142G   1% /u02/app
/dev/sdc1             150G  188M  142G   1% /u03/app


[root@fahtestdb ~]# mount
/dev/cciss/c0d0p5 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p6 on /var type ext3 (rw)
/dev/cciss/c0d0p3 on /home type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda1 on /u01/app type ext3 (rw)
/dev/sdb1 on /u02/app type ext3 (rw)
/dev/sdc1 on /u03/app type ext3 (rw)

Step 4: Make Mounts Persistent After Reboot


We have to add these newly created Partitions to the /etc/fstab to keep them mounted even after restarting the server. If you do not add them to the fstab, the partitions will not be mounted automatically when you restart the server.

LABEL=/                      /                            ext3    defaults        1 1
LABEL=/var                 /var                       ext3    defaults        1 2
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/boot              /boot                      ext3    defaults        1 2
tmpfs                            /dev/shm                tmpfs   defaults       0 0
devpts                           /dev/pts                 devpts  gid=5,mode=620  0 0
sysfs                             /sys                        sysfs   defaults        0 0
proc                              /proc                      proc    defaults        0 0
LABEL=SW-cciss/c0d0p2   swap             swap    defaults       0 0
/dev/sda1               /u01/app/oracle         ext3    _netdev         0 0
/dev/sdb1               /u02/app/oracle         ext3    _netdev         0 0
/dev/sdc1               /u03/app/oracle         ext3    _netdev         0 0

Here we have added the last three lines in the fstab to mount the partitions automatically when the server is  restarted

When you are mounting the file system from the shared storage, then we have to specify _netdev
if the partition is in the local hard disk, we have to specify the default


[root@fahtestdb ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p5      24G  3.0G   20G  14% /
/dev/cciss/c0d0p6     9.7G  232M  9.0G   3% /var
/dev/cciss/c0d0p3      24G  173M   22G   1% /home
/dev/cciss/c0d0p1      99M   16M   79M  17% /boot
tmpfs                  79G     0   79G   0% /dev/shm
/dev/sda1             413G  199M  392G   1% /u01/app
/dev/sdb1             150G  188M  142G   1% /u02/app
/dev/sdc1             150G  188M  142G   1% /u03/app

Step 5: Reboot and Confirm


[root@fahtestdb ~]# reboot

Broadcast message from root (pts/1) (Fri Jun 29 20:05:43 2012):

The system is going down for reboot NOW!
[root@fahtestdb ~]#
login as: root
root@192.168.5.48's password:
Last login: Fri Jun 29 17:43:33 2012 from 172.31.2.1
[root@fahtestdb ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p5      24G  3.0G   20G  14% /
/dev/cciss/c0d0p6     9.7G  232M  9.0G   3% /var
/dev/cciss/c0d0p3      24G  173M   22G   1% /home
/dev/cciss/c0d0p1      99M   16M   79M  17% /boot
tmpfs                  79G     0   79G   0% /dev/shm
/dev/sda1             413G  199M  392G   1% /u01/app/oracle
/dev/sdb1             150G  188M  142G   1% /u02/app/oracle
/dev/sdc1             150G  188M  142G   1% /u03/app/oracle
[root@fahtestdb ~]#

Summary

Mounting and configuring persistent storage is a critical step in preparing your Linux environment for Oracle installation. Ensuring the directories exist, the devices are formatted and mounted correctly, and the /etc/fstab is updated will help avoid issues during Oracle setup and future restarts.

Let me know if you'd like to include mkfs examples or tips on using labels and UUIDs in fstab for better disk management!

 


















Formating the partition to the Linux file System



Formating the raw partitions in Oracle linux 5.5



mkfs.ext3 is the command to format the partition in Oracle linux 6 and above you can use the mkfs.ext4 because the version 6 and above use's the ext4 file system

[root@fahtestdb ~]# mkfs.ext3 /dev/sdc1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
19906560 inodes, 39792997 blocks
1989649 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1215 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override

Partition all the raw file system to the O/S file system to Mount the partition to the Lable