The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Missing / Hidden files in boot partition

Discussion in 'General Discussion' started by Website Rob, Jan 19, 2003.

  1. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    I've noticed disk space being used up within the &boot& partition.

    [/]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda1 45M 8.7M 34M 21% /boot

    [/]# du -h --max-depth=1
    4.7M ./boot

    That is what it stands at now and I don't understand why the two outputs are so different. I remember reading about how, when one does a Cpanel update it eats up disk space in &boot&. If so, I do not see any Cpanel files in there.

    Can anyone enlighten me on what is using up the disk space, but not showing it?
     
  2. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Come on now people, let's see the ol' team spirit here.

    Surely, someone knows the answer to this?
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Our's are only 1 meg off. But I still cannot answer you as to why. :)
     
  4. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    OK, that's a good start.

    Mine's bigger than yours :p but where does that get us free pizza???
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Why do "du" and "df" report different totals of used disk sp

    Maybe this might make sense somehow,

    Information from Sunsolve:

    There are 3 reasons why du and df can show different answers:

    1. Inconsistent fileystem requiring fsck(1m).
    2. Process with open file which does not exist in filesystem.
    3. Directory mount point containing data.

    Before going into detail for the 3 possibilities, it is important to recognize how du and df obtain their answers:

    - du &walks& the filesystem, checking the size of each file in turn, and keeping track of the total.

    - df makes a system call to the filesystem itself and requests a number of details, one of which is the current disk space used.

    1. Inconsistent fileystem requiring fsck(1m).

    If the filesystem becomes corrupt/inconsistent for some reason, it is quite likely that du and df will differ. What can be seen by a process looking at the filesystem (ie du), does not match up with the view the filesystem itself has (i.e. what will be returned to the querying df process).

    Corrupt/inconsistent filesystems should be repaired using fsck(1m).

    2. Process with open file which does not exist in filesystem.

    The disk blocks associated with a file are actually deleted and made available for reuse when the last &reference& to the file is removed. When a UNIX process opens a file, the reference count to that file is incremented. Subsequently, if the file itself is removed from the filesystem, the data blocks remain in use until the process closes the file, either explicitly with close(2), or implicitly when the process dies.

    Under these conditions, du will be unable to &see& the file in the filesystem, and therefore will not count the size, but df (in getting the answer from the filesystem itself) &knows& the file still exists.

    When the process closes the file (explicitly, or implicitly when the process either quits or is killed, or the machine is rebooted), the disk blocks will return to the freelist and du and df will agree.

    3. Directory mount point containing data.

    As filesystems are mounted on top of directories, if a directory mount point contains data, the du process will be unable to see this data (seeing only the mounted filesystem), but the underlying filesystem will still keep track of this data, consequently df will report the extra disk space in use.

    Unmounting the filesystem will reveal the data. However, if the mounted filesystem is being used by running processes it will not be possible to unmount it. Either identify and kill the processes (fuser(1m), etc), or reboot (possibly in single user mode) to check the mount point directory.
     
  6. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Excellent response, David!

    Now it's going take me a few days to figure out all that information. ;)
     
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Thanks very much :)

    You got that, it's kinda hard also to do some of the checks when you are dealing with a live box, a bigger pain is if you do not have console access.

    Bringing the server up in single user and having console would make it a lot easier to deal with.
     
Loading...

Share This Page