You are not logged in.

#1 2019-05-05 23:23:46

kelnoky
Member
Registered: 2007-11-20
Posts: 135

Drive with /var probably failed - how to boot

Ok so one of my harddrives has probably died (it has been giving off bad noises for months now and when I tried to boot just now, systemd couldn't initiate a fsck and thus the boot fails) which wouldn't be that big of a deal data wise if I hadn't outsourced my /var onto this drive. If I just unplug the drive and take it out of fstab, I don't have any data in /var which I would guess will cause problems. I did backup everything from /var around a month or two ago in case this happens, but I still don't really know how to proceed now, can anyone help me out here?

Offline

#2 2019-05-06 07:56:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,516

Re: Drive with /var probably failed - how to boot

The system will probably expect a couple of subdirs in /var which are provided by the filesystem package, when you restore the backup you should pay attention to not restore stuff where you followed symlinks (in particular /var/lock, mail and run)

Offline

#3 2019-05-06 14:36:22

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: Drive with /var probably failed - how to boot

Also the pacman databases from /var/lib/pacman will be out of sync if you performed any package updates since the backup.

Offline

#4 2019-05-06 15:01:12

kelnoky
Member
Registered: 2007-11-20
Posts: 135

Re: Drive with /var probably failed - how to boot

So I reinstall the filesystem package to have the subdirs?

And how do I repair the pacman database after restoring the backup, because yeah, I performed updates.

Offline

#5 2019-05-06 18:37:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,516

Re: Drive with /var probably failed - how to boot

Depends. Only if you don't restore the /var partition from the backup. Otherwise installing filesystem will just report collisions (so fix the symlinked stuff by hand or at least remove the resolved dirs - if any! - before installing filesystem.

As for pacman:
https://wiki.archlinux.org/index.php/Pa … l_database

Offline

#6 2019-05-07 15:53:47

kelnoky
Member
Registered: 2007-11-20
Posts: 135

Re: Drive with /var probably failed - how to boot

Ok, I got the drive to work again for the moment and was able to make a fresh backup of /var. I also have a replacement drive here, if I just copy the up to date /var over to the new drive everything should be fine, right?

Offline

Board footer

Powered by FluxBB