Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

OT: out of disk space, but not really....

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


jep at obrien-pifer

Dec 28, 2004, 8:29 PM

Post #1 of 11 (911 views)
Permalink
OT: out of disk space, but not really....

I'm having a problem on my mythbackend box that I'm hoping someone can
help me with. If I do a df the system is reporting that / is full. It's
160 gig drive and a du shows me this:

# du -h --max-depth=1
16K ./lost+found
5.6M ./boot
420K ./dev
du: `./proc/3699/fd/4': No such file or directory
5.0K ./proc
797M ./var
156K ./tmp
17M ./etc
832K ./root
2.6G ./usr
12M ./sbin
4.7M ./bin
536K ./home
4.0K ./initrd
55M ./lib
4.0K ./opt
4.0K ./misc
55M ./install
4.0K ./net
4.0K ./.qt
54G ./mythvideos

This adds up to less than 60 gig. Any suggestions on troubleshooting
this? I'm on Redhat 9. Any help is appreciated.

Thanks,
James


johnny at fishcounts

Dec 28, 2004, 8:38 PM

Post #2 of 11 (865 views)
Permalink
RE: OT: out of disk space, but not really.... [In reply to]

Does df say full?



________________________________

Johnny Lee

-----Original Message-----
From: mythtv-users-bounces [at] mythtv
[mailto:mythtv-users-bounces [at] mythtv] On Behalf Of James Pifer
Sent: Tuesday, December 28, 2004 8:29 PM
To: MythTV
Subject: [mythtv-users] OT: out of disk space, but not really....

I'm having a problem on my mythbackend box that I'm hoping someone can
help me with. If I do a df the system is reporting that / is full. It's
160 gig drive and a du shows me this:

# du -h --max-depth=1
16K ./lost+found
5.6M ./boot
420K ./dev
du: `./proc/3699/fd/4': No such file or directory
5.0K ./proc
797M ./var
156K ./tmp
17M ./etc
832K ./root
2.6G ./usr
12M ./sbin
4.7M ./bin
536K ./home
4.0K ./initrd
55M ./lib
4.0K ./opt
4.0K ./misc
55M ./install
4.0K ./net
4.0K ./.qt
54G ./mythvideos

This adds up to less than 60 gig. Any suggestions on troubleshooting
this? I'm on Redhat 9. Any help is appreciated.

Thanks,
James


nezar.nielsen at gmail

Dec 28, 2004, 11:57 PM

Post #3 of 11 (890 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

On Tue, 28 Dec 2004 23:29:05 -0500, James Pifer wrote:
> I'm having a problem on my mythbackend box that I'm hoping someone can
> help me with. If I do a df the system is reporting that / is full. It's
> 160 gig drive and a du shows me this:
...
> This adds up to less than 60 gig. Any suggestions on troubleshooting
> this? I'm on Redhat 9. Any help is appreciated.

I think it's a known problem, that sometimes the backend keeps the
filehandles open, even after the file has been deleted, and if that's
then case, then you need to restart the backend and your space will be
restored.
--
Mvh. Nezar Nielsen
http://fez.dk


jep at obrien-pifer

Dec 29, 2004, 4:29 AM

Post #4 of 11 (885 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

>
> I think it's a known problem, that sometimes the backend keeps the
> filehandles open, even after the file has been deleted, and if that's
> then case, then you need to restart the backend and your space will be
> restored.

Unfortunately reboot has not worked. Here is an output of df:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 155535144 154447032 0 100% /
/dev/hda1 101089 9798 86072 11% /boot
/dev/hdb2 156436456 115234572 33255332 78% /mythtv

There 2 160 gig drives. The first holds boot and / and no other
partitions. Maybe / should have had it's own partition, but that's
another topic. Still can't figure out why it says all the space is used,
when it isn't.

Any other suggestions or info I should provide?

Thanks,
James


hvdkooij at vanderkooij

Dec 29, 2004, 4:43 AM

Post #5 of 11 (882 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

On Wed, 29 Dec 2004, James Pifer wrote:

> Unfortunately reboot has not worked. Here is an output of df:
> # df
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/hda2 155535144 154447032 0 100% /
> /dev/hda1 101089 9798 86072 11% /boot
> /dev/hdb2 156436456 115234572 33255332 78% /mythtv
>
> There 2 160 gig drives. The first holds boot and / and no other
> partitions. Maybe / should have had it's own partition, but that's
> another topic. Still can't figure out why it says all the space is used,
> when it isn't.

