Solved

My oracle parition is out of space in linux centos

Posted on 2015-01-19
29
62 Views
Last Modified: 2016-06-18
Hi,

my oracle space is almost in 82% in Linux, and a lot of operation is running, can you tell me how to increase that or possible shrink the other drive I have and add it to oracle?

there is alot of operation is running and I don't have choice of stopping the oracle and do it that way bellow is details, I can empty the sdb1 and add the space in sda1 for oracle but i don't know how to do it in linux.

Filesystem           Size  Used Avail Use% Mounted on
/dev/sda2             97G   20G   73G  21% /
tmpfs                 16G     0   16G   0% /dev/shm
/dev/sdb1            275G  230G   31G  89% /Backup
/dev/sda1            163G  127G   28G  83% /ORACLE
192.168.10.15:EXTERNAL/   35T  2.9T   32T   9% /Backup/nas

Open in new window


thanks for help
0
Comment
Question by:hi4ppl
  • 12
  • 6
  • 6
  • +2
29 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40557705
all depends on what storage you have
are these disks local or on a san?
is this a physical or virtual server?
are there any unallocated disks or space on existing disks?
you can't just empty sdb1 and add to sda1; two different disks
0
 
LVL 61

Expert Comment

by:gheist
ID: 40558165
Can you post fdisk -l /dev/sda?
If oracle partition is last on the disk (unlikely given it is sda1) than you can resize using install media if you add disk and your RAID allows non-destructive growth.
0
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 40558437
You may be able to safely delete some log or trace files that may (or may not) be consuming a lot of space in your /ORACLE partition now.

If you log in to Oracle with SQL*Plus, do:
show parameter diagnostic%
or show parameter %dump_dest

This will show you the full path that Oracle uses to write log and trace files for the database.  Check that directory to how many files are there, how old some of them are and how much space they use.  You can likely delete a lot of older files there, and that may recover quite a bit of space.

Some other options that you can do without shutting down the database are:
1. Create a new "temp" tablespace on your /dev/sda2 partition.  Then make this new temp tablespace the default temporary tablespace for your database, and do "alter user ... temporary tablespace [new temp tablespace;" commands for each user in your database.  You will then have to wait until any/all current sessions that are using "temp" space log out, but then you will be able to drop the current temp tablespace.
2. Change your "diagnostic_dump_dest" location to the /dev/sda2 partition.
3. Create new online redo log file groups on your /dev/sda2 partition, force some log switches, then drop the current on-line redo log groups.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559109
Hi,

My Table spaces for temp is not using that much, I try searching that but didn't get it where that much space is used, as you can see my table spaces are not using that much space, attached,

and here is the fdisk result

Disk /dev/sda1: 177.2 GB, 177153769472 bytes
255 heads, 63 sectors/track, 21537 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/sda2: 104.9 GB, 104857600000 bytes
255 heads, 63 sectors/track, 12748 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/sda3: 16.8 GB, 16777216000 bytes
255 heads, 63 sectors/track, 2039 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: 0x0000000

Open in new window

tablespaces.jpg
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559133
Hi, just to update most of the size is used under
oracle/product/11/db_1/dbs

there is files inside that all of them big files over 1GB each
0
 
LVL 61

Expert Comment

by:gheist
ID: 40559179
It means oracle database grew to that size.
Here is some writeup on options available:
http://oracle-base.com/articles/misc/reclaiming-unused-space.php
Basically move sparse tables to new tablespace to reclaim space, or even truncate tables.
If there is some lenghty historical table you might want to clean up old records.
So is resize an option? i.e what fdisk -l /dev/sda says? (ELL is the option)
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559215
Hi, thanks for replay, but there is many files under $ORACLE_HOME/dbs/arch and I don't know if I can delete or remove old files generated? or any other option to change destination of the archive log? in oracle
0
 
LVL 61

Expert Comment

by:gheist
ID: 40559223
RMAN> delete expired archive log all;
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559241
Hi, any risk on this? should I consider shutting down the file or not?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40559244
Probably seek documentation if you dont intend to delete all backups, but say delete ssome older ones, otherwise deletion causes no impact on database.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559293
Hi,

RMAN> delete expired archive log all;

did not work and when I did

RMAN> list expired archive log all;

it shows no archive log but yet I have around 3908 archive files under $ORACLE_HOM/dbs/arch/
0
 
LVL 61

Accepted Solution

by:
gheist earned 125 total points
ID: 40559391
You have to manually remove them as oracle/rman lost track of them and has no way to remove any of that.
I would approach very carefully checking if file is not open, or recently accessed. etc.
Check - maybe they are from same day when backup tape caught flames or so...
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559441
Hi, thanks I have files from October system timestamp that is written till now Jan 2015, so is it save to delete them manually files that is written on October-December?
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 250 total points
ID: 40559529
If the files have been safely backed up, then you should be able to delete them safely.  These files are crucial for recovery, so only remove them if you are 100% sure that they are safely backed up at least once.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 1

