Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, November 12, 2014

Mulitinode EBS R12 Installation on VirtualBox (Step by Step)

Here I'm uploading a step by step approach document to Install Mulitinode EBS R12 (12.1.1) on VirtualBox (Step by Step) followed by 12.1.3 Upgrade. (it was quite old but forgot to upload)



Further to this, it was upgraded from R12.1.1 to R12.1.3. Below is the link in which some known/unknown issues were mentioned/reported during upgrade process.

http://manishnashikkar.blogspot.in/2013/10/some-issues-faced-during-upgrade-to-r12.html

Please let me know, if you want this document on your mail id. plus your suggestions and feedback are welcome.

- Manish Nashikkar


Tuesday, July 2, 2013

Creating a Partition Size Larger Than 2TB in Linux


Frankly speaking, you cannot create a Linux partition larger than 2 TB using the fdisk command. The fdisk won't create partitions larger than 2 TB. This is fine for desktop and laptop users, but on server you need a large partition. For example, you cannot create 3TB or 4TB partition size (RAID based) using the fdisk command. It will not allow you to create a partition that is greater than 2TB. In this tutorial, you will learn more about creating Linux filesystems greater than 2 Terabytes to support enterprise grade operation under any Linux distribution.

To solve this problem use GNU parted command with GPT. It supports Intel EFI/GPT partition tables. Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. It is a part of the Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the outdated PC BIOS, one of the few remaining relics of the original IBM PC. EFI uses GPT where BIOS uses a Master Boot Record (MBR).
GUID Partition Table
(Fig.01: Diagram illustrating the layout of the GUID Partition Table scheme. Each logical block (LBA) is 512 bytes in size. LBA addresses that are negative indicate position from the end of the volume, with −1 being the last addressable block. Imaged Credit Wikipedia)

Linux GPT Kernel Support

EFI GUID Partition support works on both 32bit and 64bit platforms. You must include GPT support in kernel in order to use GPT. If you don't include GPT support in Linux kernelt, after rebooting the server, the file system will no longer be mountable or the GPT table will get corrupted. By default Redhat Enterprise Linux / CentOS comes with GPT kernel support. However, if you are using Debian or Ubuntu Linux, you need to recompile the kernel. Set CONFIG_EFI_PARTITION to y to compile this feature.
File Systems
   Partition Types
     [*] Advanced partition selection
     [*] EFI GUID Partition support (NEW)
....

Find Out Current Disk Size

Type the following command:
# fdisk -l /dev/sdb
Sample outputs:
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table

Linux Create 3TB partition size

To create a partition start GNU parted as follows:
# parted /dev/sdb
Output:
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Creates a new GPT disklabel i.e. partition table:
(parted) mklabel gpt
Sample outputs:
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted)
Next, set the default unit to TB, enter:
(parted) unit TB
To create a 3TB partition size, enter:
(parted) mkpart primary 0 0
OR
(parted) mkpart primary 0.00TB 3.00TB
To print the current partitions, enter:
(parted) print
Sample outputs:
Model: ATA ST33000651AS (scsi)
Disk /dev/sdb: 3.00TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End     Size    File system  Name     Flags
 1      0.00TB  3.00TB  3.00TB  ext4         primary
Quit and save the changes, enter:
(parted) quit
Sample outputs:
Information: You may need to update /etc/fstab.
Use the mkfs.ext3 or mkfs.ext4 command to format the file system, enter:
# mkfs.ext3 /dev/sdb1
OR
# mkfs.ext4 /dev/sdb1
Sample outputs:
mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
183148544 inodes, 732566272 blocks
36628313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22357 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
 102400000, 214990848, 512000000, 550731776, 644972544
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Type the following commands to mount /dev/sdb1, enter:
# mkdir /data
# mount /dev/sdb1 /data
# df -H

Sample outputs:
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sdc1               16G   819M    14G   6% /
tmpfs                  1.6G      0   1.6G   0% /lib/init/rw
udev                   1.6G   123k   1.6G   1% /dev
tmpfs                  1.6G      0   1.6G   0% /dev/shm
/dev/sdb1              3.0T   211M   2.9T   1% /data

Thursday, June 13, 2013

Mount Linux directory on Windows using Samba