To anyone but root the disk is full if you have put 95% on the disk
(default setting). So for mythtv the disk is completely full. I suggest
you start moving stuff to another partition or even another machine.

Hugo.

--
I hate duplicates. Just reply to the relevant mailinglist.
hvdkooij [at] vanderkooij http://hvdkooij.xs4all.nl/
Don't meddle in the affairs of magicians,
for they are subtle and quick to anger.


jep at obrien-pifer

Dec 29, 2004, 5:50 AM

Post #6 of 11 (885 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

On Wed, 2004-12-29 at 07:43, Hugo van der Kooij wrote:
> On Wed, 29 Dec 2004, James Pifer wrote:
>
> > Unfortunately reboot has not worked. Here is an output of df:
> > # df
> > Filesystem 1K-blocks Used Available Use% Mounted on
> > /dev/hda2 155535144 154447032 0 100% /
> > /dev/hda1 101089 9798 86072 11% /boot
> > /dev/hdb2 156436456 115234572 33255332 78% /mythtv
> >
> > There 2 160 gig drives. The first holds boot and / and no other
> > partitions. Maybe / should have had it's own partition, but that's
> > another topic. Still can't figure out why it says all the space is used,
> > when it isn't.
>
> To anyone but root the disk is full if you have put 95% on the disk
> (default setting). So for mythtv the disk is completely full. I suggest
> you start moving stuff to another partition or even another machine.
>
> Hugo.

Yes, but, I am logged in as root and there isn't 95%. I'm using 54gig in
a directory (mythvideos) and then the rest is pretty small. I can't
figure out where the space is being used. Notice that mythtv is using a
seperate disk, hdb.

# du -h --max-depth=1
16K ./lost+found
5.6M ./boot
420K ./dev
du: `./proc/3699/fd/4': No such file or directory
5.0K ./proc
797M ./var
156K ./tmp
17M ./etc
832K ./root
2.6G ./usr
12M ./sbin
4.7M ./bin
536K ./home
4.0K ./initrd
55M ./lib
4.0K ./opt
4.0K ./misc
55M ./install
4.0K ./net
4.0K ./.qt
54G ./mythvideos

Thanks,
James


pwilliamson at mandtbank

Dec 29, 2004, 5:53 AM

Post #7 of 11 (874 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

>> jep [at] obrien-pifer 12/29/2004 7:29:42 AM >>>
>Unfortunately reboot has not worked. Here is an output of df:
># df
>Filesystem 1K-blocks Used Available Use% Mounted on
>/dev/hda2 155535144 154447032 0 100% /
>/dev/hda1 101089 9798 86072 11% /boot
>/dev/hdb2 156436456 115234572 33255332 78% /mythtv
>
>There 2 160 gig drives. The first holds boot and / and no other
>partitions. Maybe / should have had it's own partition, but that's
>another topic. Still can't figure out why it says all the space is
used,
>when it isn't.
>
>Any other suggestions or info I should provide?
>
>Thanks,
>James
>

Try

find / -size 50000k

This will find any single file with a size larger that 50,000k.

It won't help you if there are tons of little files though.

Paul


jep at obrien-pifer

Dec 29, 2004, 6:07 AM

Post #8 of 11 (887 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

On Tue, 2004-12-28 at 23:29, James Pifer wrote:
> I'm having a problem on my mythbackend box that I'm hoping someone can
> help me with. If I do a df the system is reporting that / is full. It's
> 160 gig drive and a du shows me this:
>
> # du -h --max-depth=1
> 16K ./lost+found
> 5.6M ./boot
> 420K ./dev
> du: `./proc/3699/fd/4': No such file or directory
> 5.0K ./proc
> 797M ./var
> 156K ./tmp
> 17M ./etc
> 832K ./root
> 2.6G ./usr
> 12M ./sbin
> 4.7M ./bin
> 536K ./home
> 4.0K ./initrd
> 55M ./lib
> 4.0K ./opt
> 4.0K ./misc
> 55M ./install
> 4.0K ./net
> 4.0K ./.qt
> 54G ./mythvideos
>
> This adds up to less than 60 gig. Any suggestions on troubleshooting
> this? I'm on Redhat 9. Any help is appreciated.
>
> Thanks,
> James
>

Thanks to those who gave me some help on this. No real surprise, turns
out it really was out of space. I have a script that runs at night that
mounts an nfs drive on another machine and backs up my recordings. The
mount must have failed a couple nights ago, so everything was copied
locally instead of to the other machine. I "assumed" it was still
mounted so I ignored the /mnt/storage directory thinking it was on
another machine.

