Handling inode on solaris 9


 
Thread Tools Search this Thread
Operating Systems Solaris Handling inode on solaris 9
# 1  
Old 06-29-2012
Handling inode on solaris 9

Dear all,
yesterday I had a big problem on Solaris 9. I cannot write anymore on /var. I checked the inode usage, and I see that for /var was at 100% with ifree = 0.
I deleted some unused files (like old log on /var/tmp and /var/log), now I have ifree=19641 and 99% iused:

Code:
root@ciy01 # df -F ufs -o i
Filesystem             iused   ifree  %iused  Mounted on
/dev/md/dsk/d10        11668  237100     5%   /
/dev/md/dsk/d50        69916  802404     8%   /usr
/dev/md/dsk/d20      2182215   19641    99%   /var
/dev/md/dsk/d40       157429 4348555     3%   /opt
/dev/md/dsk/d60           94  132962     0%   /export/home
/dev/md/dsk/d70           95 8476449     0%   /opt/oradata

Code:
root@root@ciy01 # df -g /var
/var               (/dev/md/dsk/d20   ):         8192 block size          1024 frag size  
36661588 total blocks   30028460 free blocks 29661846 available        2201856 total files
   19182 free files     22282260 filesys id  
     ufs fstype       0x00000004 flag             255 filename length

Honestly I don't see any other files to delete on /var (there's a ton of files, but all needed). What I can do now?
This is a production machine, so I have to be careful, and I cannot add any other disks, so, is there a way to restore/free other inode in /var

btw, this is what I seen on /var:

Code:
root@ciy01 var# ls -laibr
total 112
     14131 drwxr-xr-x   3 root     bin          512 Mar 18  2008 yp
     14142 drwxr-xr-x   7 uucp     uucp         512 Mar 18  2008 uucp
     12824 drwxrwxrwt   3 root     sys          512 Jun 29 17:12 tmp
        11 -rwxrwxrwx   1 root     root         387 Mar  3  2010 test.sh
     14166 drwxr-xr-x   4 daemon   daemon       512 Mar 18  2008 statmon
     12789 drwxr-xr-x  12 root     bin          512 Mar 18  2008 spool
     12849 drwxr-xr-x   3 root     sys          512 Mar 18  2008 snmp
     14152 drwxr-xr-x   4 root     bin          512 Mar 18  2008 samba
     12785 drwxr-xr-x   3 root     bin          512 Mar 18  2008 saf
         4 drwxr-xr-x  12 root     sys          512 May 21  2009 sadm
     12784 drwxr-xr-x   7 root     sys          866 Jun 29 02:06 run
     30082 drwxr-xr-x   3 root     root        1536 Jun 29 07:00 reports
     12783 drwxrwxrwt   3 root     bin          512 Mar 31  2008 preserve
      8833 drwxr-xr-x   6 root     sys          512 Mar 25  2008 opt
     14140 drwxr-xr-x   3 root     sys          512 Mar 18  2008 ntp
     14129 drwxr-xr-x   2 root     sys          512 Mar 18  2008 nis
     12827 drwxr-xr-x   2 root     bin          512 Jun 22  2005 nfs
      8832 drwxr-xr-x   2 root     bin          512 Jun 22  2005 news
     22241 drwx------   2 root     root         512 Jun 29 02:50 net-snmp
      8829 drwxrwxrwt   3 root     mail         512 Apr  1  2008 mail
     14126 drwxrwxr-x   3 lp       lp           512 Mar 18  2008 lp
         3 drwx------   2 root     root        8192 Jun 22  2005 lost+found
      8822 drwxr-xr-x   2 root     sys          512 Mar 22  2011 log
     14128 drwxr-xr-x   2 root     sys          512 Jun 22  2005 ldap
      8818 drwxr-xr-x   3 root     bin          512 Mar 18  2008 ld
     12826 drwxr-xr-x   2 root     sys          512 Jun 22  2005 krb5
      8817 drwxr-xr-x   2 root     sys          512 Jun 22  2005 inet
     14138 drwxr-xr-x   3 root     sys          512 Mar 18  2008 imq
     14172 drwxrwxrwt   2 bin      bin          512 Jul 29  2005 home
     14155 drwxr-xr-x   4 root     other        512 Mar 18  2008 gnome
     96297 drwxrwxrwx   4 root     root         512 Jun 29 17:12 getxms
     12828 drwxr-xr-x   6 root     root         512 Jun 29 02:04 dt
     12841 drwxr-xr-x   5 root     sys          512 Mar 18  2008 dmi
      8816 drwxr-xr-x   2 root     sys          512 Nov  2  2009 cron
     14170 drwxr-xr-x   4 root     root         512 Mar 18  2008 crash
   1518456 drwxrwxrwx   2 root     root         512 Jun 29 17:02 checkxms
     12855 drwxr-xr-x   9 root     bin          512 Mar 18  2008 apache
      8070 drwxrwxr-x  10 root     sys         1024 Jun 29 02:56 adm
         2 drwxr-xr-x  32 root     root        1536 Jun 29 17:12 ..
         2 drwxr-xr-x  39 root     sys         1024 Jun 29 11:31 .

Please help, I worked during all the last night to try to solve this issue!!!! Smilie

---------- Post updated at 11:26 AM ---------- Previous update was at 10:16 AM ----------

=========================================================

Well, I found tons of file under /var/spool/clientmqueue/
If I'm not wrong this is output from mail. I believe this directory was not clear from long time (at least 7/8 years).