I am writing this article for those who are interested in doing SAMBA share configuration between Linux and Windows machines. At the end of this article you will also find the steps to mount a Windows shared folder on Linux server using CIFS (common internet file system).

Samba Overview:
---------------
1. Uses Session Message Block (SMB) protocol. 
2. The most typical reason to use Samba is to allow windows machine and linux machine to interact.
3. Simple to Complex configurations.
4. Easy to manage as there is one main Samba Configuration file /etc/samba/smb.conf

We are going to setup a Oracle Linux box so that certain directories and files are shared and we can control how they are shared weather it should be read only or read write. Then from the windows machine we can access that linux share and vice versa. You can also interact between two linux machines using Samba protocol.

Smb.conf layout:
----------------
There are 4 special sections in Samba configuration files as given below,

[global] Global Configuration Settings
[homes] Shares users home directories -> Any setting in home section will override the global settings.
[printers] Define shared printer access
[userdefined] This will be a user defined section

step1:
cd /u01
mkdir expdump
chmod 777 expdump/
chown -R oracle:oinstall /u01/expdump


step2: Example of a user defined section is as given below,
[expdump]
comment = Export Datapump dump location
path = /u01/expdump
available = yes
valid users = oracle

readonly = no
browsable = yes 

public = yes
writable = yes


There are zillion (exaggerating) more parameters used for different settings like require passwords, limit by host, limit by time of day etc.

step3:
service smb restart --> Restart the samba service.
smbpasswd -a oracle ---> this will add new user for samba which is different from OS user oracle.

step4: Now you can go to windows server and map network drive for \\linuxservername\expdumpshare folder. This way the linux shared folder is accessible from windows machine and vice versa.

Installing Samba
Login in as root and query if the following rpm's are installed or not if the following packages are not available then firstly install them using rpm command,

#rpm -ivh 

[root@egdodb samba]# rpm -qa | grep xinetd
xinetd-2.3.14-10.el5

[root@egdodb samba]# rpm -qa | grep samba
samba-common-3.0.33-3.7.el5
samba-3.0.33-3.7.el5
samba-common-3.0.33-3.7.el5
samba-client-3.0.33-3.7.el5
system-config-samba-1.2.41-3.el5

Configuring Samba:
------------------
You can configure samba by various ways, like manually updating the smb.conf file, using yast utility on suse linux, using SWAT Samba Web Admin Tool and using 'webmin' web based tool. The following is the manual way of updating the smb.conf file,

Update the smb.conf file manually and then run the 'testparm' command to validate the smb.conf file entries,

[root@egdodb samba]# testparm smb.conf

Load smb config files from smb.conf
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
workgroup = MYGROUP
server string = Samba Server Version %v
passdb backend = tdbsam
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No


Mounting Windows share on Linux server using CIFS

The following are the steps to mount a windows shared folder (\\filesrv\LOGDIR) on linux machine.

[root@egpodb01 tmp]# cd /tmp
[root@egpodb01 tmp]# mkdir logdump
[root@egpodb01 tmp]# chmod 777 logdump
[root@egpodb01 tmp]# mount -t cifs //filesrv/LOGDIR -o username=samimalik,password=***** /tmp/logdump
[root@egpodb01 tmp]# df -h /tmp/logdump/
Filesystem                Size    Used   Avail   Used%     Mounted on
//filesrv/LOGDIR     100G  50G    50G     50%        /tmp/expdump

Monday, March 18, 2013

grep usage in unix

To search multiple strings or words using the grep command


1. Grep OR Using \|

[oracle@igrexanwh001d02 OPatch]$ /u01/app/grid/11.2.0.3/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0.3.IREBSCNV
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.3.IREBSCNV/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.IREBSCNV/cfgtoollogs/opatch/opatch2013-03-18_09-50-20AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0.3.IREBSCNV/cfgtoollogs/opatch/lsinv/lsinventory2013-03-18_09-50-20AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.3.0
There are 1 products installed in this Oracle Home.


Interim patches (7) :