Author Comment

by:hi4ppl
ID: 40559638
Thanks for replay... yeah I have copied them already to an external drive... what my concern is that if I remove the files from here from system level will that crush my database? or does it have any effect in running operation or it's just required for recovery only?

as of now I need to clear storage for the database to run as of now it keep generating these filed every 5 minute(don't know if it's normal)... as there is one application running in top of this database so I don't' want to crush anything and work safely and remove files, backups or redo logs from that partition.

that is my main goal
0
 
LVL 34

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 125 total points
ID: 40559645
The files in the $ORACLE_HOME/dbs/arch directory are only needed if you need to recover your Oracle database from an old backup.  If you have a complete, recent backup, you can safely delete all of these older files, and keep only those from the latest backup or two.  Ideally your database and your Oracle backup would be configured so that "trace" files and "archived redo log files" from the database, plus any/all files created by RMAN get written to a disk device other than the one that has your active database files.  That way you are much less likely to risk filling up the disk or partition (or file system) where your active database files are.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559669
Okay thanks, is there any way I can change the location of redolog without shutting down the database?
0
 
LVL 34

Expert Comment

by:johnsone
ID: 40559719
Yes, they can be moved without shutting down.

Just to be clear are you trying to move the redo logs or the archived redo logs?  The procedure is different.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40559728
You need to shut down database, then you can move ("rename") redo logs to anywhere you want.
Quick fix is to shut down database
Move files to somewhere else
Then show them back with linux bind mount
And start database.

Either way DB Shut moving redo log files from one disk to another is unavoidable.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40559742
hi, i''m talking about this path $ORACLE_HOME/dbs/arch as it consumed around 80GB space and keep generating new files, I have copy all of these in external drive and now I want to delete them from system level am I save?
0
 
LVL 34

Expert Comment

by:johnsone
ID: 40559745
You can move redo logs without shutting down the database.  It is faster to do it with a shutdown, but it can be done without shutting down the database.

The overview is:

Offline one of the redo groups.
Move the file at the OS level
Rename the file in the database
Online the group

Repeat that process for each of the groups in the INACTIVE state.  Do them one at a time only.

Then do a switch log until one of the moved groups becomes active.

After unmoved groups become inactive (you have to wait for them to become archived), repeat the move process.

As a sanity check, when all are moved, do switch log file until you have gone through them all and make sure status on all groups and files is good.
0
 
LVL 34

Expert Comment

by:johnsone
ID: 40559750
The files that you are in the arch directory should be archived redo logs.  You can issue ALTER SYSTEM commands to change the location of those files while the system is online.  Be sure that you use SCOPE=BOTH so that the change persists across the next shutdown.
0
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 40559760
We don't know for sure what files you have in your $ORACLE_HOME/dbs/arch directory.  If these are "archived redo log files", then yes, you can safely delete any of them that are older than your last complet database backup.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40566259
Hi all, thanks for all your wonderful details... I would like to change the path of those logs from  $ORACLE_HOME/dbs/arch  to some NAS storage that I have which is big enough and don't bother about the size anymore... to do that I don't know from where I can change that, and steps would be appreciate it...

the other question I have is why this is being generated every 3 minutes, it amaze me and I don't get the point of generating archive log every 3 minutes ... any though in the same?
0
 
LVL 34

Assisted Solution

by:johnsone
johnsone earned 250 total points
ID: 40566282
Here is the documentation for setting the parameters -> http://docs.oracle.com/cd/E11882_01/server.112/e25494/archredo.htm#ADMIN00801  If you get all the way to the end of the section there are some full command examples.

The switches are not based on a timer.  They are based on when the redo logs are full and a new one is switched to automatically.  The easiest way to change the frequency is to increase the size of the log files.  This would involve creating at least one new group and then dropping the old groups and recreating them.  Not complicated, but involves some manual switches to get things to where they need to be.  If you do a search on increasing the size of the redo log you should find quite a few examples of how to do it.  It is an online operation, the database does not have to come down to do it.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40568050
Hello thanks for replay I have read the documentation it only show how to run it in archive mode or none archive mode and I Google and found following article with steps,

Archive log back up

and for me if I run the following command it will be fine right? since he is backing up to tape media as well.

alter system set log_archive_dest='LOCATION=/application/oracle/archive_New';

Open in new window

0
 
LVL 34

Expert Comment

by:johnsone
ID: 40568093
The link posted discusses the log_archive_dest parameters and what they do.  Many examples were given there.  If you made it all the way to the part titled Specifying Alternate Destinations, there are full command examples.  In fact, it shows the exact command you posted.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40582275
Okay thanks I will check and replay back...
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now