Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Df reporting double size of du after fsck & reboot

Solaris


Tags
du vs df, solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-07-2017   -   Original Discussion by lcoreyl
lcoreyl's Unix or Linux Image
lcoreyl lcoreyl is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 25 November 2017, 4:40 PM EST
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
Df reporting double size of du after fsck & reboot

Solaris 8
running on a Sparcstation 5 (Aurora) with 170MHz processor and 256MB ram

This is AFTER doing fsck and reboot.

820030k vs 385252k

All other files in /usr/asm not in /usr/asm/sys or /usr/asm/data amount to 43k. The /usr/asm/lost+found is 8k. somehow df and other applications flagging for disk full are seeing an extra 400000k, where is this?

this is run as superuser, so all hidden files should be shown right?


Code:
# uptime
 12:36pm  up 5 min(s),  1 user,  load average: 0.09, 0.17, 0.09
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t1d0s0      91813   19880   62752    25%    /
/dev/dsk/c0t1d0s6     752553  377132  315217    55%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/dsk/c0t1d0s3     245943   35200  186149    16%    /var
swap                  548972       8  548964     1%    /var/run
swap                  548972       8  548964     1%    /tmp
/dev/dsk/c0t1d0s7       1163       9    1038     1%    /scratch
/dev/dsk/c0t1d0s5     963333  820030   85504    91%    /usr/me
/dev/dsk/c0t1d0s4    1587331  618652  921060    41%    /usr/me/data
# du -ak /usr/me | sort -nr | more
1003950 /usr/me
618652  /usr/me/data
606344  /usr/me/data/user_data
485577  /usr/me/data/user_data/files
385252  /usr/me/sys
271662  /usr/me/data/user_data/files/WORK
213143  /usr/me/data/user_data/files/test
166175  /usr/me/sys/bin
141298  /usr/me/sys/bin/sun
113857  /usr/me/sys/lib
113855  /usr/me/sys/lib/sun
64060   /usr/me/data/user_data/r_database
63152   /usr/me/data/user_data/r_database/r_database
58453   /usr/me/data/user_data/files/test/359
47742   /usr/me/data/user_data/files/WORK/new
44413   /usr/me/data/user_data/batch_reports
36131   /usr/me/data/user_data/files/WORK/354
32758   /usr/me/data/user_data/batch_reports/WORK
28850   /usr/me/data/user_data/files/WORK/359
27955   /usr/me/data/user_data/files/test/358
25650   /usr/me/data/user_data/files/WORK/358
24876   /usr/me/sys/bin/vw
23282   /usr/me/data/user_data/files/WORK/355A-Z
21938   /usr/me/data/user_data/files/test/355-7
19114   /usr/me/data/user_data/files/test/353-4
18915   /usr/me/data/user_data/files/test/RD75X
17261   /usr/me/sys/FT
16935   /usr/me/sys/FT/tls

Sponsored Links
    #2  
Old Unix and Linux 10-08-2017   -   Original Discussion by lcoreyl
Scrutinizer's Unix or Linux Image
Scrutinizer Scrutinizer is online now Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 13 December 2017, 11:50 AM EST
Location: Amsterdam
Posts: 11,647
Thanks: 518
Thanked 3,385 Times in 2,984 Posts
Have look at this recent thread:
https://www.unix.com/unix-for-beginne...not-tally.html
Sponsored Links
    #3  
Old Unix and Linux 10-14-2017   -   Original Discussion by lcoreyl
lcoreyl's Unix or Linux Image
lcoreyl lcoreyl is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 25 November 2017, 4:40 PM EST
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
Fix:

Solved

I didn't see this in other threads, so my problem was someone copied a bunch of files into a folder that should just be used as a mounting point. Once mounted those files and folders are hidden to du, but df still sees it. Essentially, i did this:

Code:
# umount /dev/dsk/c0t1d0s4
#du -ak /usr/me | sort -nr | more
780000 /usr/me
400001  /usr/me/data
400000  /usr/me/data/hiddenstuff
#rm /usr/me/data/*
#mount /dev/dsk/c0t1d0s4 /usr/me/data
#df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t1d0s0      91813   19880   62752    25%    /
/dev/dsk/c0t1d0s6     752553  377132  315217    55%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/dsk/c0t1d0s3     245943   35200  186149    16%    /var
swap                  548972       8  548964     1%    /var/run
swap                  548972       8  548964     1%    /tmp
/dev/dsk/c0t1d0s7       1163       9    1038     1%    /scratch
/dev/dsk/c0t1d0s5     963333  380000   570000    40%    /usr/me
/dev/dsk/c0t1d0s4    1587331  618652  921060    41%    /usr/me/data

    #4  
Old Unix and Linux 10-16-2017   -   Original Discussion by lcoreyl
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 13 December 2017, 7:43 AM EST
Location: Lancashire, UK
Posts: 3,407
Thanks: 1,477
Thanked 669 Times in 602 Posts
Could I also advocate using the -x flag for du to ensure it does not cross into other filesystems below the start point you specify, e.g. /usr/me/data



Kind regards,
Robin
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ls directory size reporting byte size instead of file count jmgibby UNIX for Dummies Questions & Answers 2 01-02-2014 12:31 PM
unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c1t0d0s0) getrue Solaris 4 07-31-2012 01:28 PM
Kernel panic after hard reboot and fsck nikkadim Red Hat 22 07-08-2010 04:18 PM
Is fsck executed during reboot for AIX? cteoh88 AIX 2 04-22-2007 05:18 PM
remove files with 0 size, space and double qoute nongrad Shell Programming and Scripting 3 02-08-2002 03:32 PM



All times are GMT -4. The time now is 12:57 PM.