Patch  15876003     : applied on Sun Mar 03 11:53:57 GMT 2013
Unique Patch ID:  15750731
Patch description:  "QUARTERLY CRS PATCH FOR EXADATA (JAN 2013 - 11.2.0.3.14) : (15876003)"
   Created on 11 Jan 2013, 22:52:11 hrs PST8PDT
   Bugs fixed:
     15876003, 14275572, 13919095, 13696251, 13348650, 14407395, 12659561
     13039908, 14277586, 13987807, 14625969, 13938166, 13825231, 13036424
     12794268, 13011520, 13569812, 12758736, 13000491, 13498267, 13077654
     13001901, 13550689, 13430715, 13806545, 13634583, 11675721, 14082976
     14271305, 12771830, 12538907, 13947200, 12996428, 14102704, 13066371
     13483672, 12594616, 13879428, 13540563, 12897651, 12897902, 13241779
     12896850, 12726222, 12829429, 12728585, 13079948, 12876314, 13090686
     12925041, 12995950, 13251796, 12650672, 12398492, 12848480, 13582411
     13652088, 12990582, 13857364, 12975811, 12917897, 13653178, 13082238
     12947871, 13037709, 13371153, 12878750, 10114953, 11772838, 13058611
     13001955, 14001941, 11836951, 12965049, 13440962, 12765467, 13727853
     13425727, 12885323, 13965075, 13339443, 12784559, 14242977, 13332363
     13074261, 12971251, 13811209, 12709476, 14168708, 14096821, 13993634
     13460353, 13523527, 12857064, 13719731, 13396284, 12899169, 13111013
     12558569, 13323698, 12867511, 12639013, 10260842, 12959140, 13085732
     12829917, 10317921, 13843080, 12934171, 12849377, 12349553, 13924431
     13869978, 12680491, 12914824, 13789135, 12730342, 13334158, 12950823
     10418841, 12832204, 13355963, 13531373, 13776758, 12720728, 13620816
     13002015, 13023609, 13024624, 12791719

