Install with /var on 2nd HD

Having failed to move /var to another drive - which I had succeeded in doing on a Manjaro system - I was forced to reinstall from scratch. The option for manual partitioning with Calamares refused to start for a reason I didn’t understand so now I’m back to everything under root. Not wishing to have a failed Grub installation again - the repair instructions from the Discovery page didn’t work - I’d be grateful for any suggestions about how to proceed.

You want to move /var to another drive or you want to reinstall?

Which filesystem are you using?

Also, I would say I am not a huge fan of moving the entirety of /var to another drive. It can certainly work but it means that you will need to make sure you manually mount it if you ever have to chroot in. pacman will be somewhat broken with /var available.

Hi @agrandl and welcome aboard.

@dalto gave you some words of wisdom, and I have personal experience following repair instructions that still did not work.
My approach is : when in doubt, back up data and do a clean install.
You will be better off for it : no dealing with broken pacman, and who knows what else.

Michael

Thanks for your quick reply. I’m just using a plain ext4 with no encryption. I had encountered problems on a Manjaro system running out of space, hence my moving it to a 2nd bigger drive and also I’d read that with a rolling system like Arch or Endeavour the repeated updates and adjustments to package databases are more easily handled by old spinning disks rather than an SSD, which I use for the root system. Perhaps, I’m being over-cautious.

I can’t think of any reason you would want the package databases on a spinning disk.

The part of /var that commonly grows is /var/cache/pacman/pkg which is where the downloaded packages are stored. I can certainly see moving that to spinning disk, but you don’t need to move all of /var to do that.

Thanks @dalto for the suggestion. As the pacman packages directory is under /var/cache, I would presumably only need to move this part. But what would be the best way of pointing the system to a separate partition on another drive. The usual methods of moving /var I’ve seen involve going into single-user mode to avoid disturbing a running system; then mounting the new partition to /mnt with a temporary name in order to copy everything over from the original directory before renaming it. Finally adding a line to fstab with the UUID of the new drive to point the system to the newly-copied directory before a reboot. Would this method still work with /pacman/pkg in the fstab line instead of /var?

If you are only moving /var/cache/pacman, it should be simpler because that directory is only touched when you use pacman. So as long as you don’t try to use pacman to install/update packages in the middle of the move, you don’t have to worry about single-user mode or anything similar. You can do all the steps while the system is active.

Also, while you certainly can create a partition and mount it, you could just use a symlink. If you already have a part of your spinning disk mounted somewhere, you can do this in a few steps.

For example, let’s say that your spinning disk is mounted at /data. It would be as simple as:

sudo mv /var/cache/pacman /data/.
sudo ln -s /data/pacman /var/cache/pacman
1 Like

Super easy! No worry about re-configuring Grub and no rescue mode! I’ll try it tomorrow when I return to my new neo-Atlantis installation on a computer at another site. Many thanks for the suggestion @dalto

2 Likes

Just to confirm the move that you suggested worked perfectly and I now have updates feeding the new packages straight to my big 5½" HD. Thanks again for the tip!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.