Pacman Low Disk Space Precautions?
[SOLVED (I think)]
Edit 4: Still dealing with the shadowfs issue. I guess what must have happened is that the lightdm package installer was in the middle of changing its password, which corrupted the shadowfs lock file when I had to powerdown the system because it was unresponsive due to having a full disk. I just had to chroot to run passwd. I might still have some broken packages.
Edit 3: As I expected, I can at least mount /boot now, but the problem is pretty pervasive. Pacman -Syu says I am up to date, but I couldn't mount /boot until I force reinstalled core/linux, which reported a lot of conflicting files. There are definitely more broken packages. Any easy way to find them? I'm still unable to enter my display manager because systemd "fails at step PAM spawning". I'm afraid my shadowfs problem is related. Any ideas welcome! I think I might solve it if someone knows a way to verify the integrity of all pacman installed packages.
~~Just go ahead and ignore everything else, unless you're bored.
Like a fool, I have now made my disk unbootable twice by running a lot of pacman upgrades under very very low disk space, like down into the 100s of MBs. I've read some allusions to pacman having some disk space checks, but I've not noticed anything of the sort. It does report the disk space that the upgrades will occupy once upgrades are complete, but I of course ignored it entirely, not realizing my disk was so low. I know some easy ways to solve the problem, but I'm really more interested in sharing the horrific failure I observed when things went really wrong and hearing about less obvious solutions to counter this problem, e.g. less obvious than consciously keeping track of your disk usage at all times. Anyhow, the probably obvious end result was that pacman halted and a bunch of services crashed without any available disk space. I was unable to boot because I could no longer mount my vfat boot volume due to some packages being half installed, or perhaps not installed at all. Since pacman couldn't update it's database, I had to arch-chroot and force install some stuff. Since it crashed just doing upgrades, and since I've been able to upgrade everything, I'm assuming I'll be able to boot now, so wish me luck!
Edit: I guess this one is more general linux, but another interesting side effect:
~~passwd: existing lock file /etc/shadow.lock with an invalid PID ''~~
Error occured while pacman upgraded lightdm. The install succeeded, but I'm not sure if lightdm will work, yet. I suppose I might have to delete the lock file and force install it, although I don't know what all relies on that lock file, so feedback welcomed. Only now I realize why it wasn't accepting my root password! I was aware of shadowfs, but I'm always so quick to get nervous that some AUR package rooted me.
Edit 2: So I had to force upgrade some stuff, as I mentioned. It seems there are more broken packages than just the few packages which pacman errored upon finding conflicting files, e.g. "file X exists in filesystem" and "no packages were upgraded".
1. I force upgraded those few, then still failed to boot, erroring on unable to mount /boot because no known VFAT filesystem type.
2. I built my kernel modules again, using mkinitcpio, hoping to clear up 1.
3. mkinitcpio is still failing to find modules, so on a fluke, I discovered that pacman has more conflicted files after trying pacman -S linux. Interestingly, pacman -Syu thinks it's up to date. I assume this is because of earlier halted pacman process and that it will clear up on its own as packages are updated in their repos.
I think this will be okay as long as no new problems present, but I can't help but feel like some packages may be missing files or be partially out of date. Is there any way to do a thorough package installation sanctity check? It would be nice to know what broken installs to expect. Additionally, I feel like I should be looking through pacman logs to determine which packages were not completely installed when the process halted. Does that seem necessary?
Edited 4 Nov 2015. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 7 · 100% up
- Kind
- Text
- ID
- 3rf5fp
8 comments
There is a "CheckSpace" option in pacman.conf that is enabled by default. Although, this probably does not work very well with btrfs...
ext4 here, but I guess I forgot to mention I was downloading 10MB/s or so at the time, so go figure. I guess I should pay more attention to my disk!
That would do it! You can use "pacman -Qkk" to check which packages have corrupt files and reinstall them. You might need to use --force if the files list for the package also has issues (you will get a lot of conflicting files warnings).
If it supported btrfs's free space I'd be soooo happy. At one point I was constantly getting out of space errors with 1.5GB+ free and package cache moved :(
Once you hit level 256, a lot of weird shit happens.
rimshot