Link to home
Start Free TrialLog in
Avatar of hi4ppl
hi4ppl

asked on

My oracle parition is out of space in linux centos

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
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

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
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.
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.
Avatar of hi4ppl
hi4ppl

ASKER

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
Avatar of hi4ppl

ASKER

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
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)
Avatar of hi4ppl

ASKER

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
RMAN> delete expired archive log all;
Avatar of hi4ppl

ASKER

Hi, any risk on this? should I consider shutting down the file or not?
Probably seek documentation if you dont intend to delete all backups, but say delete ssome older ones, otherwise deletion causes no impact on database.
Avatar of hi4ppl

ASKER

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/
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hi4ppl

ASKER

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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hi4ppl

ASKER

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hi4ppl

ASKER

Okay thanks, is there any way I can change the location of redolog without shutting down the database?
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.
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.
Avatar of hi4ppl

ASKER

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?
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.
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.
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.
Avatar of hi4ppl

ASKER

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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hi4ppl

ASKER

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

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.
Avatar of hi4ppl

ASKER

Okay thanks I will check and replay back...