I need to figure out how to tell my script to only rsync the files if
the mount worked correctly. Anyone know how to do that? My script is
simply:

mount 192.168.1.22:/storage /mnt/storage
rsync -av --delete --exclude=nice_names /mythtv/recordings
/mnt/storage/mythtv
rsync -av --delete /mythtv/music /mnt/storage/mythtv
rsync -av --delete /mythvideos /mnt/storage/mythtv
umount /mnt/storage

I know with scp I could do it without mounting the drives, but I'd
rather use rsync. Anyway to do this without mounting the drives this
way?

Thanks for all the help.

James


john at netdirect

Dec 29, 2004, 6:31 AM

Post #9 of 11 (881 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

> Thanks to those who gave me some help on this. No real surprise, turns
> out it really was out of space. I have a script that runs at night that
> mounts an nfs drive on another machine and backs up my recordings. The
> mount must have failed a couple nights ago, so everything was copied
> locally instead of to the other machine. I "assumed" it was still
> mounted so I ignored the /mnt/storage directory thinking it was on
> another machine.
>
> I need to figure out how to tell my script to only rsync the files if
> the mount worked correctly. Anyone know how to do that? My script is
> simply:
>
> mount 192.168.1.22:/storage /mnt/storage
> rsync -av --delete --exclude=nice_names /mythtv/recordings
> /mnt/storage/mythtv
> rsync -av --delete /mythtv/music /mnt/storage/mythtv
> rsync -av --delete /mythvideos /mnt/storage/mythtv
> umount /mnt/storage
>
> I know with scp I could do it without mounting the drives, but I'd
> rather use rsync. Anyway to do this without mounting the drives this
> way?

To see if a drive is mounted use something like this:

if mount | grep "/mnt/storage" >> /dev/null
then
echo "Drive is mounted"
else
echo "Drive is not mounted"
fi

You could also consider using the SSH option to rsync:

Setup a SSH identity on the system where you'll be running the rsync:

ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx root [at] myt


Then copy the /root/.ssh/id_rsa.pub to the remote
systems /root/.ssh/authorized_keys2

cat /root/.ssh/id_rsa.pub | ssh root [at] REMOTESYSTE "cat
> /root/.ssh/authorized_keys2"

Now you should be able to ssh from the one server to the other, as those
users without a password.

Then script:

rsync -av --delete --exclude=nice_names /mythtv/recordings
REMOTESYTEM:/storage/mythtv


ekj at vestdata

Dec 29, 2004, 7:51 AM

Post #10 of 11 (879 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

On Wednesday 29 December 2004 15:07, James Pifer wrote:

> I need to figure out how to tell my script to only rsync the files if
> the mount worked correctly. Anyone know how to do that? My script is
> simply:
>
> mount 192.168.1.22:/storage /mnt/storage
> rsync -av --delete --exclude=nice_names /mythtv/recordings
> /mnt/storage/mythtv
> rsync -av --delete /mythtv/music /mnt/storage/mythtv
> rsync -av --delete /mythvideos /mnt/storage/mythtv
> umount /mnt/storage

Simple.

mount returns an exit-code indicating success or failure (as does most
unix-commands. Thus modify your script as following:

----------------------------------

if mount 192.168.1.22:/storage /mnt/storage
then
rsync -av --delete --exclude=nice_names \
/mythtv/recordings /mnt/storage/mythtv
rsync -av --delete /mythtv/music /mnt/storage/mythtv
rsync -av --delete /mythvideos /mnt/storage/mythtv
umount /mnt/storage
else
echo "Alert -- Mounting of NFS-server failed !"
fi

-------------------------------------

The other suggestions you got, running "mount" and trying to parse the
output and suchlike will also work. But why make it complicated ?


Eivind Kjørstad
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


yanfali at best

Dec 29, 2004, 2:46 PM

Post #11 of 11 (876 views)
Permalink
Re: OT: out of disk space, but not really.... [In reply to]

Even simpler. Create a known file on the ntfs side and check for it.
An unmounted file system should be an empty directory. If the file is
there you much have successfully mounted the fs.

if [ -f /mnt/ntfs/ntfs.mounted ] ; then
do you stuff here
else
echo "Error: NTFS File System not mounted. Aborting." >2
fi

Not sure about the above script as I did it from memory.

Yan
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.