Sponsored Content
Full Discussion: Space Issue
Top Forums UNIX for Advanced & Expert Users Space Issue Post 302770393 by DGPickett on Friday 15th of February 2013 02:09:25 PM
Old 02-15-2013
Deleted files on NFS if still open are renamed in place to a funny .nfs* name, and other open deleted files used to go to /mount-point/lost+found/ You might be able to see them using lsof, and kill the processes that are holding them. On some systems the deleted files are still linked in /proc/$$/ or the like. If the files are still alive somewhere, you can run fuser on them to find using procs. To see where visible space is, I do something like this:
Code:
sort -nrm <( du -dk /mount-point | sort -nr | sed 's/$/\//' ) <( find /mount-point -mount -type f | xargs -r du -k | sort -nr )|pg

However, it misses big directories. du forgets them. Just for big directories, use something like this (reports in pages):
Code:
find /mount-point -mount -type d | xargs -r ls -sd | sort -nr | pg

There is no utility to shrink huge directories, but something like this is good if there is no white space in entry names and the directory is quiescent:
Code:
mkdir /huge_path'X'
ls -A /huge_path | ( cd /huge_path ; mv `cat` /huge_path'X' )
rmdir /huge_path
mv /huge_path'X' /huge_path

Huge directories are many ways bad.

Last edited by DGPickett; 02-15-2013 at 03:21 PM..
This User Gave Thanks to DGPickett For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Space issue with Directory

Hi, How can I check whether a directory has enough space to create file? I have checked the space is availabe in the file system. For example: the directory /var/tmp resides in root file system. In the root file system currently 20% (5.5gb) space availabe. but how can I check the in the /var/tmp,... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

2. UNIX for Dummies Questions & Answers

Need help with space issue

Ok, I have a drive on my unix system that looks like this: /dev/hd4 0.38 0.00 100% 4316 3% / I can't find any file on that drive that would account for the 400MB. How can I thoroughly find the culprit of this space? I've done ls -al, but don't see anything that... (1 Reply)
Discussion started by: bbbngowc
1 Replies

3. Filesystems, Disks and Memory

Issue available disk space while using xdd

Good morning, I seem to be running into an issue with some drives I have attached to my solaris server. The drives are attached correctly, the partitions are arranged with fdisk, the ext3 filesystem is setup using mkfs, and finally the drive is mounted. When I use xdd to perform read/write... (3 Replies)
Discussion started by: mrpogo07
3 Replies

4. UNIX Desktop Questions & Answers

Issue with disk space usage

Issue with disk space usage I have the following line in my "df -h" output: Filesystem Size Used Avail Capacity Mounted on /dev/ad4s1a 496M 495M -39M 109% / What is the issue with having 9% excess utilisation? How can I find out what this partition is... (2 Replies)
Discussion started by: figaro
2 Replies

5. Shell Programming and Scripting

extra space issue with awk

for diskname in $(lspv |awk '{print $1}') do lquerypv -h /dev/|awk '/'$diskname'/ { print ; exit }' done No output is returning from the loop. I think awk put an extra space to the command - lquerypv -h /dev/ so that the command is executed as i.e. lquerypv -h /dev/ hdisk230 with a space... (7 Replies)
Discussion started by: Daniel Gate
7 Replies

6. Solaris

swap space issue

HI All, Recently during oracle install I realized that I did not have enough swap space. So I - 1. Created a swap file "swap_fille1" in /rpool using mkfile - # ls -ltr /rpool total 10487121 drwxr-xr-x 3 root root 3 Dec 21 12:09 boot drwxr-xr-x 2 root root ... (10 Replies)
Discussion started by: sumeet
10 Replies

7. Shell Programming and Scripting

Combine 2 line with space issue

Hello all, i am new to linux , and please need your help and suggestion on.... when vi 1.txt :set list, it looks like $ is displaying the end of line Filter: vlan1-BUM-1M $ BUM-1M 0 ... (4 Replies)
Discussion started by: samoptimus
4 Replies

8. HP-UX

Swap space issue.

Hi, I am not sure how many scripts / java processes running on my HP-UX server. I need to calculate the total heap of these processes. I then need to recommend increasing the swap memory to be increase and equal to total heap if that is the right concept. Currently we are facing... (2 Replies)
Discussion started by: mohtashims
2 Replies

9. UNIX for Advanced & Expert Users

Swap space issue

I have Solaris-10 with mutiple zones running in it. My Big Brother monitoring is complaining for very less swap space available, but I am not able to find, what process has consumed its swap space and how to clear it. All zones including global server have almost blank /tmp with very less data.... (3 Replies)
Discussion started by: solaris_1977
3 Replies

10. Solaris

Solaris 8 metainit space issue

I am trying to create soft partition metaclear -r d109 metainit d109 -p d100 -o 178423817 -b 33554432 After i did this i saw the df -k /dev/md/dsk/d109 0 779600337 0 0% /test df -k shows that it is full? also i have tried adding no logging entry in /etc/vfstab... (0 Replies)
Discussion started by: gull05
0 Replies
FUSER(1)						    BSD General Commands Manual 						  FUSER(1)

NAME
fuser -- list IDs of all processes that have one or more files open SYNOPSIS
fuser [-cfkmu] [-M core] [-N system] [-s signal] file ... DESCRIPTION
The fuser utility writes to stdout the PIDs of processes that have one or more named files open. For block and character special devices, all processes using files on that device are listed. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, jail root directory, active executable text, kernel trace file or the controlling terminal of the process. If -m option is specified, the fuser utility will also look through mmapped files. The following options are available: -c Treat files as mount point and report on any files open in the file system. -f The report must be only for named files. -k Send signal to reported processes (SIGKILL by default). -m Search through mmapped files too. -u Write the user name associated with each process to stderr. -M Extract values associated with the name list from the specified core instead of the default /dev/kmem. -N Extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. -s Use given signal name instead of default SIGKILL. The following symbols, written to stderr will indicate how files is used: r The file is the root directory of the process. c The file is the current workdir directory of the process. j The file is the jail-root of the process. t The file is the kernel tracing file for the process. x The file is executable text of the process. y The process use this file as its controlling tty. m The file is mmapped. w The file is open for writing. a The file is open as append only (O_APPEND was specified). d The process bypasses fs cache while writing to this file (O_DIRECT was specified). s Shared lock is hold. e Exclusive lock is hold. EXIT STATUS
The fuser utility returns 0 on successful completion and >0 otherwise. EXAMPLES
The command: ``fuser -fu .'' writes to standard output the process IDs of processes that are using the current directory and writes to stderr an indication of how those processes are using the directory and user names associated with the processes that are using this directory. SEE ALSO
fstat(1), ps(1), systat(1), iostat(8), pstat(8), vmstat(8) STANDARDS
The fuser utility is expected to conform to IEEE Std 1003.1-2004 (``POSIX.1''). HISTORY
The fuser utility appeared in FreeBSD 9.0. AUTHORS
The fuser utility and this manual page was written by Stanislav Sedov <stas@FreeBSD.org>. BUGS
Since fuser takes a snapshot of the system, it is only correct for a very short period of time. When working via kvm(3) interface the report will be limited to filesystems the fuser utility knows about (currently only cd9660, devfs, nfs, ntfs, nwfs, udf, ufs and zfs). BSD
May 13, 2011 BSD
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy