Page MenuHomeFreeBSD

freebsd-update upgrade fails if /var is a tmpfs
ClosedPublic

Authored by feld on Nov 14 2014, 4:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 24 2024, 12:13 PM
Unknown Object (File)
Jan 24 2024, 11:32 PM
Unknown Object (File)
Dec 19 2023, 3:10 PM
Unknown Object (File)
Dec 18 2023, 2:33 PM
Unknown Object (File)
Aug 27 2023, 11:23 AM
Unknown Object (File)
Aug 26 2023, 10:30 AM
Unknown Object (File)
Aug 2 2023, 9:59 AM
Unknown Object (File)
Jul 29 2023, 10:58 PM
Subscribers

Details

Reviewers
cperciva
ian
Summary

This is my lame attempt at fixing the issue documented in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195006

It's not going to be bulletproof as anyone could use another different non-persistent filesystem we aren't aware of, but this should help...

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

feld retitled this revision from to freebsd-update upgrade fails if /var is a tmpfs.
feld updated this object.
feld edited the test plan for this revision. (Show Details)
feld added a reviewer: cperciva.
feld set the repository for this revision to rS FreeBSD src repository - subversion.

Looks good. I don't know what sort of crazy it takes to put /var on a tmpfs, but this is definitely the right way to respond to that situation.

feld edited edge metadata.
feld added a subscriber: ian.

@ian noticed an issue with the way mfs was being detected and suggested we use a case and df -T instead. Turns out that mfs masquerades as ufs when mounted, so we need to check for the /dev/md* string

Previous patch was committed but doesn't break anything; just won't actually detect mfs.

ian added a reviewer: ian.

The sort of crazy I am that leads to /var on an mfs is an embedded systems person. :) I'm always having to deal with readonly root issues. Of course, I'd never use freebsd-update to update a readonly root type system.

usr.sbin/freebsd-update/freebsd-update.sh
613

Now that I see the wider context, I think it might be good to use df -T ${WORKDIR} rather than the $(...) construct I suggested. They are equivelent but it makes sense to use consistant style within the script.

This revision is now accepted and ready to land.Nov 17 2014, 10:13 PM

Thanks @ian for catching that mistake and suggesting a better way. :-)