Arquivo

Archive for fevereiro \17\UTC 2009

Espaço não liberado após apagar arquivos – Red Hat Linux

fevereiro 17, 2009 Deixe um comentário

Why is space not freed from disk after I delete a file?Article ID: 2317 – Created on: Jun 26, 2007 6:00 PM – Last Modified: Nov 15, 2007 6:00 PM Release Found:

All releases of Red Hat Enterprise Linux.

Symptom:

Disk space not freed from disk after a file is deleted.

Reason:

On Linux, deleteing a file via “rm” or through a application will remove the file from file list on disk; but if the file is kept open by a process, it will still be visible to this process and occupies space on disk.

Warning:

Do not delete files which have been deleted, but are still in use by an application for security reasons.

Solution:

Obtain a list of deleted files which are still help open by applications.

$ /usr/sbin/lsof|grep deleted
ora 25575 data 33u REG 65,65 4294983680 31014933 /oradata/DATAPRE/UNDOTBS009.dbf (deleted)

From lsof output, we find process with pid 25575 has kept file /oradata/DATAPRE/UNDOTBS009.dbf open with file descriptor (fd) number 33.

To free space occupied by this deleted file use the comman below

$ touch > /proc/pid/fd_number

For eaxmple, from the lsof output above

$ file /proc/25575/fd/33
/proc/25575/fd/33: broken symbolic link to `/oradata/DATAPRE/UNDOTBS009.dbf (deleted)’
$ touch > /proc/25575/fd/33

fonte: http://kbase.redhat.com/faq/docs/DOC-2317

Anúncios
Categorias:LINUX

Procedimento para limpar o cache da Memória do Linux.

fevereiro 17, 2009 Deixe um comentário

Limpar cache da memóra

echo 3 > /proc/sys/vm/drop_caches

Categorias:LINUX Tags: