Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8545 - portage and full devices.
Summary: portage and full devices.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Highest blocker (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
: 16675 24935 50790 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-29 16:17 UTC by Terje Kvernes
Modified: 2015-02-07 03:11 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terje Kvernes 2002-09-29 16:17:17 UTC
the last few times my /usr has gone full while merging a package portage has
done two things that scare me a bit:

   1) portage has done partial installs, parts of the package made it to the
device, other parts of the package, didn't.

   2) the package gets listed as installed.

are there any plans on fixing this anytime soon?  the solution is, as far as I
can see, to check the size of the build-tree and see if there is enough space on
the target device for the install to go through.  it does get tricky if the user
uses symlinks or seperate partitions under the target root though.  one would
probably have to check every directory the build-tree would install to, and
mapping disk usage against the device that directory is on.  something like:

we're going to install as follows:

/usr/bin      2M
/usr/lib      2M
/usr/share   10M

portage checks which device all of these are on, and gets told that /usr/bin and
/usr/lib are on the same device (let's say /dev/hda3 for short), but that
/usr/share is somewhere else.  then we need 4M on /dev/hda3 and 10M where
/usr/share is located.  does this sound doable?
Comment 1 SpanKY gentoo-dev 2003-03-02 15:35:14 UTC
*** Bug 16675 has been marked as a duplicate of this bug. ***
Comment 2 Jonathan Morton 2003-03-08 23:56:29 UTC
Here's something WORSE.  My Duron is set up as a fileserver, with a nice big RAID-1 containing the data, and a considerably smaller spare drive containing the root and boot filesystems.

While installing glibc, it ran out of space on the root filesystem.  You can guess what happened next - it proceeded to UNMERGE the previous instance of glibc, including removing the files that hadn't made it all the way.

The result is that my fileserver is now out of action, and I'm unable to run basic commands such as rm.  Thanks VERY much.
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2003-03-10 21:07:45 UTC
Comment #2:
Recent versions of portage don't have that problem.
The last version was portage-2.0.46-r12.
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2003-03-19 06:35:44 UTC
It's been fixed.
Comment 5 SpanKY gentoo-dev 2003-07-20 20:46:47 UTC
*** Bug 24935 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2003-07-20 20:46:57 UTC
take another look nick ? 
Comment 7 Rob Burcham 2003-07-20 21:14:03 UTC
You may consider looking at portage 2.0.48-r5, because it totally just did it to me, on gcc no less.  Dutifully reported hundreds of disk full errors while installing, and then promptly qmerged and unmerged old gcc.  Somewhat disappointed.
Comment 8 Zhen Lin 2003-07-20 22:41:05 UTC
Perhaps we should do as the Windows installers do and have a 'Checking for neccessary disk space' phase. But, the question is, how do we know what is the blocksize of the partition(s) that we are going to install into? How do we even know what their block allocation scheme is like? (i.e. tailed ReiserFS)

This will be a hard bug to fix/feature to add in.

Comment 9 Rob Burcham 2003-07-21 06:24:43 UTC
Well, that may be true.  However I think the immediate problem of unmerging the original package should not be too difficult to remedy.  We catch and report "error 28" when the disk is full, e.g.

!!! [Errno 28] No space left on device
>>> /usr/share/gcc-data/i686-pc-linux-gnu/3.2/java/libgcj-3.2.3.jar
--- /usr/share/gcc-data/i686-pc-linux-gnu/3.2/info/
!!! copy /var/tmp/portage/gcc-3.2.3-r1/image/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info/g77.info.gz -> /usr/share/gcc-data/i686-pc-linux-gnu/3.2/info/g77.info.gz failed.

Can we not just die when this happens?  Or change the PROTECTED on the fly?  I am stunned that we catch this error and report it for hundreds of instances, and then merrily continue on and unmerge the original package.

True, it would be nice to predict the avaialble space, but that is not necessary to solve the immediate (and biggest!) pain.
Comment 10 Nicholas Jones (RETIRED) gentoo-dev 2003-07-29 00:05:33 UTC
Hmmmm... Added more checks in.
portage-2.0.48-r8 and portage-2.0.49_pre15
Comment 11 Aaron Peterson 2004-05-09 18:52:31 UTC
I've been having a problem that there are no error messages when my df command says that there is 0kb free.


The packages that I installed appear to work anyway... but I'm sufficiently bothered.
Comment 12 SpanKY gentoo-dev 2004-05-09 23:36:30 UTC
although df shows 0% free doesnt meant it's true ... ext2 reserves some percentage for use only by root so you can still create files and such as root, but not as other users
Comment 13 Aaron Peterson 2004-05-10 02:01:28 UTC
that's a nice tip,

however, I nearly made a load in my pants because of this.
Comment 14 SpanKY gentoo-dev 2004-05-11 21:07:00 UTC
*** Bug 50790 has been marked as a duplicate of this bug. ***
Comment 15 abandoned account 2015-02-07 03:08:25 UTC
An incomplete merge due to "No space left on device" means that I have to delete the files manually? Or there's another way?(automatically?)

# emerge -va git-sources
...
>>> /usr/src/linux-3.19-rc7/fs/ext3/bitmap.c
>>> /usr/src/linux-3.19-rc7/fs/ext3/dir.c
>>> /usr/src/linux-3.19-rc7/fs/ext3/ext3_jbd.c
>>> /usr/src/linux-3.19-rc7/fs/ext3/file.c
>>> /usr/src/linux-3.19-rc7/fs/ext3/fsync.c
!!! copy /var/tmp/portage/sys-kernel/git-sources-3.19_rc7/image/usr/src/linux-3.19-rc7/fs/ext3/hash.c -> /usr/src/linux-3.19-rc7/fs/ext3/hash.c failed.
!!! [Errno 28] No space left on device

>>> Failed to install sys-kernel/git-sources-3.19_rc7, Log file:

>>>  '/var/log/portage/ebuild.logs/build/sys-kernel/git-sources-3.19_rc7:20150207-015600.log'

 * GNU info directory index is up-to-date.
...

# df .
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda3        4473856 4308868      5116 100% /

made some space 900M+
# emerge --resume
...
 * package sys-kernel/git-sources-3.19_rc7 NOT merged
 * 
 * Detected file collision(s):
 * 
 * 	/usr/src/linux-3.19-rc7/REPORTING-BUGS
 * 	/usr/src/linux-3.19-rc7/README
 * 	/usr/src/linux-3.19-rc7/Kconfig
...
 * 	/usr/src/linux-3.19-rc7/Documentation/ABI/obsolete/sysfs-class-rfkill
 * 	/usr/src/linux-3.19-rc7/Documentation/ABI/obsolete/sysfs-bus-usb
 * 	/usr/src/linux-3.19-rc7/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
 * 	/usr/src/linux-3.19-rc7/drivers/gpu/drm/nouveau/nvif/os.h
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * None of the installed packages claim the file(s).
 * 
 * Package 'sys-kernel/git-sources-3.19_rc7' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.

>>> Failed to install sys-kernel/git-sources-3.19_rc7, Log file:

>>>  '/var/log/portage/ebuild.logs/build/sys-kernel/git-sources-3.19_rc7:20150207-022833.log'

...

 * GNU info directory index is up-to-date.
...


same thing with:
# emerge --ask -v git-sources

I know this is simple to delete manually, but what is the real solution here?
Comment 16 abandoned account 2015-02-07 03:11:04 UTC
forgot to show version:

# emerge -V
Portage 2.2.14 (python 3.3.5-final-0, default/linux/amd64/13.0/no-multilib, gcc-4.9.2, glibc-2.19-r1, 3.17.7-gentoo x86_64)