• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 347
  • Last Modified:

/mnt seems to be factoring into the used space of the / partition

I am running Mandrake 10 (kernel 2.6.3-7mdk) with a 46GB / partition.  This machine was given to me as is and has turned out to be/is a real trooper so repartitioning it is almost completely out of the question although I fully understand that having a single partition for the entire system (except for /boot and swap) is not desireable.  The problem seems to be that the system is factoring in the /mnt partition when figuring out the disk space usage.  Below you will see the output of the 'du' and 'df' commands and while I have read that df has some issues, the system does in fact say that it is running out of space when I create an iso image roughly 4GB in size since mkisofs complains that there no space left on the device.  My / partition is really 14GB filled and my /mnt partition has 28GB through mounting of two windows partitions and an external hard drive.  Any solutions to this?  Is there a way to make it so the system does not count /mnt when figuring out disk space?   Any suggestions are very welcome since my backups are failing.

[root@vaio home]# du -h --max-depth=1 /
5.5M    /bin
0       /dev
13M     /etc
71M     /lib
28G     /mnt
85M     /opt
512     /srv
135K    /tmp
0       /sys
2.5G    /var
2.7G    /usr
6.5M    /boot
9.1G    /home
515M    /proc
6.8M    /sbin
15M     /root
512     /media
512     /stuff
4.5K    /initrd
43G     /
[root@vaio root]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part7
                       46G   42G  3.6G  93% /
[root@vaio root]#
0
bisonfur37
Asked:
bisonfur37
  • 6
  • 5
  • 3
2 Solutions
 
wesly_chenCommented:
Hi,

  Could you do
# df -hl
and
# cd /; du -sh *

and post the result?

Regards,

Wesly
0
 
wesly_chenCommented:
Also, what's the result of
# mount

Wesly
0
 
paullamhkgCommented:
please also post the content of /etc/fstab here.

and /mnt include 2 windows partitions, is they FAT32? NTFS??

without adding more harddisk space or delete some of the un used stuff,  the system will count whatever mounted on the system and /etc/fstab will show you which is mounted in the system, so by adjusting the entry(ies) there might help, but not sure.

0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
bisonfur37Author Commented:
[root@vaio /]# df -hl;du -sh *;mount
Filesystem            Size  Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part7
                       46G   46G  8.7M 100% /
/dev/ide/host0/bus0/target0/lun0/part6
                       99M   11M   84M  12% /boot
/dev/scsi/host2/bus0/target0/lun0/part1
                       16M   11M  4.9M  69% /mnt/flashcard
5.5M    bin
6.5M    boot
0       dev
13M     etc
8.7G    home
4.5K    initrd
71M     lib
512     media
32G     mnt
85M     opt
516M    proc
4.0K    PSP.VERSION
15M     root
6.8M    sbin
512     srv
512     stuff
0       sys
8.8M    tmp
4.0K    trans.conf
2.7G    usr
2.5G    var
/dev/ide/host0/bus0/target0/lun0/part7 on / type reiserfs (rw,notail)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /dev type devfs (rw)
none on /sys type sysfs (rw)
/dev/ide/host0/bus0/target0/lun0/part6 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,mode=0620)
none on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,codepage=850)
/dev/scsi/host2/bus0/target0/lun0/part1 on /mnt/flashcard type vfat (rw)

less /etc/fstab
/dev/hda7 / reiserfs notail 1 1
/dev/hda6 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/hda1 /mnt/win_c ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/hda5 /mnt/win_d ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda8 swap swap defaults 0 0
none /mnt/removable supermount dev=/dev/scsi/host2/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset
=iso8859-1,kudzu,codepage=850 0 0

Paullamhkg, please explain what you meant by
"without adding more harddisk space or delete some of the un used stuff,  the system will count whatever mounted on the system and /etc/fstab will show you which is mounted in the system, so by adjusting the entry(ies) there might help, but not sure."
0
 
wesly_chenCommented:
--- /etc/fstab
/dev/hda1 /mnt/win_c ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/hda5 /mnt/win_d ntfs umask=0,nls=iso8859-1,ro 0 0
---
Strange, in /etc/fstab, there are /mnt/win_c and /mnt/win_d and they do not show up in /etc/mtab (read by mount command).
Could you turn off mountd (# pgrep mountd| kill -9 - ) and then remove /etc/mtab. Reboot.

Wesly
0
 
bisonfur37Author Commented:
Ok, here is how my /etc/fstab looks like now,
/dev/hda7 / reiserfs notail 1 1
/dev/hda6 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/fd0        /mnt/floppy     auto iocharset=iso8859-1,codepage=850,noauto,nosuid,umask=0,sync,user,unhide
,nodev  0 0
#/dev/hda1 /mnt/win_c ntfs umask=0,nls=iso8859-1,ro 0 0
#/dev/hda5 /mnt/win_d ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda8 swap swap defaults 0 0
none /mnt/removable supermount dev=/dev/scsi/host1/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset
=iso8859-1,kudzu,codepage=850 0 0

As you can tell, I commented out the win_c and win_d mounts.  As a matter of fact, I completely removed the /mnt/removable entry, ran the command 'supermount -i disable' and rebooted the PC.  Unless if I am misunderstanding the supermount man page, the command above should disable supermount.  Aparently this does not do it permanently.  I'm beginning to hate supermount for various other reasons although I must say that it worked very well when I just installed my machine.  I think that tinkering with it and the /etc/fstab on your own will mess things up.  

Anyway, this is what my mount command says,
[root@vaio gonzalo]# mount
/dev/ide/host0/bus0/target0/lun0/part7 on / type reiserfs (rw,notail)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /dev type devfs (rw)
none on /sys type sysfs (rw)
/dev/ide/host0/bus0/target0/lun0/part6 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,mode=0620)
none on /mnt/removable type supermount (rw,dev=/dev/scsi/host1/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,codepage=850)
[root@vaio gonzalo]#

Unfortunately, my system is still listing as being 100% full.  Quite honestly, this situation makes absolutely no sense at all.  For a system to erroneously think that it has no space left is a serious hassle and a huge mistake by the developers.  Any other suggestions?
0
 
bisonfur37Author Commented:
I moved the supermount binary to a different location and rebooted.  When the system came up, supermount had mounted both of the removable drives connected to the computer.  After umounting those this is what my system tells me:

[root@vaio gonzalo]# mount
/dev/ide/host0/bus0/target0/lun0/part7 on / type reiserfs (rw,notail)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /dev type devfs (rw)
none on /sys type sysfs (rw)
/dev/ide/host0/bus0/target0/lun0/part6 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,mode=0620)
[root@vaio gonzalo]# ls ~/.bashrc
/root/.bashrc
[root@vaio gonzalo]# less ~/.bashrc
[root@vaio gonzalo]# ud /
5.5M    /bin
0       /dev
13M     /etc
71M     /lib
32G     /mnt
85M     /opt
512     /srv
143K    /tmp
0       /sys
2.5G    /var
2.7G    /usr
6.5M    /boot
7.9G    /home
514M    /proc
6.8M    /sbin
16M     /root
512     /media
512     /stuff
4.5K    /initrd
46G     /

This is totally ridiculous and I think it is related to supermount.  If it werent for /mnt, I would have 32GB left to play with.  Please help.  So far a google search on how to remove supermount has not returned anything useful.
0
 
paullamhkgCommented:
no since when you installed you mandrake, it's already mount the windows partitions into your system and put them under the /mnt even you remark the fstab, this only will not mount those partitions, it didn't mean you remove any space from the system. so your system still 100% used.

the only way is either you give up your windows directory and delete it (but you windows will delete also) or add an extra HDD and put your /mnt into and leave the windows as it is, which will have more disk space.

I will suggest you get an extra Hdd and mount it as /mnt.

