[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Upgrading Kernel - Out of Disk Space



On Wed, 11 Feb 2015 23:55:42 -0500
Gary Dale <garydale@torfree.net> wrote:

> On 11/02/15 10:01 PM, Stephen R Guglielmo wrote:
> > Hi list,
> >
> > I updated my apt repo and there was a kernel update. I ran the
> > update, and received an error claiming "no space left on device."
> > Normally, I would do a force-uninstall for the currently running
> > kernel (freeing space), then install the new kernel and reboot.
> > However, this is an update, not a replacement. I'm not sure how to
> > proceed. When I installed this system, I selected automatic
> > partitioning with an encrypted LVM, so I imagine resizing the
> > partition would prove difficult. I'm not sure why the automatic
> > partitioner didn't provide for enough space for future updates. See
> > below for the relevant logs. This is on Debian Jessie.
> >
> > Thanks!
> >
> > ---
> > Preparing to
> > unpack .../linux-image-3.16.0-4-amd64_3.16.7-ckt4-3_amd64.deb ...
> > Unpacking linux-image-3.16.0-4-amd64 (3.16.7-ckt4-3) over
> > (3.16.7-ckt2-1) ... dpkg: error processing
> > archive /var/cache/apt/archives/linux-image-3.16.0-4-amd64_3.16.7-ckt4-3_amd64.deb
> > (--unpack): cannot copy extracted data for
> > './lib/modules/3.16.0-4-amd64/kernel/drivers/scsi/lpfc/lpfc.ko' to
> > '/lib/modules/3.16.0-4-amd64/kernel/drivers/scsi/lpfc/lpfc.ko.dpkg-new':
> > failed to write (No space left on device) dpkg-deb: error:
> > subprocess paste was killed by signal (Broken pipe) Errors were
> > encountered while
> > processing: /var/cache/apt/archives/linux-image-3.16.0-4-amd64_3.16.7-ckt4-3_amd64.deb
> > E: Sub-process /usr/bin/dpkg returned an error code (1)
> >
> > ---
> >
> > $ df -h
> > Filesystem                Size  Used Avail Use% Mounted on
> > /dev/mapper/lapsdeb-root  314M  237M   57M  81% /
> > udev                       10M     0   10M   0% /dev
> > tmpfs                     776M  8.8M  767M   2% /run
> > tmpfs                     1.9G  4.0K  1.9G   1% /dev/shm
> > tmpfs                     5.0M  4.0K  5.0M   1% /run/lock
> > tmpfs                     1.9G     0  1.9G   0% /sys/fs/cgroup
> > /dev/mapper/lapsdeb-var   2.7G  318M  2.3G  13% /var
> > /dev/mapper/lapsdeb-usr   8.2G  2.6G  5.2G  34% /usr
> > /dev/mapper/lapsdeb-tmp   360M  2.1M  335M   1% /tmp
> > /dev/sda1                 228M   21M  196M  10% /boot
> > /dev/mapper/lapsdeb-home  274G  8.5G  252G   4% /home
> > tmpfs                     388M  4.0K  388M   1% /run/user/1000
> 
> That is an unusual file system. The out of space error is on your "/" 
> partition, which would also hold /lib where the modules are being 
> unpacked. I don't use LVM myself so I'm not familiar with it but I'm 
> guessing it's providing all the /dev/mapper devices.
> 
> The problem is that your / partition only has 314M allocated to it.
> This is ridiculously small. I understand people use LVM because it
> supposedly makes adding more space easier. Figure out how to use LVM
> to increase your / allocation to something more reasonable. 20G is
> what I would normally use as a minimum, with more for desktop use.
> 
> You've got 252G free on /home. Shifting some of that over to / would
> do wonders.
> 
> 

It was until fairly recently general practice to allocate a few hundred
MB to / if /usr and /var were separate. It's only in the last few years
that the size of /lib/modules has really exploded, and /usr now needs
(in practice) to physically live under /.

On a sid workstation with ~4000 packages installed including three
kernels, with everything except /home and /boot under /, I have the
following usage:

/boot  42M
/lib   0.55G
 /lib/modules 0.5G
/usr   7.65G
/var   1.87G
all /  11.1G

-- 
Joe


Reply to: