LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 02-26-2013, 06:03 AM   #1
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Rep: Reputation: 15
Exclamation Debian - Dist Upgrade failing due to lack of space in root.


Hi,

We have a dedicated server provided by an external hosting company. We're trying to upgrade but keep getting the following error.

Code:
Now updating linux-image-2.6.32-5-amd64 ..
Installing package(s) with command apt-get -y install linux-image-2.6.32-5-amd64 ..
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  linux-doc-2.6.32
The following packages will be upgraded:
  linux-image-2.6.32-5-amd64
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.8 MB of archives.
After this operation, 119 kB of additional disk space will be used.
Get:1 http://security.debian.org/ squeeze/updates/main linux-image-2.6.32-5-amd64 amd64 2.6.32-48squeeze1 [28.8 MB]
Preconfiguring packages ...
Fetched 28.8 MB in 5s (5348 kB/s)
(Reading database ... 61973 files and directories currently installed.)
Preparing to replace linux-image-2.6.32-5-amd64 2.6.32-46 (using .../linux-image-2.6.32-5-amd64_2.6.32-48squeeze1_amd64.deb) ...
Unpacking replacement linux-image-2.6.32-5-amd64 ...
dpkg: error processing /var/cache/apt/archives/linux-image-2.6.32-5-amd64_2.6.32-48squeeze1_amd64.deb (--unpack):
 failed in write on buffer copy for backend dpkg-deb during `./lib/modules/2.6.32-5-amd64/kernel/drivers/staging/speakup/speakup_dummy.ko': No space left on device
configured to not write apport reports
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-2.6.32-5-amd64_2.6.32-48squeeze1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
.. install failed!
After a bit of research on the web it seems the root partition is too small for the package to be unpacked and the upgrade to commence.

Any assistance on this? I have tried apt-get clean to no avail.

Code:
fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00054f22

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          43      345366   83  Linux
/dev/sda2              44       30394   243794407+   5  Extended
/dev/sda5              44         651     4883728+  83  Linux
/dev/sda6             652        1016     2931831   83  Linux
/dev/sda7            1017        2495    11880036   82  Linux swap / Solaris
/dev/sda8            2496        2544      393561   83  Linux
/dev/sda9            2545       30394   223705093+  83  Linux

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c6135

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          65      522081   fd  Linux raid autodetect
/dev/sdb2              66         326     2096482+  fd  Linux raid autodetect
/dev/sdb3             327       30394   241521210   fd  Linux raid autodetect
ds357242-2:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             327M  264M   46M  86% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                  2.0G  168K  2.0G   1% /dev
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sda9             210G  650M  199G   1% /home
/dev/sda8             373M   11M  343M   3% /tmp
/dev/sda5             4.6G  896M  3.5G  21% /usr
/dev/sda6             2.8G  710M  2.0G  27% /var
ds357242-2:~#
 
Old 02-26-2013, 01:08 PM   #2
kinneyd
LQ Newbie
 
Registered: Oct 2011
Posts: 21

Rep: Reputation: Disabled
Hello,

I would agree / is very small. It seems that apt is running out of space in /var/cache/apt/archives. I think the long term solution would be to make / bigger, but this may not be easily accomplished. You may be able to "borrow" some space from /home by doing a bind mount. I've tested this locally to install a package, but I can't make any promises.

1) Make a directory in /home
# mkdir /home/archives

2) Do a bind mount of /var/cache/apt/archives .
# mount --bind /home/archives /var/cache/apt/archives/

3) Re-run your command to get the new kernel.
# apt-get -y install linux-image-2.6.32-5-amd64

4) Unmount the bind mount, so things are back to normal.
# umount /home/archives

Good luck, and the usual disclaimer
 
Old 02-26-2013, 01:40 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,614
Blog Entries: 2

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Since /var is already on a separate partition with more than enough free space this won't really help.

The first thing to do is to find the space consuming files on that partition:
Code:
du -sxh /*
Please post the output here.
 
Old 02-26-2013, 01:55 PM   #4
kinneyd
LQ Newbie
 
Registered: Oct 2011
Posts: 21

Rep: Reputation: Disabled
Doh, good catch TobiSGD.
 
  


Reply

Tags
apt-get upgrades, debian, update


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
PPP Failing on Boot up due to lack of serial interfaces! Crowbar81 Debian 2 05-24-2012 06:18 AM
Failed dist-upgrade due to udev CONFIG_SYSFS_DEPRECATED nonsense bgoodr Debian 5 04-25-2010 05:09 PM
System failed due to lack of free disk space une Mandriva 18 09-26-2007 06:56 AM
RH9 won' boot due to lack of space ravykanth Linux - Newbie 6 10-27-2003 11:07 PM
Linux doesn' boot due to lack of hard disk space ravykanth Linux - General 1 10-27-2003 04:44 PM


All times are GMT -5. The time now is 10:04 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