so after you put your new harddisk in, use the fdisk to create the partition and format as Ext3 by 'mkfs.ext3 -j /dev/hdb1', mount the new harddisk under /mntnew by 'mount /dev/hdb1  /mntnew'
after the the harddisk mounted, copy everything from /mnt into /mntnew, but excluding the windows stuff. afterward.

move the /mnt to /mntold by 'mv /mnt /mntold' and move the /mntnew into /mnt by 'mv /mntnew  /mnt'

now the new harddisk mounted undert he mount point /mnt.

change your /etc/fstab similar as below

/dev/hda7 / reiserfs notail 1 1
/dev/hda6 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/fd0        /mnt/floppy     auto iocharset=iso8859-1,codepage=850,noauto,nosuid,umask=0,sync,user,unhide
,nodev  0 0
/dev/hdb1   /mnt  ext3 defaults 1 2                                 <--- the new harddisk mount as slave of 1st primary IDE
/dev/hda1 /mntold/win_c ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/hda5 /mntold/win_d ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda8 swap swap defaults 0 0
none /mnt/removable supermount dev=/dev/scsi/host1/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset
=iso8859-1,kudzu,codepage=850 0 0

by doing this the windows stuff still there, and your /mnt will be the new harddisk and there will have more free space.

that's what I mean to add more diskspace and adjusting the /etc/fstab.
0
 
bisonfur37Author Commented:
I figured it out.  It was a stupid mistake and something that someone with a fresh start figured out in seconds.  Although my script would successfully mount the external drive and unmount it, to make a long story short, I messed up somewhere so that the backups were being made to the /mnt/usbexternal point even though the drive was not mounted there.  

Thanks for all the help.
0
 
paullamhkgCommented:
it's great to hear you solve your problem :)

Since you found you solution, you can send a 0 points request to EE admin to request to PAQ'd this Q and get your points refund. just point your reqest here http://www.experts-exchange.com/Community_Support/
0
 
bisonfur37Author Commented:
I really appreciate that you guys responded to this question.  I have no problems giving you the points because what you mentioned could at some point be an answer to a similar problem.  There is one thing however, that you guys might be able to help me with since it is totally related to the problem.  Let me explain the specifics and the problem.
Specifics:
1. running Mandrake 10
2. have a 200GB hdd with two partitions.  part1 is NTFS, part2 is EXT3
3. running a daily backup late at night that places copy of backup onto part2
4. I am no longer mounting and unmounting part2 within the script, ie, the HDD is always ON and always mounted
Problem:
It seems that the problem I originally had still occurs even though the backup script does NOT mount and unmount the drive.  Unless someone unplugged the drive or messed around when I was not around I do not know why it still happened that the copy of the backup went to the local directory where the HDD should have been mounted on, thus filling up the PC's space.  I know that I can check within the script if the drive is mounted and then take the appropiate actions.  I just want to get everyone's suggestions if there is something else that I can or should do to get rid of this problem.  For instance, I can search the output of the mount command for the text that lists the directory where the drive should be mounted.  Is there an even more demaning check for the mounted drive?
Thanks.
0
 
wesly_chenCommented:
> I can search the output of the mount command for the text that lists the directory
> where the drive should be mounted.
Yes, you can do it.

#!/bin/sh

mount | grep '/dev/hdb1` # the mount drive may vary
if [ "$?" -eq 1 ]
then
   mail -s "/dev/hdb1 is NOT mounted" <your email address> < /dev/null
   exit
else
   <your backup script>
fi
----

Wesly
0
 
bisonfur37Author Commented:
The thing is that someone my unplug the drive and then plug it back in and there will be a chance that it is recognized as something else.  Why test for the /dev/ point as opposed to the /mnt/ point?
Why not grep for /mnt/usbexternal?
0
 
wesly_chenCommented:
> Why not grep for /mnt/usbexternal?
/mnt/usbexternal is the mount point (directory) and you can mount another disk on this mount point.

> back in and there will be a chance that it is recognized as something else.
Then both grep /dev/hdb1 or grep /mnt/usbexternal may not work.

Wesly
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 6
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now