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?
*** Bug 16675 has been marked as a duplicate of this bug. ***
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 #2: Recent versions of portage don't have that problem. The last version was portage-2.0.46-r12.
It's been fixed.
*** Bug 24935 has been marked as a duplicate of this bug. ***
take another look nick ?
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.
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.
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.
Hmmmm... Added more checks in. portage-2.0.48-r8 and portage-2.0.49_pre15
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.
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
that's a nice tip, however, I nearly made a load in my pants because of this.
*** Bug 50790 has been marked as a duplicate of this bug. ***
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?
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)