Início > LINUX > Espaço não liberado após apagar arquivos – Red Hat Linux

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

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
  1. Nenhum comentário ainda.
  1. No trackbacks yet.

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s