Bug 241097

Summary: freebsd-update(8) archives NFS mounts (and maybe other stuff)
Product: Base System Reporter: HrstBW <kjift14>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: emaste
Priority: ---    
Version: 12.0-RELEASE   
Hardware: amd64   
OS: Any   

Description HrstBW 2019-10-06 12:37:08 UTC
FreeBSD 12.0-RELEASE with UFS root here (with /boot on the / volume), but I have witnessed this behaviour before on older releases as well.

I have an NFS mount at the (FreeBSD non-standard) location /opt/XYZ

When running `freebsd-update install`, the kernel backup copies the file system into /boot/kernel.old , and also wants to copy contents of NFS mounts there. This alone is wrong (and dangerous, think about full disks), as far as I understand what the kernel backup should do and what it should not.

But even this copy fails with seemingly infinite errors of the form:

cp: ///boot/kernel.old/./opt/XYZ/svn/[…]/.svn/pristine/[…]: Cross-device link

Probably many (all?) files on NFS are affected; the SVN internals were just the ones for which I could see this.

As a short-term mitigation, I interrupted the update, unmounted the NFS shares, deleted /boot/kernel.old (which took remarkably long for a SSD), and reissued `freebsd-update install`.

I don't think it is intentional that the kernel backup black-/whitelists can be confused so easily.