Sponsored Content
Operating Systems HP-UX Potential file system contention on directory Post 302469328 by DGPickett on Friday 5th of November 2010 01:35:56 PM
Old 11-05-2010
Huge directories with many users can be a big bottleneck. A basic UFS directory is a huge unsorted and unstructured pile of name-inode# pairs, so access is by brute force. Create a tree and move files down.

PS: You can only shrink a directory, once you thin it out, by recreating it: make a sibling directory new/ right beside it (same file system so links are legal), clone the contents by cpio pass with use links (less space, faster), make directories and preserve times and permissions, then rename to swap it out, and later remove orig/:
Code:
mkdir new
cd old_dir
find . |cpio -pdal ../new
cd ..
mv old_dir orig
mv new old_dir
#later
rm -rf orig

I tried this on my older PARISC HP-UX, and the rm was problematic because it was on an nfs mount and a (script) file was open (even though linked elsewhere, so this is a bug in rm or nfs), so it left a .nfs#### file until it was closed. I used:
Code:
fuser <file> <dir>
ps -fp <pid1>,<pid2>

to identify the processes holding the file open.

Last edited by DGPickett; 11-05-2010 at 02:43 PM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Distinction b/w file system and directory

Can you give a very basic definition of file system vs. directory in unix. The context is around monitoring for disk capacity maxing out. Why would /appl/sbe/inst_2/config/logs not be able to be because it is a directory but appl/cce can be monitored because it is a unix file system. They... (1 Reply)
Discussion started by: kd9626
1 Replies

2. UNIX for Dummies Questions & Answers

how many directory can be mounted on one file system

I have a question and seek help. How many directory can be mounted on one file system on UNIX with solaris 9? For example, I have one file system as /dev/dsk/cieit0a6. I have created one directory as /u01/app/oracle and mounted this directory to cieit06. It works. Then I create another directory as... (4 Replies)
Discussion started by: duke0001
4 Replies

3. UNIX for Dummies Questions & Answers

Potential new user of Unix

Hi all, Complete and utter virgin Unix person here (I don't even have the OS yet) As I'm doing a "looking into it" kinda thing before I move from MS I hope my questions are not inappropriate. 1. Should I get some kind off anti virus software. I know Unix is pretty good for not getting them... (2 Replies)
Discussion started by: dhula
2 Replies

4. Shell Programming and Scripting

Need to find the percentage of the directory in the file system.

Hi All, I want to find the percentage occupied by the directory in the file system. Say, i have the file system /home/arun/work under this file system i have the directories /home/arun/work/yesterday /home/arun/work/today /home/arun/work/tomorrow The size of the file system is... (5 Replies)
Discussion started by: Arunprasad
5 Replies

5. Shell Programming and Scripting

script to differenciate directory and file system

I need to write a script which will check all the directories in / and find out which is separate filesystem or a directory inside / suppose i have /application -->/dev/hdisk0 is a partitiom /abc --> is a directory /xyz-->is a directory /db-->/dev/hdisk1 is a partition actually my / gets... (2 Replies)
Discussion started by: pchangba
2 Replies

6. AIX

how to handle potential file contention

I need to change how a posting procedure currently works in order to improve load balancing but I am hitting a potential file contention problem that I was wondering if someone here could assist me with... In a directory called FilePool I would have a bunch of files that are constantly coming in... (3 Replies)
Discussion started by: philplasma
3 Replies

7. Cybersecurity

Attacking Potential of sh-scripts

Hey, I actually do have a question which seems rather easy for those you know more about this topic, since I am pretty new to bashscripting and don't know where it's limits are I have to ask you guys :) Imagine a system where all possible code execution methods (binary executables or... (15 Replies)
Discussion started by: disaster
15 Replies

8. Shell Programming and Scripting

Contention Identifier Script

Hi Experts, Need some help with a script which is definetly beyond my scripting skills. Here is flat file that I have with 4 Key Columns KEYCOLUMN1 KEYCOLUMN2 KEYCOLUMN3 KEYCOLUMN4 123ABC AEG MANCHESTER BIGBOX... (2 Replies)
Discussion started by: PG3
2 Replies
MOUNT.NFS(8)                                                  System Manager's Manual                                                 MOUNT.NFS(8)

NAME
mount.nfs, mount.nfs4 - mount a Network File System SYNOPSIS
mount.nfs remotetarget dir [-rvVwfnsh ] [-o options] DESCRIPTION
mount.nfs is a part of nfs(5) utilities package, which provides NFS client functionality. mount.nfs is meant to be used by the mount(8) command for mounting NFS shares. This subcommand, however, can also be used as a standalone command with limited functionality. remotetarget is a server share usually in the form of servername:/path/to/share. dir is the directory on which the file system is to be mounted. Under Linux 2.6.32 and later kernel versions, mount.nfs can mount all NFS file system versions. Under earlier Linux kernel versions, mount.nfs4 must be used for mounting NFSv4 file systems while mount.nfs must be used for NFSv3 and v2. OPTIONS
-r Mount file system readonly. -v Be verbose. -V Print version. -w Mount file system read-write. -f Fake mount. Don't actually call the mount system call. -n Do not update /etc/mtab. By default, an entry is created in /etc/mtab for every mounted file system. Use this option to skip making an entry. -s Tolerate sloppy mount options rather than fail. -h Print help message. nfsoptions Refer to nfs(5) or mount(8) manual pages. NOTE
For further information please refer nfs(5) and mount(8) manual pages. FILES
/etc/fstab file system table /etc/mtab table of mounted file systems SEE ALSO
nfs(5), mount(8), AUTHOR
Amit Gud <agud@redhat.com> 5 Jun 2006 MOUNT.NFS(8)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy