Index | Thread | Search

From:
Alexander Hall <alexander@beard.se>
Subject:
Re: sysupgrade vs NFS
To:
tech@openbsd.org, Lucas Gabriel Vuotto <lucas@sexy.is>
Date:
Fri, 13 Jun 2025 00:44:32 +0200

Download raw body.

Thread

On June 12, 2025 2:35:00 PM GMT+02:00, Lucas Gabriel Vuotto <lucas@sexy.is> wrote:
>On Thu, Jun 12, 2025 at 01:21:22PM +0100, Stuart Henderson wrote:
>> On 2025/06/10 18:56, Marc Espie wrote:
>> > I triend to use sysupgrade on a cluster where /home is mounted over NFS.
>> > It didn't work. I think it might be possible to write a hints file to
>> > make it work, but it is brittle.
>> > 
>> > In the mean time, the following patch appears to stop it right in its
>> > track before wasting time downloading files to NFS.
>> 
>> Those downloads can be pretty slow sometimes so that's not a bad idea.
>> 
>> > Index: sysupgrade.sh
>> > ===================================================================
>> > RCS file: /build/data/openbsd/cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
>> > diff -u -p -r1.52 sysupgrade.sh
>> > --- sysupgrade.sh	19 Jun 2024 05:22:33 -0000	1.52
>> > +++ sysupgrade.sh	10 Jun 2025 16:54:11 -0000
>> > @@ -132,6 +132,11 @@ fi
>> >  
>> >  install -d -o 0 -g 0 -m 0755 ${SETSDIR}
>> >  cd ${SETSDIR}
>> > +case `df ${SETSDIR}` in
>> 
>> Would be nice to avoid creating the dir too, but then it's harder to
>> reliably check the fs type.
>> 
>> > +*:*) 
>> > +	echo "Error: ${SETSDIR} on NFS is currently not supported"
>> 
>> That also catches MFS. Not a bad thing but then the error message is
>> wrong.
>
>df has -t, so something like
>
>if (df -t nfs "${SETSDIR}" || df -t mfs "${SETSDIR}") >/dev/null 2>&1; then
>	err "${SETSDIR} on NFS or MFS is currently not supported"
>fi
>
>can be done instead.

Even better, from the man page: "More than one type may be specified in a comma-separated list."

/Alexander