Author |
Message |
NILL
|
Posted: Thu Jul 05, 2007 7:15 pm |
|
Joined: Wed Aug 17, 2005 3:33 pm
Posts: 29
|
The other day when I went to start up my MythTV system I got a error that reads
"xsession: warning: unable to write to /tmp x session may exit with an error". I did some searching and found that /dev/sda1 is filled. The auto installer made it 4.7 GB and when I was looking for a solution people said it should be at least 7 GB.
I tried apt-get clean, then apt-get autoclean, it said I should run apt-get update and it just told me to run it again.
I downloaded GParted to try to resize the partitions, but the GUI failed to boot because of a video drivers error. I decided to just reinstall, but first I was going to try to boot to Knoppix 4.0.2(what I had lying around) to back my files. That did boot right either for some reason.
I just gave up and decided to reinstall from scratch but make /dev/sda1 much larger this time. When I went to partition the hard drive it said I didn't have write permission.
Is there a few files from /dev/sda1 that I can safely delete to get it to boot right again? Or how can I resize /dev/sda1? Or how can I do a fresh nstall with /dev/sda1 larger that 4.7 GB?
p.s. I'll be away this weekend so I may not be able to quickly reply.
|
|
Top |
|
 |
bigbro
|
Posted: Thu Jul 05, 2007 7:48 pm |
|
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location:
Kitsap Peninsula, Wa., United States
|
You don't mention what version of Knoomyth you are running.
There was a logfile roatation problem in some of the earlier versions. it caused the / partition to fillup eventually.
You should be able to look around there as it sounds like you have a similar problem.
The logs that filled most as I remember were the mysql log.
Look for logrotate in here might give you some ideas.
|
|
Top |
|
 |
slowtolearn
|
Posted: Thu Jul 05, 2007 8:02 pm |
|
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location:
Farmington, MI USA
|
NILL wrote: The other day when I went to start up my MythTV system I got a error that reads "xsession: warning: unable to write to /tmp x session may exit with an error". I did some searching and found that /dev/sda1 is filled. The auto installer made it 4.7 GB and when I was looking for a solution people said it should be at least 7 GB. The root partitions on my 4 KnoppMyth systems are 4.7Gb. No problem with that size, usually hangs around 55% full. NILL wrote: I downloaded GParted to try to resize the partitions, but the GUI failed to boot because of a video drivers error. I decided to just reinstall, but first I was going to try to boot to Knoppix 4.0.2(what I had lying around) to back my files. That did boot right either for some reason.
I just gave up and decided to reinstall from scratch but make /dev/sda1 much larger this time. When I went to partition the hard drive it said I didn't have write permission. What device did you try to fdisk? Sounds like you may be trying to fdisk the CD-ROM, or that old version of Knoppix has a problem with your SATA controller. NILL wrote: Is there a few files from /dev/sda1 that I can safely delete to get it to boot right again? Or how can I resize /dev/sda1? Or how can I do a fresh nstall with /dev/sda1 larger that 4.7 GB?
p.s. I'll be away this weekend so I may not be able to quickly reply. Before you give up on your current installation, take a look through all the files in /var/log, and check your /home/mythtv/.xsession-errors log. A reboot should remove everything from /tmp except directories(?), but check that too.
|
|
Top |
|
 |
cfoxga
|
Posted: Fri Jul 06, 2007 2:14 pm |
|
Joined: Wed Sep 13, 2006 2:14 pm
Posts: 20
|
I agree with slowtolearn, don't give up on your installation just yet. I've had a similar problem several times when my machine loses power and doesn't shutdown properly.
I'm pretty sure it is /home/mythtv/.xsession-errors that chews up the partition and causes X to barf. Increasing the partition may not change things; the file will likely grow and chew up more space. Just remove that file and you'll be good to go.
If all else fails, try "du -s *" to see disk usage from a given directory. You should be able to find the culprit pretty quick...
Chris
|
|
Top |
|
 |
tjc
|
Posted: Fri Jul 06, 2007 5:47 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
My favorite idiom for this is:
Code: du -k | sort -n This produces an ordered list of the directories which are using the most space. The ordering is such that what is left on you console is biggest stuff and you can scroll backwards to see lesser. Sometimes I use: Code: du -k | sort -nr | head -100 | more
But that's a lot more work to type. 
|
|
Top |
|
 |
