LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2012, 04:47 PM   #1
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Rep: Reputation: Disabled
/var partition full after installing/removing virt-manager-0.9.1-2.fc16


Hi

I'm slightly panicking, but I made the mistake to install VMvare, and then removing because it just wasn't working.

Most likely as a consequence, next thing I know, my /var partition is full:
Code:
sudo du -ks /var/* | sort -nr | head
4342280	/var/lib
307284	/var/cache
78932	/var/tmp
8108	/var/spool
6556	/var/log
1176	/var/www
24	/var/db
16	/var/lost+found
8	/var/empty
4	/var/yp
Code:
 sudo du -ks /var/lib/* | sort -nr | head
4194364	/var/lib/libvirt
65772	/var/lib/rpm
37052	/var/lib/yum
24036	/var/lib/texmf
9560	/var/lib/dkms
5700	/var/lib/mlocate
2588	/var/lib/PackageKit
2456	/var/lib/sepolgen
188	/var/lib/gdm
96	/var/lib/upower
How can I clean out /var/lib/libvirt?

I tried executing
Code:
yum clean all
from googling, but it gave me
Code:
Loaded plugins: langpacks, presto, refresh-packagekit
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 118, in main
    base.doLock()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1782, in doLock
    while not self._lock(lockfile, mypid, 0644):
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1852, in _lock
    os.write(fd, contents)
OSError: [Errno 28] No space left on device
 
Old 03-19-2012, 05:11 PM   #2
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
I can't even use the yum search function without getting the same error message.
 
Old 03-19-2012, 05:39 PM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
You could delete the logs backups and modify your logrotate.conf, so that the old logs are not kept so that the size of log reduces or keeps rotating.
Check this link: http://sundar5.wordpress.com/2010/03...var-directory/
 
Old 03-19-2012, 05:41 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
You are using fedora, right? You just remove virtual manager:

Code:
# rpm -e virt-manager-0.9.1-2.fc16
 
Old 03-19-2012, 05:43 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Since /var/lib/libvirt/ seems to be the culprit, what are the contents of that directory?
 
Old 03-19-2012, 05:49 PM   #6
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Satyaveer Arya View Post
You are using fedora, right? You just remove virtual manager:

Code:
# rpm -e virt-manager-0.9.1-2.fc16
I did that using the terribly unintuitive gui. Last time I use that.

Maybe it didn't get rid of the dependencies?

Code:
$ rpm -e virt-manager-0.9.1-2.fc16
error: package virt-manager-0.9.1-2.fc16 is not installed
 
Old 03-19-2012, 05:51 PM   #7
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
...

Quote:
Originally Posted by TobiSGD View Post
Since /var/lib/libvirt/ seems to be the culprit, what are the contents of that directory?
Quote:
]$ sudo ls -l /var/lib/libvirt/
total 32
drwx--x--x. 2 root root 4096 Dec 19 20:28 boot
drwxr-xr-x. 2 root root 4096 Mar 19 19:58 dnsmasq
drwx--x--x. 2 root root 4096 Mar 19 20:05 images
drwx------. 3 root root 4096 Mar 19 19:58 libxl
drwx------. 2 root root 4096 Dec 19 20:28 lxc
drwx------. 2 root root 4096 Mar 19 19:58 network
drwxr-x---. 5 qemu qemu 4096 Mar 19 20:05 qemu
drwx------. 2 root root 4096 Dec 19 20:28 uml
 
Old 03-19-2012, 05:54 PM   #8
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelmas View Post
I did that using the terribly unintuitive gui. Last time I use that.

Maybe it didn't get rid of the dependencies?

Code:
$ rpm -e virt-manager-0.9.1-2.fc16
error: package virt-manager-0.9.1-2.fc16 is not installed
Note: I don't recall an error when I performed the uninstallation with the gui; that command was the second time around.
 
Old 03-19-2012, 05:59 PM   #9
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Check this:
Code:
# rpm -e virt-manager
 
Old 03-19-2012, 06:00 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Use du to go deeper into /var/lib/libvirt to see which are the actual files that are eating up the space and post them here, so that we can see if it is safe to delete them.
 
Old 03-19-2012, 06:02 PM   #11
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
Use du to go deeper into /var/lib/libvirt to see which are the actual files that are eating up the space and post them here, so that we can see if it is safe to delete them.
Code:
$ sudo du /var/lib/libvirt/
4	/var/lib/libvirt/qemu/snapshot
4	/var/lib/libvirt/qemu/dump
4	/var/lib/libvirt/qemu/save
16	/var/lib/libvirt/qemu
4194312	/var/lib/libvirt/images
4	/var/lib/libvirt/libxl/save
8	/var/lib/libvirt/libxl
4	/var/lib/libvirt/uml
8	/var/lib/libvirt/network
4	/var/lib/libvirt/boot
4	/var/lib/libvirt/lxc
4	/var/lib/libvirt/dnsmasq
4194364	/var/lib/libvirt/
 
Old 03-19-2012, 06:05 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
And again with /var/lib/libvirt/images, and further, every time using the largest directory, until you find the file(s), not directory that eat(s) up the space.
 
Old 03-19-2012, 06:09 PM   #13
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
And again with /var/lib/libvirt/images, and further, every time using the largest directory, until you find the file(s), not directory that eat(s) up the space.
This looks like the end of the line:
Code:
$ sudo du -ah /var/lib/libvirt/images/
4.1G	/var/lib/libvirt/images/bsd.img
4.1G	/var/lib/libvirt/images/
And this is the virtual disk that I created. I had no idea it would be created on /var.

Assuming it's safe to delate?
 
Old 03-19-2012, 06:15 PM   #14
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
If you don't need that disk anymore, yes, delete it. If you need it move it to another place and point your VM to that place.
 
Old 03-19-2012, 06:19 PM   #15
michaelmas
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Great many thanks for everything, that did it.

Usage back to 16%.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Hacking libvirt/virsh/virt-manager/virt-install at Xen 4.0 Dom0 on top of Ubunt LXer Syndicated Linux News 0 05-06-2010 03:50 PM
LXer: Virt-install&Virt-manager at Xen 4.0-rc8 (2.6.32.10 pvops) Dom0 on top Ubuntu K LXer Syndicated Linux News 0 03-26-2010 10:41 PM
removing /var partition and renumbering bl0tt0 Linux - General 1 02-12-2006 03:41 AM
Question about full /var partition. Allen T Linux - General 1 04-18-2003 08:36 AM
2 gig /var partition already full after 3 weeks Nigel_Tufnel Linux - General 2 02-26-2003 09:12 PM


All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration