Re: cannot delete some files in stub /usr

From: Herbert J. Skuhra <herbert_at_gojira.at>
Date: Thu, 11 Nov 2021 14:15:27 UTC
On Thu, Nov 11, 2021 at 06:44:20PM +0500, Eugene M. Zheganin wrote:
> Hello.
> 
> I have a server with 12.2-R, it was installed on a remote hosting witch
> patched bsdinstall which didn't create the separate /usr zfs dataset.
> Recently I've created one, mounted it ontop of the /, exported the / with
> nfs, mounted it on the same server and tried to delete the stub /usr.
> 
> Everything is fine except... yeah, I cannot delete some files:
> 
> # mount
> zroot/ROOT/default on / (zfs, NFS exported, local, noatime, nfsv4acls)
> devfs on /dev (devfs, local, multilabel)
> zroot on /zroot (zfs, local, noatime, nfsv4acls)
> zroot/www on /var/www (zfs, local, noatime, nfsv4acls)
> zroot/home on /home (zfs, local, noatime, nfsv4acls)
> zroot/mysql on /var/db/mysql (zfs, local, noatime, nfsv4acls)
> zroot/usr on /usr (zfs, local, noatime, nfsv4acls)
> zroot/ports on /usr/ports (zfs, local, noatime, nfsv4acls)
> zroot/ports/distfiles on /usr/ports/distfiles (zfs, local, noatime,
> nfsv4acls)
> 127.0.0.1:/ on /mnt/usr (nfs)
> 
> # pwd
> /mnt/usr/usr/lib32
> 
> # ls -l
> total 1210
> -r--r--r--  1 root  wheel  1778272 11 нояб. 12:31 libc.so.7
> -r--r--r--  1 root  wheel    56492 11 нояб. 12:31 libcrypt.so.5
> -r--r--r--  1 root  wheel    19592 11 нояб. 12:31 librt.so.1
> -r--r--r--  1 root  wheel   121324 11 нояб. 12:31 libthr.so.3
> 
> # rm libc.so.7
> override r--r--r-- root/wheel for libc.so.7? y
> rm: libc.so.7: Input/output error
> 
> There's more in stub /usr/bin. This is what nfsv3 gives me. nfsv2 says
> "operation not permitted".
> 
> I'm aware about chflags, currently there are none:
> 
> # ls -ol
> total 1210
> -r--r--r--  1 root  wheel  - 1778272 11 нояб. 12:31 libc.so.7
> -r--r--r--  1 root  wheel  -   56492 11 нояб. 12:31 libcrypt.so.5
> -r--r--r--  1 root  wheel  -   19592 11 нояб. 12:31 librt.so.1
> -r--r--r--  1 root  wheel  -  121324 11 нояб. 12:31 libthr.so.3

Have you checked this on the server or the client?

Server:
# ls -lo file.img 
-rw-r--r--  1 root  wheel  schg 1048576 11 Nov 14:59 file.img

Client:
# ls -lo file.img 
-rw-r--r--  1 root  wheel  - 1048576 Nov 11 14:59 file.img

-- 
Herbert