jmckeown2
|
Posted: Fri Jul 06, 2007 6:12 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
I have to go with Chris and slowtolearn. I'm no Myth or X expert, but I've been around UNIX for years and Linux almost as long; I've never seen a full root partition error that couldn't be cleaned up. -- Don't panic.
picking up on Chris's advice, do the du -s as root, (so you have the permissions to read everything) and do it from the / directory. For reference Here's what I have; Note, I add a 'k' to the du -s, so the results are printed in kbytes. (it's just a preference.)
Quote: joe@mythbox:/$ su - Password: root@mythbox:~# cd / root@mythbox:/# du -sk * 0 0 4032 bin 4560 boot 4 cdrom 208 dev 10628 etc 72956 home 4 initrd 4 knoppmyth 4 knoppmyth-sata 71592 lib 16 lost+found 20 media 4 mnt 565003932 myth 4 opt 922031 proc 8316 root 7768 sbin 4 srv 0 sys 184 tmp 1370424 usr 321560 var 0 vmlinuz root@mythbox:/#
Look for the largest directory, (ignoring /myth /sys and /proc which are not part of the root partition. ) My numbers above are from a nearly clean R5F1. if you have any directories that are dramatically larger it might be a lead.
cd into the largest directory and repeat the 'du -sk *' keep iterating until you find your culprit.
If you find the bad file and don't know what it is get advice on removal procedures -- Sometimes rm -ing a file can make cleanup harder.
|
|
Top |
|
 |
mihanson
|
Posted: Fri Jul 06, 2007 6:23 pm |
|
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location:
Los Angeles
|
Code: man logrotate Assuming the .xsession-errors file is the culprit, Adding something like the following to the end of /etc/logrotate.conf should help. I'm just reading the man page and I have not put this into practice. Code: /home/mythtv/.xsession-errors { rotate 5 daily dateext }
It would be good idea to see what errors are filling the log and possibly fixing that as well.
_________________ Mike
My Hardware Profile
|
|
Top |
|
 |
mjl
|
Posted: Fri Jul 06, 2007 8:57 pm |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
I have been down this road several times (good practice) and what seems to occur for me because I often use a small drive is that record space or inodes end up being all used up. This will of course cause errors to be generated at a fairly rapid rate and the log will fill up.  Try checking the /var/log/mythtv/mythbackend.log for size. If you find it is quite large, simply as root make it smaller by a gig or so. # echo " " > /var/log/mythtv/mythbackend.log will clear it and also check the /myth/tv for some recording that is excessive and do the same to it.
The log rotate only runs once a day or so and when something goes astray with the backend processes, one ends up with a filled up root. The last time it happened to me, my kids decided to record a couple of hours of snow and I only had room for an hour.
Once you clean up the files you should be able to restart xserver without issue.
Mike
|
|
Top |
|
 |
tjc
|
Posted: Fri Jul 06, 2007 9:58 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Measure twice, cut once.
Don't guess about where the space is being used. Run one of the du diagnostics and look where it tells you. The one I gave has the benefit of getting all the info in one pass, rather than requiring that you keep running du -s at each directory level, but it really doesn't matter which one you use.
What does matter is that you don't guess, but rather get the facts, then you can figure out what to do.
|
|
Top |
|
 |
mjl
|
Posted: Fri Jul 06, 2007 10:34 pm |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
As usual tjc, you are quite correct. I did mention to check the size of the /var/log/mythtv/mythbackend.log but I did not say how  ls -al /var/log/mythtv/mythbackend.log* would show all the logs for comparison and whether or not it was the bad guy. If it was the problem and it was reduced in size, then the xserver should be able to be restarted and the recordings should be able to be reviewed in a normal manner and treated appropriately.
It is always the first place I look after having been there a few times
Mike
|
|
Top |
|
 |
NILL
|
Posted: Sun Jul 08, 2007 4:25 pm |
|
Joined: Wed Aug 17, 2005 3:33 pm
Posts: 29
|
bigbro wrote: You don't mention what version of Knoomyth you are running.
Version R5F1 slowtolearn wrote: What device did you try to fdisk? GParted wouldn't boot far enough to let be start doing something. tjc wrote: My favorite idiom for this is: Code: du -k | sort -n I did this originally Code: du -k and got Code: Filesystem Size Used Avail Use% Mounted on /dev/sda1 4.7G 4.5G 0 100% / /dev/sda3 292G 121G 172G 42% /myth tmpfs 496M 4.0K 496M 1% /dev/shm jmckeown2 wrote: Look for the largest directory, (ignoring /myth /sys and /proc which are not part of the root partition. ) My numbers above are from a nearly clean R5F1. if you have any directories that are dramatically larger it might be a lead. cd into the largest directory and repeat the 'du -sk *' keep iterating until you find your culprit. This is what I get Code: root@mythbe:/# du -s * 0 0 4032 bin 5116 boot 4 cdrom 176 dev 10440 etc 10352 home 4 initrd 4 knoppmyth 4 knoppmyth-sata 71592 lib 16 lost+found 4 media 4 mnt 126150260 myth 4 opt 918155 proc 24 root 7188 sbin 4 srv 0 sys 320 tmp 1357204 usr 3017420 var 0 vmlinuz root@mythbe:/#
I'm not sure if any of these are abnormally big.
|
|
Top |
|
 |
tjc
|
Posted: Sun Jul 08, 2007 5:02 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Look more closely at /var that looks a bit large... Mine is only 1/10th that size...
Code: root@black2:~# du -xk / | sort -rn | head -30 1966956 / 1436620 /usr 591616 /usr/share 494356 /usr/lib 359752 /var 259940 /var/lib 188248 /var/lib/mysql 167012 /var/lib/mysql/mythconverg 156624 /usr/bin 128028 /usr/share/mythtv 109556 /usr/share/doc 90856 /usr/share/mythtv/themes 78844 /usr/share/webmin 74228 /lib 70404 /var/backups 68728 /usr/src 65836 /lib/modules 65832 /lib/modules/2.6.18-chw-13 49340 /usr/share/locale 47644 /lib/modules/2.6.18-chw-13/kernel 41788 /home 41784 /home/mythtv 40820 /usr/include 38172 /usr/games 36724 /usr/share/fonts 35384 /home/mythtv/.mythtv 35096 /usr/lib/xine 35092 /usr/lib/xine/plugins 32444 /lib/modules/2.6.18-chw-13/kernel/drivers 32148 /usr/lib/dri
OBTW - I think you were confusing du -k and df -k based on the file system summaries posted. Code: root@black2:~# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda1 20243048 2143304 17074400 12% / /dev/mapper/vg-myth 467144892 432807508 34337384 93% /myth tmpfs 256680 4 256676 1% /dev/shm /dev/sda1 488337044 369356708 118980336 76% /backup
|
|
Top |
|
 |
NILL
|
Posted: Sun Jul 08, 2007 5:50 pm |
|
Joined: Wed Aug 17, 2005 3:33 pm
Posts: 29
|
tjc wrote: Look more closely at /var that looks a bit large... Mine is only 1/10th that size... Code: root@black2:~# du -xk / | sort -rn | head -30 1966956 / 1436620 /usr 591616 /usr/share 494356 /usr/lib 359752 /var 259940 /var/lib 188248 /var/lib/mysql 167012 /var/lib/mysql/mythconverg 156624 /usr/bin 128028 /usr/share/mythtv 109556 /usr/share/doc 90856 /usr/share/mythtv/themes 78844 /usr/share/webmin 74228 /lib 70404 /var/backups 68728 /usr/src 65836 /lib/modules 65832 /lib/modules/2.6.18-chw-13 49340 /usr/share/locale 47644 /lib/modules/2.6.18-chw-13/kernel 41788 /home 41784 /home/mythtv 40820 /usr/include 38172 /usr/games 36724 /usr/share/fonts 35384 /home/mythtv/.mythtv 35096 /usr/lib/xine 35092 /usr/lib/xine/plugins 32444 /lib/modules/2.6.18-chw-13/kernel/drivers 32148 /usr/lib/dri
OBTW - I think you were confusing du -k and df -k based on the file system summaries posted. Code: root@black2:~# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda1 20243048 2143304 17074400 12% / /dev/mapper/vg-myth 467144892 432807508 34337384 93% /myth tmpfs 256680 4 256676 1% /dev/shm /dev/sda1 488337044 369356708 118980336 76% /backup
OK this is what I get for df -k Code: root@mythbe:/home/benjorr# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 4828768 4624648 0 100% / /dev/sda3 305687672 126345792 179341880 42% /myth tmpfs 507408 4 507404 1% /dev/shm And your right about /var, what do I do now? Heres whats inside. Code: root@mythbe:/var# du -xk / | sort -rn | head -30 4483756 / 3017428 /var 2902560 /var/log 2898848 /var/log/mythtv 1357204 /usr 560676 /usr/share 463528 /usr/lib 155572 /usr/bin 112268 /usr/share/mythtv 105324 /usr/share/doc 91724 /var/lib 81932 /usr/share/mythtv/themes 74928 /usr/share/webmin 71592 /lib 63268 /lib/modules 63264 /lib/modules/2.6.18-chw-13 54000 /usr/src 49304 /usr/share/locale 47888 /lib/modules/2.6.18-chw-13/kernel 40740 /usr/include 38744 /usr/games 36484 /usr/share/fonts 32688 /lib/modules/2.6.18-chw-13/kernel/drivers 32148 /usr/lib/dri 27988 /usr/sbin 27864 /usr/share/man 27844 /var/lib/dpkg 27568 /usr/src/linux-headers-2.6.18-chw-13 26992 /usr/lib/xine 26988 /usr/lib/xine/plugins
|
|
Top |
|
 |
tjc
|
Posted: Sun Jul 08, 2007 8:33 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Running:
Code: ls -l /var/log/mythtv
should show you which logfile has gotten gigantic..
You probably should take a quick look inside of that file too, to see what it's unhappy about...
|
|
Top |
|
 |
NILL
|
Posted: Mon Jul 09, 2007 6:24 pm |
|
Joined: Wed Aug 17, 2005 3:33 pm
Posts: 29
|
tjc wrote: Running: Code: ls -l /var/log/mythtv should show you which logfile has gotten gigantic.. You probably should take a quick look inside of that file too, to see what it's unhappy about... Heres what I get Code: root@mythbe:/var# ls -l /var/log/mythtv total 2898844 -rw-r--r-- 1 root mythtv 640 Jun 30 15:35 KnoppMyth-run.log -rw-r--r-- 1 mythtv mythtv 28672 Jul 9 17:17 mythbackend.log -rw-r--r-- 1 mythtv mythtv 2965479424 Jul 3 21:34 mythfrontend.log
I'm going to assume it's mythfrontend.log. How do I look inside? I thought I had an idea on how to but it didn't work.
|
|
Top |
|
 |