Patch  15835102     : applied on Sun Mar 03 11:47:48 GMT 2013
Unique Patch ID:  15750731
Patch description:  "QUARTERLY DATABASE PATCH FOR EXADATA (JAN 2013 - 11.2.0.3.14) : (15835102)"
   Created on 26 Dec 2012, 04:43:45 hrs PST8PDT
   Bugs fixed:
     14653598, 13332439, 13498646, 14198511, 14043417, 12625563, 13602883
     12904429, 12831782, 14841409, 12793917, 14624146, 12791981, 12646784
     12830174, 12857027, 13554409, 13717748, 13879553, 12585543, 12425262
     12794305, 13629469, 14342378, 13942462, 12594032, 14507915, 13863326
     12656535, 12938841, 14362875, 13440068, 13652437, 15862020, 13912192
     14127231, 13550185, 13720544, 14465787, 13657460, 14226599, 14516040
     13599864, 14063280, 12861463, 12913987, 10214323, 14251170, 12912297
     13040943, 13457582, 13776598, 13784384, 7276499, 13515918, 13580513
     14263073, 13732226, 13430938, 12953092, 13089313, 14207163, 13080778
     13871495, 15853081, 13903046, 11063191, 11896575, 14334353, 12979199
     14480674, 13484963, 14506367, 12984935, 12939232, 12879027, 13989185
     14292825, 10263668, 14098509, 13705338, 14023636, 13467683, 11837095
     13026410, 14589750, 13388104, 14548763, 13879579, 13344323, 10287724
     13054713, 13399435, 14062797, 13976144, 13700577, 14113740, 12391034
     13103913, 12328803, 14258925, 13906496, 14222403, 13923374, 14633213
     13718279, 14205448, 14521920, 13355095, 13098318, 12771704, 12889054
     13814905, 13719081, 12945290, 13421009, 13409719, 13945708, 9703627
     11929808, 12905058, 11708510, 13743987, 13837105, 13986244, 13256841
     14034244, 13742437, 14527701, 12621588, 12837280, 12960279, 12971775
     13727644, 13328193, 13354082, 14005749, 14052474, 13645917, 14153033
     12764658, 15862016, 12833442, 14114792, 14013094, 13657605, 13901039
     13011409, 13632809, 13528551, 14698700, 8547978, 13742435, 13466801
     14088346, 13429678, 12556843, 14132953, 13070939, 15951085, 13979519
     12929644, 14741727, 13362079, 14301592, 14062792, 13909322, 12918738
     13099577, 13917937, 13566938, 12757532, 13775960, 10297948, 13242070
     13742436, 13871547, 13913630, 12358083, 12913474, 13812031, 14654284
     13575265, 14301697, 12780983, 12898733, 13725395, 9163477, 10136532
     12401111, 13477790, 14546673, 12971388, 9906567, 12325317, 14098382
     12582664, 14153464, 13882317, 9873405, 12974860, 12693573, 12766987
     13901133, 14348839, 13714302, 13358781, 12658411, 12618817, 9095696
     14117976, 13397256, 14671833, 14143451, 13426605, 11840910, 13448247
     13257247, 14174174, 13476583, 13593999, 12966665, 14546575, 14062793
     10625145, 13816397, 14651753, 13527323, 12940620, 14317360, 12718090
     13035360, 13579992, 13343438, 12780098, 13001379, 10133521, 12848798
     14506175, 13936424, 13544396, 13742434, 14587310, 13572659, 12637294
     12900077, 12873183, 13395403, 12950694, 12894807, 14029050, 13927155
     12350994, 14262913, 12899768, 14480676, 13559697, 13722707, 13326736
     13804294, 14175146, 14182835, 13483354, 10182005, 9876287, 12794025
     10418524, 9847699, 14561651, 12849688, 13632717, 12890501, 11071989
     15862023, 12772404, 12834027, 11855445, 12922105, 14499293, 13687870
     12586845, 13370330, 13902316, 12723359, 12959852, 13649031, 13036331
     12944766, 13553883, 13493847, 13839641, 13464002, 13117043, 13929853
     12693626, 10350832, 13851078, 12847466, 13023541, 12974145, 13742433
     13719292, 13612575, 13642207, 10305573, 13811172, 14062795, 13340960
     13718476, 12678920, 13063120, 12353494, 12731940, 13352237, 13961338
     9659614, 13506110, 12925089, 13524237, 13495307, 15862018, 14467061
     12876939, 12780993, 13715680, 14071518, 13419747, 12325243, 13524698
     12595561, 12917230, 13769887, 14668670, 13384397, 13253549, 14207317
     12998795, 12953743, 14473913, 10248538, 15862017, 13329145, 13685544
     13790109, 12748240, 13032258, 12620823, 13711695, 13366202, 14482905
     13624984, 12709059, 13038684, 12345082, 14008285, 13584130, 12880299
     14042380, 13499128, 13364795, 13787482, 13860201, 12617123, 13422949
     12924835, 11877623, 14294123, 14007968, 12564614, 13340388, 13998753
     12535346, 11841048, 13629056, 13259364, 12923168, 14607573, 12748795
     13737746, 13918644, 13564720, 13384182, 14390252, 14038787, 12662040
     9761357, 13645875, 14062796, 12960925, 13470240, 14050233, 14052871
     13773133, 12734325, 3522216, 13516727, 14409183, 13916709, 12842402
     14314239, 14144283, 14218148, 13853916, 13902963, 14275605, 14016187
     12685263, 13912642, 14287564, 12698747, 14215134, 10332676, 12983611
     13022416, 14119388, 13000553, 15862024, 12536287, 12778873, 15862019
     13502183, 12866794, 13471777, 13533487, 13742438, 12628286, 12717125
     12768840, 12797420, 11715084, 13041324, 12387467, 12714023, 13350245
     12612118, 12900964, 13074706, 10387201, 13767790, 14546638, 13958038
     12591252, 13440516, 13887875, 12627504, 12797765, 13111630, 14292987
     13457537, 13699124, 13981051, 13492735, 13772618, 13503598, 12829021
     13968438, 14664355, 13588248, 12749597, 8316255, 13345786, 12964067
     13419660, 14097127, 13146719, 12583611, 12591399, 14309390, 13035804
     9706792, 13898864, 14402514, 15862021, 13146182, 13503766, 13385346
     12312133, 6445864, 13716797, 14744263, 12920172, 13807411, 13880971
     14469008, 14291951, 14063281, 14125317, 12865902, 14508968, 13801740
     12899094, 12960455, 13914613, 9782075, 14299365, 14366237, 14110275
     11717119, 13040331, 13997862, 13420224, 11868640, 13250244, 13573203
     13505390, 14356507, 12326708, 14014434, 13911821, 12978794, 12596444
     12675009, 12919564, 12614359, 14293031, 9858539, 14557588, 14237793
     13454210, 13786778, 14062794, 12764337, 14478870, 12539239, 13448206
     14040433, 12748538, 14076523, 14128555, 13358531, 14176879, 14480675
     12641849, 13059165, 14613900, 14692460, 14578331, 14393900, 14512189
     13534412, 13910420, 13742464, 13377816, 13397104, 13079417, 13004894
     13696023, 12672969, 13642044, 13478060, 12655301, 12976376, 14280879
     14041920, 14112837, 13524899, 13786142, 12845115, 15862022, 14263036
     12910565, 13780816, 13696216, 13548053, 14727310, 13724193, 14035825
     12950644, 12588744, 9725536, 13338048, 14138130

