root partition full - Help

This is a discussion on root partition full - Help ; I was rsyncing to a usb drive and I got some errors and when I ran df, I noticed / is full: [wlott@homebase ~]$ df Filesystem Size Used Avail Use% Mounted on /dev/hda8 4.9G 4.8G 0 100% / /dev/hda1 46M ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: root partition full

  1. root partition full

    I was rsyncing to a usb drive and I got some errors and when I ran df, I
    noticed / is full:

    [wlott@homebase ~]$ df
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda8 4.9G 4.8G 0 100% /
    /dev/hda1 46M 6.9M 37M 16% /boot
    /dev/hda7 4.9G 35M 4.8G 1% /home
    /dev/hde7 4.9G 2.5G 2.5G 51% /mnt/ghost
    /dev/hdg1 111G 100G 5.3G 96% /mnt/mp3
    /dev/hde5 49G 39G 11G 79% /mnt/mpc
    /dev/hde6 21G 21G 667M 97% /mnt/sw
    /dev/hda9 61G 14G 44G 25% /mnt/userdata
    /dev/hda6 981M 91M 841M 10% /var

    What's the easiest way to find out what's using up my / partition?

    I tried du -s on each of the directories on /dev/hda8:

    /bin/ 5424
    /boot/ 2892
    /dev/ 2648
    /etc/ 17304
    /home/ separate partition
    /initrd/ 8
    /lib/ 30572
    /mnt/ separate partition
    /opt/ 4
    /proc/ 918920
    /root/ 2288
    /sbin/ 6432
    /sys/ 0
    /tmp/ 28
    /usr/ 832120
    /var/ separate partition
    Total 1818640

    That only adds up to 1.8 gb. What's using the other 3.1? Why is /proc
    so big. Is that normal?

    If it helps, here is /etc/fstab:

    [wlott@homebase ~]$ cat /etc/fstab
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    /dev/hda8 / ext3 defaults 1 1
    /dev/hda1 /boot ext3 defaults 1 2
    /dev/hda7 /home ext3 defaults 1 2
    /dev/hdc /mnt/cdrom iso9660 iocharset=iso8859-1,nosuid,ro,nodev 0 0
    /dev/fd0 /mnt/floppy auto umask=0,iocharset=iso8859-1,sync,codepage=850 0
    0
    /dev/hde7 /mnt/ghost vfat umask=0,iocharset=iso8859-1,codepage=850 0 0
    /dev/hdg1 /mnt/mp3 ext3 defaults 1 2
    /dev/hde5 /mnt/mpc vfat umask=0,iocharset=iso8859-1,codepage=850 0 0
    /dev/hde6 /mnt/sw vfat umask=0,iocharset=iso8859-1,codepage=850 0 0
    /dev/hda9 /mnt/userdata ext3 defaults 1 2
    none /proc proc defaults 0 0
    /dev/hda6 /var ext3 defaults 1 2
    /dev/hda5 swap swap defaults 0 0
    /dev/sda1 /mnt/HOMEBASE_BACKUP ext3
    pamconsole,exec,noauto,managed 0 0


    Thanks,
    Woody

  2. Re: root partition full

    In article , Woody wrote:

    >I was rsyncing to a usb drive and I got some errors and when I ran df, I
    >noticed / is full:
    >
    >[wlott@homebase ~]$ df
    >Filesystem Size Used Avail Use% Mounted on
    >/dev/hda8 4.9G 4.8G 0 100% /


    Yup - that looks full.

    >What's the easiest way to find out what's using up my / partition?


    More or less what you did.

    >I tried du -s on each of the directories on /dev/hda8:


    >/proc/ 918920


    Ignore this - /proc is a "fake" file system - your window into the kernel.
    It really does not exist.

    >That only adds up to 1.8 gb. What's using the other 3.1?


    du measures directory entries - df measures actual space in use at the
    moment which would include deleted (but in use) files.

    So the _likely_ answer is that you have some files that are still in use,
    but have been deleted. A real pain in the ass to find sometimes, but that's
    what 'fuser' and 'lsof' are meant for. Should be installed.

    [compton ~]$ whatis fuser lsof
    fuser (1) - identify processes using files or sockets
    lsof (8) - list open files
    [compton ~]$

    >Why is /proc so big. Is that normal?


    [compton ~]$ whatis proc
    proc (5) - process information pseudo-filesystem
    [compton ~]$

    Boy, I'm just full of 'RTFM' this evening, no? ;->

    Old guy

  3. Re: root partition full

    ibuprofin@painkiller.example.tld (Moe Trin) wrote in
    news:slrnd2fir8.f0q.ibuprofin@compton.phx.az.us:

    > In article , Woody
    > wrote:
    >
    >>I was rsyncing to a usb drive and I got some errors and when I ran df,
    >>I noticed / is full:
    >>
    >>[wlott@homebase ~]$ df
    >>Filesystem Size Used Avail Use% Mounted on
    >>/dev/hda8 4.9G 4.8G 0 100% /

    >
    > Yup - that looks full.
    >
    >>What's the easiest way to find out what's using up my / partition?

    >
    > More or less what you did.
    >
    >>I tried du -s on each of the directories on /dev/hda8:

    >
    >>/proc/ 918920

    >
    > Ignore this - /proc is a "fake" file system - your window into the
    > kernel. It really does not exist.
    >
    >>That only adds up to 1.8 gb. What's using the other 3.1?

    >
    > du measures directory entries - df measures actual space in use at
    > the moment which would include deleted (but in use) files.
    >
    > So the _likely_ answer is that you have some files that are still in
    > use, but have been deleted. A real pain in the ass to find sometimes,
    > but that's what 'fuser' and 'lsof' are meant for. Should be installed.
    >
    > [compton ~]$ whatis fuser lsof
    > fuser (1) - identify processes using files or sockets
    > lsof (8) - list open files
    > [compton ~]$
    >
    >>Why is /proc so big. Is that normal?

    >
    > [compton ~]$ whatis proc
    > proc (5) - process information pseudo-filesystem
    > [compton ~]$
    >
    > Boy, I'm just full of 'RTFM' this evening, no? ;->
    >
    > Old guy
    >


    It almost looks like the usb drive's mount point is counting against free
    space on /:

    [wlott@homebase /]$ sudo du -hx --max-depth=1
    1.0K ./boot
    4.0K ./var
    4.0K ./home
    4.0G ./mnt
    0 ./dev
    17M ./etc
    28K ./tmp
    2.3M ./root
    0 ./proc
    0 ./sys
    813M ./usr
    6.3M ./sbin
    30M ./lib
    5.3M ./bin
    8.0K ./initrd
    4.0K ./opt
    4.0K ./.mozilla
    4.8G .

    [wlott@homebase /]$ sudo du -hx --max-depth=1 /mnt
    4.0K /mnt/userdata
    32K /mnt/mpc
    16K /mnt/sw
    4.0K /mnt/ghost
    12K /mnt/mp3
    4.0K /mnt/floppy
    4.0K /mnt/cdrom
    4.0G /mnt/HOMEBASE_BACKUP
    4.0G /mnt

    usb drive isn't even mounted. why is its mount point 4G?

  4. Re: root partition full

    On Fri, 04 Mar 2005 03:11:59 GMT, Woody wrote:
    | ibuprofin@painkiller.example.tld (Moe Trin) wrote in
    | news:slrnd2fir8.f0q.ibuprofin@compton.phx.az.us:
    |
    |> In article , Woody
    |> wrote:
    |>
    |>>I was rsyncing to a usb drive and I got some errors and when I ran df,
    |>>I noticed / is full:
    |>>
    |>>[wlott@homebase ~]$ df
    |>>Filesystem Size Used Avail Use% Mounted on
    |>>/dev/hda8 4.9G 4.8G 0 100% /
    |>
    |> Yup - that looks full.
    |>
    |>>What's the easiest way to find out what's using up my / partition?
    |>
    |> More or less what you did.
    |>
    |>>I tried du -s on each of the directories on /dev/hda8:
    |>
    |>>/proc/ 918920
    |>
    |> Ignore this - /proc is a "fake" file system - your window into the
    |> kernel. It really does not exist.
    |>
    |>>That only adds up to 1.8 gb. What's using the other 3.1?
    |>
    |> du measures directory entries - df measures actual space in use at
    |> the moment which would include deleted (but in use) files.
    |>
    |> So the _likely_ answer is that you have some files that are still in
    |> use, but have been deleted. A real pain in the ass to find sometimes,
    |> but that's what 'fuser' and 'lsof' are meant for. Should be installed.
    |>
    |> [compton ~]$ whatis fuser lsof
    |> fuser (1) - identify processes using files or sockets
    |> lsof (8) - list open files
    |> [compton ~]$
    |>
    |>>Why is /proc so big. Is that normal?
    |>
    |> [compton ~]$ whatis proc
    |> proc (5) - process information pseudo-filesystem
    |> [compton ~]$
    |>
    |> Boy, I'm just full of 'RTFM' this evening, no? ;->
    |>
    |> Old guy
    |>
    |
    | It almost looks like the usb drive's mount point is counting against free
    | space on /:
    |
    | [wlott@homebase /]$ sudo du -hx --max-depth=1
    | 1.0K ./boot
    | 4.0K ./var
    | 4.0K ./home
    | 4.0G ./mnt
    | 0 ./dev
    | 17M ./etc
    | 28K ./tmp
    | 2.3M ./root
    | 0 ./proc
    | 0 ./sys
    | 813M ./usr
    | 6.3M ./sbin
    | 30M ./lib
    | 5.3M ./bin
    | 8.0K ./initrd
    | 4.0K ./opt
    | 4.0K ./.mozilla
    | 4.8G .
    |
    | [wlott@homebase /]$ sudo du -hx --max-depth=1 /mnt
    | 4.0K /mnt/userdata
    | 32K /mnt/mpc
    | 16K /mnt/sw
    | 4.0K /mnt/ghost
    | 12K /mnt/mp3
    | 4.0K /mnt/floppy
    | 4.0K /mnt/cdrom
    | 4.0G /mnt/HOMEBASE_BACKUP
    | 4.0G /mnt
    |
    | usb drive isn't even mounted. why is its mount point 4G?


    I missed that in your first post. You listed /mnt/ as a seperate partition.
    It's not a seperate partition, but several directories *UNDER* /mnt are
    seperate partitions.

    It looks like somebody tried to copy some stuff to the usb drive while
    it wasn't mounted. Partition mount points are just ordinary directories
    when the partition is not mounted, and can be written to if you have
    permission. This is also a very frustrating way to fill up a partition:

    unmount a partition that is mounted "under" the one you want to fill
    make fome large files in the mount point directory
    remount the partition

    You will now have a full partition, but nothing will be able to find the
    files, since the mounted partition will hide them.


    --
    Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/~paulcol
    Asking for technical help in newsgroups? Read this first:
    http://catb.org/~esr/faqs/smart-questions.html#intro

  5. Re: root partition full

    Paul Colquhoun wrote in
    news:slrnd2fnb9.hcj.postmaster@andor.dropbear.id.a u:



    >
    > I missed that in your first post. You listed /mnt/ as a seperate
    > partition. It's not a seperate partition, but several directories
    > *UNDER* /mnt are seperate partitions.
    >
    > It looks like somebody tried to copy some stuff to the usb drive while
    > it wasn't mounted. Partition mount points are just ordinary
    > directories when the partition is not mounted, and can be written to
    > if you have permission. This is also a very frustrating way to fill up
    > a partition:
    >
    > unmount a partition that is mounted "under" the one you want to
    > fill make fome large files in the mount point directory
    > remount the partition
    >
    > You will now have a full partition, but nothing will be able to find
    > the files, since the mounted partition will hide them.
    >
    >


    you're right Paul. usb drive wasn't mounted, so it created an mp3 dir
    under the usb drive mount point and filled up /. That explains rsync
    errors too!

    When I get around to scripting the backup, is there an easy way to
    determine if the drive is mounted?

    Thanks,
    Woody

  6. Re: root partition full

    On Fri, 04 Mar 2005 13:24:46 GMT, Woody
    wrote:

    >When I get around to scripting the backup, is there an easy way to
    >determine if the drive is mounted?


    Put a special file on the drive, such as .mounted. Have the script
    check for it and abort if it doesn't exist.

    --
    Joe Zeff
    The Guy With the Sideburns

    --
    Joe Zeff
    The Guy With the Sideburns
    Kill as many as you can; I have a morbid love of excess.
    http://www.lasfs.org http://home.earthlink.net/~sidebrnz
    http://www.lasfs.org http://home.earthlink.net/~sidebrnz

  7. Re: root partition full

    In article , Woody wrote:
    >Paul Colquhoun wrote in
    >news:slrnd2fnb9.hcj.postmaster@andor.dropbear.id.a u:
    >
    >> I missed that in your first post. You listed /mnt/ as a seperate
    >> partition. It's not a seperate partition, but several directories
    >> *UNDER* /mnt are seperate partitions.


    Whoops! - yeah I missed that too.

    >When I get around to scripting the backup, is there an easy way to
    >determine if the drive is mounted?


    [compton ~]$ file /etc/mtab
    /etc/mtab: ASCII text
    [compton ~]$ cat /etc/mtab
    /dev/hda1 / ext3 rw 0 0
    none /proc proc rw 0 0
    [compton ~]$

    I thought there was a man page for that, but apparently not. /etc/fstab
    tells what to mount where, while /etc/mtab shows what is mounted and how.

    Old guy


  8. Re: root partition full

    On Fri, 04 Mar 2005 18:44:12 +0000, Joe Zeff wrote:

    > On Fri, 04 Mar 2005 13:24:46 GMT, Woody
    > wrote:
    >
    >>When I get around to scripting the backup, is there an easy way to
    >>determine if the drive is mounted?

    >
    > Put a special file on the drive, such as .mounted. Have the script
    > check for it and abort if it doesn't exist.


    Or you could put a file such as .no_drive in the mount point directory on
    the hard drive. It will not be visible if a drive is mounted.


    --
    Mike Argy
    Custom Office solutions
    and Windows/UNIX programs.



  9. Re: root partition full

    Woody wrote:
    > When I get around to scripting the backup, is there an easy way to
    > determine if the drive is mounted?


    Check /etc/mtab or /proc/mounts, eg.

    fgrep -q ' /mnt/xxx ' /etc/mtab || mount /mnt/xxx || exit 2

    or simply

    mount /mnt/xxx || exit 2

    --
    William Park , Toronto, Canada
    Slackware Linux -- because it works.


  10. Re: root partition full

    Mike A wrote:

    > Or you could put a file such as .no_drive in the mount point directory on
    > the hard drive. It will not be visible if a drive is mounted.


    Whenever I create a new mountpoint directory, I do this:

    # touch mountpointdir/NOTHING_IS_MOUNTED_HERE

    --
    Cheers,
    Rick Moen Magnus frater spectat te.
    rick@linuxmafia.com

+ Reply to Thread