Error on upgrade to U8 [EFAULT] Cannot remove file /tmp

SPerdew

Cadet
Joined
Feb 19, 2021
Messages
7
Currently running: TrueNAS-12.0-U5.1 upgrading to U8
When installing get ERROR: [EFAULT] Cannot remove file /tmp
 

SPerdew

Cadet
Joined
Feb 19, 2021
Messages
7
[2022/03/06 08:01:49] (DEBUG) freenasOS.Update.ApplyUpdate():1371 - Installer got packages [{'base-os': <_io.BufferedReader name='/var/db/system/update/base-os-12.0-U8-9eb394e166e48c7e9d49c9f06f1826fc.tgz'>}, {'freebsd-
pkgdb': <_io.BufferedReader name='/var/db/system/update/freebsd-pkgdb-12.0-U8-9eb394e166e48c7e9d49c9f06f1826fc.tgz'>}, {'freenas-pkg-tools': <_io.BufferedReader name='/var/db/system/update/freenas-pkg-tools-12.0-U8-9eb3
94e166e48c7e9d49c9f06f1826fc.tgz'>}]
[2022/03/06 08:01:49] (DEBUG) freenasOS.Configuration.CheckFreeSpace():77 - CheckFreeSpace(path=None, pool=freenas-boot, required=2569056768)
[2022/03/06 08:01:49] (DEBUG) freenasOS.Update.PruneClones():410 - No pruning necessary
[2022/03/06 08:01:49] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/usr/local/sbin/beadm, ['create', '12.0-U8'])
[2022/03/06 08:01:49] (DEBUG) freenasOS.Update.modified_call():95 - Created successfully
[2022/03/06 08:01:49] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/usr/local/sbin/beadm, ['mount', '12.0-U8', '/tmp/tmp2ao_fkvi'])
[2022/03/06 08:01:50] (DEBUG) freenasOS.Update.modified_call():95 - Mounted successfully on '/tmp/tmp2ao_fkvi'
[2022/03/06 08:01:50] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/sbin/mount, ['-t', 'devfs', 'devfs', '/tmp/tmp2ao_fkvi/dev'])
[2022/03/06 08:01:50] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/sbin/mount, ['-t', 'tmpfs', 'tmpfs', '/tmp/tmp2ao_fkvi/var/tmp'])
[2022/03/06 08:01:51] (DEBUG) freenasOS.Installer.InstallPackages():1083 - Installing package {'base-os': <_io.BufferedReader name='/var/db/system/update/base-os-12.0-U8-9eb394e166e48c7e9d49c9f06f1826fc.tgz'>}
[2022/03/06 08:01:51] (DEBUG) freenasOS.Installer.install_file():711 - base-os-12.0-U8-9eb394e166e48c7e9d49c9f06f1826fc
[2022/03/06 08:01:51] (DEBUG) freenasOS.Installer.install_file():745 - upgrade_aware = True
[2022/03/06 08:01:52] (ERROR) freenasOS.Update.ApplyUpdate():1602 - Update got exception during update: Cannot remove file /tmp
Traceback (most recent call last):
File "/usr/local/lib/freenasOS/Update.py", line 1567, in ApplyUpdate
if installer.InstallPackages(progressFunc=progressFunc, handler=install_handler) is False:
File "/usr/local/lib/freenasOS/Installer.py", line 1086, in InstallPackages
if install_file(pkg[pkgname], self._root,
File "/usr/local/lib/freenasOS/Installer.py", line 823, in install_file
if pkgdb.RemovePackageFiles(pkgName) == False:
File "/usr/local/lib/freenasOS/Configuration.py", line 347, in RemovePackageFiles
raise Exception("Cannot remove file %s" % path)
Exception: Cannot remove file /tmp
[2022/03/06 08:01:52] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/sbin/umount, ['-f', '/tmp/tmp2ao_fkvi/dev'])
[2022/03/06 08:01:52] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/sbin/umount, ['-f', '/tmp/tmp2ao_fkvi/var/tmp'])
[2022/03/06 08:01:52] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/usr/local/sbin/beadm, ['unmount', '-f', '12.0-U8'])
[2022/03/06 08:01:53] (DEBUG) freenasOS.Update.modified_call():95 - Unmounted successfully
[2022/03/06 08:01:53] (DEBUG) freenasOS.Update.RunCommand():262 - RunCommand(/usr/local/sbin/beadm, ['destroy', '-F', '12.0-U8'])
[2022/03/06 08:01:54] (DEBUG) freenasOS.Update.modified_call():95 - Destroyed successfully
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
Have you looked in /tmp and deleted any files in there ?
 

SPerdew

Cadet
Joined
Feb 19, 2021
Messages
7
Yes - there is no longer anything in /tmp. When the upgrade process runs, I can see several files created and deleted. It still fails, but it also deletes the files in /tmp. Directory remains empty.
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
These are my tmp permissions:

Code:
root@freenas:~ # ls -l /tmp
lrwxr-xr-x  1 root  wheel  8 Feb  3 09:29 /tmp -> /var/tmp

What are yours ?
 

SPerdew

Cadet
Joined
Feb 19, 2021
Messages
7
This isn't a link on my system

root@freenas:/ # ls -ld /tmp
drwxr-xr-x 2 root wheel 3 Mar 9 07:10 /tmp
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
/var/tmp is full of temp files.
re-instate the link
 
Top