Operating System - HP-UX
1758784 Members
2895 Online
108875 Solutions
New Discussion юеВ

Quick way regain disk space please

 
SOLVED
Go to solution
Sharon Cowan
Occasional Contributor

Quick way regain disk space please

Hi All,
What is the quickest way to regain disk space.
My /u1 is at 94% and I have cleared out what I can safely. Until we are able to get new disks this has become a problem.
Any help will be much appreciated. This area holds our main files.
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor

Re: Quick way regain disk space please

Hi Sharon:

IF you have truly removed files you don't need, you should consider these options:

1) Compress (see man 'compress', for instance) files that you need to keep but not access routinely.

2) Create symbolic (soft) links of directories representing large amounts of storage and move the directory contents to another mountpoint (perhaps) on a different volume group or logical volume.

Regards!

...JRF...
Juan Manuel L├│pez
Valued Contributor

Re: Quick way regain disk space please

Hi,
You can compress the files:
compress

You can delete the olg log files that you are not ussing since a lot time ago.

beware, because if you delete a log file or a output file that a process is ussing, them you have delete only the file, so the log file or output file is still on memory. I suggest empty the file:
>
them delete
rm

Could you, please tell me the kind of files on your fs ? .

I hope this help you.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Jeff Schussele
Honored Contributor

Re: Quick way regain disk space please

Hi Sharon,

/u1 is a commonly used name for an Oracle extent. If that's the case here it may be that the Orcale DBAs have allocated the space but may have yet to reach capacity. If this is an Oracle data extent call the DBAs & inquire if they are truly running out of space.
If not Oracle then JRF's suggestions are good.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
MANOJ SRIVASTAVA
Honored Contributor

Re: Quick way regain disk space please

Hi Sharon


There are mnay options , but important is what have you got in /u01 . If it si real data which cannot be deleted then plan for lesser retention days .

1. ls -lR /u01 gives you a list of files under /u01 , store this directory in /tmp and view it to know which files are causing the problem.

2. Search for core files and delete them using find .

3.If you have another free sapce in some other partition you can link it to a direcorty under u01 so that it effectively increases the space ( if you files are gettign stored there).

4. Take a backup of the old files and delete them.


Generally if you have a feeling that some big file has eaten up space then may be you can search using awk for big file and delete them incase they are not required.



Manoj Srivastava
John Carr_2
Honored Contributor

Re: Quick way regain disk space please

Hi

I often find /stand has old copies of vmunix no longer required.

/var/adm/syslog is another favourite

cat /dev/null > /var/adm/wtmp

/var/adm/sw/save directory for copies of patches.


This may help a little.

John.

Deshpande Prashant
Honored Contributor

Re: Quick way regain disk space please

HI
If this is your real world day-to-day data, softlink to another place with space will help you. If this is archivable data use compress/pack or gzip to compress the files.

Thanks.
Prashant Deshpande.
Take it as it comes.
Roger Baptiste
Honored Contributor

Re: Quick way regain disk space please

hi,

It depends on what exists in the filesystem and who owns it. If it contains DBA or user stuff , you would need to involve them in the process.

Options are:
identify files which can be removed.
(core files, any temporary files).

identify files which can be temporarily removed, but only after backing them up. When filesystem is increased they can be restored back.

Compressing files/dir would mean that they cannot be used or accessed. During the process of compressing you would need extra space.

Make sure you get the owner of the directories involved in the process.

HTH
raj
Take it easy.
Roger Baptiste
Honored Contributor

Re: Quick way regain disk space please


You can start of by doing

find /u1 -type d -exec ll -d {} \;
find /u1 -exec ll {} \;

to get the list of files/directories/owners and sizes.

HTH
raj
Take it easy.
Juan Manuel L├│pez
Valued Contributor

Re: Quick way regain disk space please

What about the points !.
Thanks in advance.
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.