The problem now, is that I cannot delete files inside it:

Code:
root@ciy01 clientmqueue# find /var/spool/clientmqueue/* -exec rm -f {} \;
Segmentation Fault - core dumped

or

Code:
# find /var/spool/clientmqueue/* -exec rm -f {} \;
/usr/bin/find: arg list too long

Could someone help me?

Last edited by Lord Spectre; 06-29-2012 at 12:27 PM..
# 2  
Old 06-29-2012
Try:
Code:
find /var/spool/clientmqueue -exec rm -f {} \;

# 3  
Old 06-29-2012
Thanks, I'm using the same command, except for "type" clause:

Code:
find /var/spool/clientmqueue -type f -exec rm {} \;

It's taking so long time, and I was curios how many files are on clientmqueue directory! Smilie

BTW, seem it's working:
Code:
Filesystem             iused   ifree  %iused  Mounted on
/dev/md/dsk/d20      1900704  301152    86%   /var

...seem it was deleted 300000 file so far Smilie
# 4  
Old 06-29-2012
If you do not want the empty directories (if any) lying around consuming significant amount of inodes, you may want to execute the following too:

Code:
find /var/spool/clientmqueue -depth -type d -exec rmdir '{}' \;

# 5  
Old 06-29-2012
Quote:
Originally Posted by Lord Spectre
Thanks, I'm using the same command, except for "type" clause:

Code:
find /var/spool/clientmqueue -type f -exec rm {} \;

It's taking so long time
This would have been faster:
Code:
find /var/spool/clientmqueue -type f -exec rm -f {} +

This User Gave Thanks to jlliagre For This Post:
# 6  
Old 06-29-2012
Does find on Solaris support + ? I thought that was a GNU-only feature.
# 7  
Old 06-29-2012
Quote:
Originally Posted by Corona688
Does find on Solaris support + ? I thought that was a GNU-only feature.
That find functionality first appeared in SVR4 (released late 1988/early 1989). Solaris does indeed support it. HP-UX has had it for a long time as well. All of the BSD finds support it. POSIX included it in their 2004 specification.

It's discussed at the end of the rationale section and mentioned in the change history of http://pubs.opengroup.org/onlinepubs...ties/find.html

Regards,
Alister
This User Gave Thanks to alister For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Is orphan process handling by Solaris os and Linux os same?

In solaris, orphan process is put to sleep mode and does not consume any CPU resources. In Linux, orphan process is kept in running state consuming all CPU and Ram resources. Is it the case? Is there a difference on how these operating systems will handle orphan processes? The route cause of... (10 Replies)
Discussion started by: Belure Pooja B
10 Replies

2. Solaris

Specify the inode of a file?

Is there any way to create a file on Solaris 10 (ZFS preferably, but UFS would be helpful as well) with a specific inode number? I need to create a file with a large inode, greater than a 32bit integer. I am trying to test a piece of software which may be incorrectly truncating large inodes down... (16 Replies)
Discussion started by: unblockable
16 Replies

3. UNIX for Dummies Questions & Answers

Inode usage

Environment: O.S Version HP-UX B.11.31 U ia64 What is the recommended Inode free nodes? On our server Unix Sys Admin, have setup warning email alert when % of I-node usage is above or equal at 5%. Sample Email: --------------------------------------------------- Subject: WARNING:... (6 Replies)
Discussion started by: Siva SQL
6 Replies

4. Solaris

inode in solaris

Dear, How can i check inode information in my Solaris box? With Regards, Mjoshi (4 Replies)
Discussion started by: mjoshi87
4 Replies

5. Solaris

inode table in sun solaris

Hi, I would like to is it possible to repair inode table in solaris without running fsck? I am facing this issue in root file system, because to run fsck I have to bring system in single user mode with booting cdrom media. I facing strange issue in /var/adm/messages it is showing inode table... (12 Replies)
Discussion started by: manoj.solaris
12 Replies

6. Solaris

Size of an inode in Solaris 10

Can anyone know what is the size of an inode in Solaris 10 :D? (5 Replies)
Discussion started by: naag20
5 Replies

7. Solaris

How to increase Inode numbers in Solaris 10

Hi guys, need your help on this since i dont know much about solaris. the problem is i need to increase inodes space on /export/home/ root@BRF-DANCCM1 # /usr/ucb/df -i Filesystem iused ifree %iused Mounted on /dev/vx/dsk/bootdg/rootvol 53026 1162206 ... (7 Replies)
Discussion started by: ichiko
7 Replies

8. AIX

FS inode 58%

Hi Guys, I have this filesystem got big with inode: /dev/hd4 3670016 183664 95% 63705 58% /var I don't know why the system doesn't give alerts on this FS although it's 95% and why the inode is 58%. Any comments will be highly appreciated. Thanks, itik (1 Reply)
Discussion started by: itik
1 Replies

9. Solaris

about inode

how can i see inode table information of a perticler inode.anybody knows pls tell me. Than.Q (3 Replies)
Discussion started by: nag.mi2000
3 Replies

10. Shell Programming and Scripting

INode

hi i am nitin... jus a new kid on the block... my query is... does the concept of region invovle sharin of inodes wen the sticky it is set... eg... if two process share two text regions... wat actually happens thank u (1 Reply)
Discussion started by: nitinsharma_ssn
1 Replies
Login or Register to Ask a Question