Patch  4247037      : applied on Thu May 10 21:45:42 IST 2012
Unique Patch ID:  14211388
   Created on 17 SEP 2009, 09:52:00 hrs US/Pacific
   Bugs fixed:
     4247037

Patch  13366268     : applied on Thu May 10 21:44:31 IST 2012
Unique Patch ID:  14394336
   Created on 21 Dec 2011, 08:14:06 hrs PST8PDT
   Bugs fixed:
     13366268

Patch  13258936     : applied on Thu May 10 21:43:30 IST 2012
Unique Patch ID:  14465000
   Created on 5 Dec 2011, 02:41:32 hrs PST8PDT
   Bugs fixed:
     13258936

Patch  12985184     : applied on Thu May 10 21:38:43 IST 2012
Unique Patch ID:  14296756
   Created on 30 Nov 2011, 15:18:06 hrs PST8PDT
   Bugs fixed:
     12985184

Patch  12960302     : applied on Thu May 10 21:36:56 IST 2012
Unique Patch ID:  14254250
   Created on 10 Nov 2011, 02:40:18 hrs PST8PDT
   Bugs fixed:
     12960302



Rac system comprising of multiple nodes
  Local node = igrexanwh001d02
  Remote node = igrexanwh001d01
  Remote node = igrexanwh001d03
  Remote node = igrexanwh001d04

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

OPatch succeeded.
[oracle@igrexanwh001d02 OPatch]$ /u01/app/grid/11.2.0.3/OPatch/opatch lsinventory | grep '4247037\|12942119\|12960302\|12985184\|13258936\|13366268\|14313519'
Patch  4247037      : applied on Thu May 10 21:45:42 IST 2012
     4247037
Patch  13366268     : applied on Thu May 10 21:44:31 IST 2012
     13366268
Patch  13258936     : applied on Thu May 10 21:43:30 IST 2012
     13258936
Patch  12985184     : applied on Thu May 10 21:38:43 IST 2012
     12985184
Patch  12960302     : applied on Thu May 10 21:36:56 IST 2012
     12960302

From above output, we can conclude that Patch 12942119 & 14313519 is not applied.


2. Grep OR Using -E

you could also use [oracle@igrexanwh001d02 OPatch]$ /u01/app/grid/11.2.0.3/OPatch/opatch lsinventory | grep -E '4247037|12942119|12960302|12985184|13258936|13366268|14313519' which will give you the same result.


3. Grep OR Using egrep

egrep is exactly same as ‘grep -E’. So, use egrep (without any option) and separate multiple patterns for the or condition.

egrep 'pattern1|pattern2' filename


4. Grep AND Opertion

$ grep -E ‘pattern1.*pattern2′ (with order)

$ grep -E 'pattern1.*pattern2|pattern2.*pattern1' filename (without order)


Some more grep options,

grep -v you can list down all files which doesn't contains a word i.e. excluding files which matches a pattern

cat textfile.txt | grep -v “Hello”
World

grep -c will print count of matching pattern in a file etc

cat textfile.txt | grep -c “Hello”
3

grep -i for case insensitive

cat textfile.txt | grep -i “Hello”
grep -i “Hello” textfile.txt


More options, I'l mention as I discover in future... :)