LinuxQuestions.org
Review your favorite Linux distribution.
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 12-28-2008, 01:29 PM   #1
madkayaker
LQ Newbie
 
Registered: Dec 2008
Location: New Hampshire
Distribution: Debian Etch
Posts: 10

Rep: Reputation: 0
apt-get -f install fails due to "No space left on device"


While trying to run sudo apt-get -f install to install gettext, I got the following error message:

Code:
dpkg: error processing /var/cache/apt/archives/gettext_0.16.1-1_i386.deb (--unpack):

 failed in buffer_write(fd) (9, ret=-1): backend dpkg-deb during `./usr/share/doc/gettext/NEWS': No space left on device
When I look at my filesystem using df -h, I see the following:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              1.9G  1.9G     0 100% /
tmpfs                 189M     0  189M   0% /lib/init/rw
udev                   10M   84K   10M   1% /dev
tmpfs                 189M     0  189M   0% /dev/shm
/dev/mapper/okeefmdeb-okeefmdeb_home
                      678G  104G  540G  17% /home
/dev/mapper/okeefmdeb-okeefmdeb_tmp
                      485M   11M  449M   3% /tmp
/dev/mapper/okeefmdeb-okeefmdeb_var
                      4.0G  691M  3.1G  19% /var
My main question is: is /usr a part of the / directory? If so, the filled md0 device (a software RAID 1 device created to hold the root filesystem) would explain the "No space left on device" error.

If this is the problem--my /usr directory has somehow grown to 1.7 GB--is there a way to lower disk usage in that area?

I am currently running Debian Etch 2.6.18-6-686.

Any help would be appreciated...thanks!
 
Old 12-28-2008, 01:59 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well it has to be there if there's nothing else listed as a mount point for it. with a 680GB /home I have to say that's fairly odd space planning. /usr contains a very significant majority of the installed system, 1.7gb seems a small to medium sized amount of space to be using. you uninstall software you don't wish to use, i tend to run "du -h /usr --max-depth=1" to list the usage of each next directory, go into any unusually high users, go into that directory and repeat until i account for the space. but it's the partition size that's wrong, not the files that are trying to use it.
 
Old 12-28-2008, 02:00 PM   #3
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. Your problem is that you've max'ed out your "/dev/md0", your root ("/") filesystem.

2. No, "/usr" isn't necessarily part of the root filesystem. In your case, however, it is. Because that's apparently how it was configured at install time. I can see that because your "df -h" doesn't show "/usr" on its own partition, so it *must* be part of the root partition.

3. To change it, you'd need to:
a) Delete your current "/usr" (simply renaming it would work)
b) Create a new partition for a new "/usr"
c) Mount it
d) Copy your data

'Hope that helps .. PSM

PS:
Acid_Kewpie and I apparently answered at exactly the same time. If you happen to have more physical space on your /dev/md0 device, maybe you can just increase the partition size. You run the risk, unfortunately, of losing everything.

Last edited by paulsm4; 12-28-2008 at 02:04 PM.
 
Old 12-28-2008, 02:22 PM   #4
madkayaker
LQ Newbie
 
Registered: Dec 2008
Location: New Hampshire
Distribution: Debian Etch
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks to the both of you for your quick replies. I think what I'm going to do is just reformat the hard drives and reinstall Linux. I only installed about a week ago so there's no precious data on the machine yet, and I'm running a combination of RAID 1 and RAID 5 on the same discs, so it's easier just to reinstall.

Thanks again!
 
Old 12-28-2008, 02:53 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Whilst I'd try to say otherwise, that probably is the best option all round. If you can afford it i'd suggest a 4gb / and a 16gb /usr or some such.
 
Old 01-02-2014, 02:09 PM   #6
LinuxAndy2
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
Apt-Get complains about no space left on device that has PLENTY

Hello, all

I have a raspberry Pi with a sick samba install. I am trying to set up the packages, but each time I get:
sudo apt-get -f install
> Setting up samba-common (2:3.6.6-6+deb7u2) ...
> sed: couldn't flush /var/run/samba/upgrades/seddUSPtR: No space left on device
> dpkg: error processing samba-common (--configure):
> subprocess installed post-installation script returned error exit status 4

What's especially frustrating, is that when I run df -h, I get:

> /dev/mmcblk0p2 7.2G 1.6G 5.3G 23% /
> /dev/mmcblk0p1 69M 8.2M 61M 12% /boot

/dev/mm... is a SD card, which isn't the fastest way to run the Pi, but it is supported + less hassle than previous attempts at putting / on a USB drive.
ls -la /var/run/samba/upgrades gets me:

drwxrwxrwx 2 root root 80 Jan 2 15:00 .
drwxr-xr-x 4 root root 340 Jan 2 14:59 ..
---------- 1 root root 0 Jan 2 15:00 seddUSPtR
-rw-rw-rw- 1 root root 12171 Jan 2 15:00 smb.conf

dmesg had nothing helpful in it. I can "sudo touch /var/run/samba/upgrades/file", and it works. Can anyone help me out? And why is seddUSPtR so ominously without flags?
 
Old 01-02-2014, 03:15 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,580
Blog Entries: 2

Rep: Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037
The "No space left on device" message can also mean that the filesystem ran out of inodes. What is the output of
Code:
df -i
 
1 members found this post helpful.
Old 01-02-2014, 03:27 PM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Lost flags? My guess is filesystem corruption.
Maybe you should run fsck on your Pi?
And welcome to LQ!
 
1 members found this post helpful.
Old 01-05-2014, 07:11 PM   #9
LinuxAndy2
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
The "No space left on device" message can also mean that the filesystem ran out of inodes. What is the output of
Code:
df -i
Output is:

Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mmcblk0p2 482384 56601 425783 12% /
/dev/mmcblk0p1 0 0 0 - /boot

It doesn't look like I'm out of inodes..
 
Old 01-05-2014, 09:39 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,580
Blog Entries: 2

Rep: Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037
Please post the output of
Code:
cat /proc/mounts
ls -ld /var/run
I suspect that /var/run is actually a tmpfs and you run out of RAM.
 
  


Reply

Tags
debian, etch, filesystem


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
Moving a file into a large directory: "No space left on device" Jimantha Linux - General 2 09-09-2008 11:40 PM
"No space left on device" error using SystemV shared memory clalfa Programming 5 07-09-2007 07:34 AM
Getting a "No space left on device" message on a non-full partition... sugar2 Linux - Hardware 12 07-06-2007 01:43 AM
"Cannot create directory: No space left on device" but I have 7.1G available !!!! fr_laz Linux - General 3 12-09-2005 04:44 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM


All times are GMT -5. The time now is 07:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration