Re: mv bug - cannot move to subdirecctory of itself.

2024-01-28 Thread David Christensen

On 1/28/24 03:44, Brett Sutton wrote:

So I'm not certain if I'm in the right spot but I had to start somewhere.

I have a docker container that was working but has suddenly stopped working.
I believe the possible cause was when I added a second drive to my zfs
rpool - the timing was a little too coincidental.



Please post:

# zpool status rpool



The docker command sequence I'm running is:


RUN wget
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.2-linux-x86-64.tar.gz
-O /tmp/webp/webp.tar.gz
RUN tar -xvf /tmp/webp/webp.tar.gz --directory /tmp/webp/unzipped
RUN mv /tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp
/usr/bin/cwebp
```
which results in the error:

```
mv: cannot move '/tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp'
to a subdirectory of itself, '/usr/bin/cwebp'
The command '/bin/sh -c mv
/tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp /usr/bin/cwebp'
returned a non-zero code: 1



What happens if you run the mv(1) command by hand?

# mv /tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp /usr/bin/cwebp



The reason I'm here is because of this bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923420



Have you implemented and run a test case to determine if your ZFS 
supports "renameat2 RENAME_NOREPLACE flag"?



David



mv bug - cannot move to subdirecctory of itself.

2024-01-28 Thread Brett Sutton
So I'm not certain if I'm in the right spot but I had to start somewhere.

I have a docker container that was working but has suddenly stopped working.
I believe the possible cause was when I added a second drive to my zfs
rpool - the timing was a little too coincidental.

The docker command sequence I'm running is:


RUN wget
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.2-linux-x86-64.tar.gz
-O /tmp/webp/webp.tar.gz
RUN tar -xvf /tmp/webp/webp.tar.gz --directory /tmp/webp/unzipped
RUN mv /tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp
/usr/bin/cwebp
```
which results in the error:

```
mv: cannot move '/tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp'
to a subdirectory of itself, '/usr/bin/cwebp'
The command '/bin/sh -c mv
/tmp/webp/unzipped/libwebp-1.3.2-linux-x86-64/bin/cwebp /usr/bin/cwebp'
returned a non-zero code: 1
```

So clearly /usr/bin isn't a subdirectory of /tmp/webp so the error must be
wrong.
There are no symlinks involved.

zfs list reports:
```
rpool  402G   493G   96K  /
rpool/ROOT 141G   493G   96K
 none
rpool/ROOT/ubuntu_c520d1   141G   493G 18.8G  /
rpool/ROOT/ubuntu_c520d1/srv   208K   493G   96K
 /srv
*rpool/ROOT/ubuntu_c520d1/usr   522M   493G   96K
 /usr*
rpool/ROOT/ubuntu_c520d1/usr/local 522M   493G  515M
 /usr/local
rpool/ROOT/ubuntu_c520d1/var  36.2G   493G   96K
 /var
rpool/ROOT/ubuntu_c520d1/var/games 208K   493G   96K
 /var/games
rpool/ROOT/ubuntu_c520d1/var/lib  23.3G   493G 16.8G
 /var/lib
rpool/ROOT/ubuntu_c520d1/var/lib/AccountsService   744K   493G  100K
 /var/lib/AccountsService
rpool/ROOT/ubuntu_c520d1/var/lib/NetworkManager   2.64M   493G  236K
 /var/lib/NetworkManager
rpool/ROOT/ubuntu_c520d1/var/lib/apt   232M   493G 98.8M
 /var/lib/apt
rpool/ROOT/ubuntu_c520d1/var/lib/dpkg  327M   493G 74.1M
 /var/lib/dpkg
rpool/ROOT/ubuntu_c520d1/var/log  2.23G   493G 1002M
 /var/log
rpool/ROOT/ubuntu_c520d1/var/mail  208K   493G   96K
 /var/mail
rpool/ROOT/ubuntu_c520d1/var/snap 10.7G   493G 12.8M
 /var/snap
rpool/ROOT/ubuntu_c520d1/var/spool8.26M   493G 2.36M
 /var/spool
rpool/ROOT/ubuntu_c520d1/var/www   300K   493G  108K
 /var/www
*rpool/USERDATA 251G   493G   96K
 /*
rpool/USERDATA/bsutton_b4334o  250G   493G 68.9G
 /home/bsutton
rpool/USERDATA/root_b4334o 854M   493G  845M
 /root
rpool/var 9.39G   493G   96K
 /var
rpool/var/lib 9.39G   493G   96K
 /var/lib
*rpool/var/lib/docker  9.39G   493G 9.39G
 /var/lib/docker*
```

Of course these paths shouldn't be relevant as all of the paths in the
docker container should be inside a docker volume all mounted under
/var/lib/docker.

The reason I'm here is because of this bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923420

When I run 'info coreutils' it reports :

```
This manual documents version 8.32 of the GNU core utilities, including
```
>From my reading of the bug 8.32 should have a fix for the mv bug.

Now this could well be a bug in docker as it has a somewhat dubious history
of working with zfs but the symptom I'm encountering seemed to match the
above bug so here I am.

Any help or suggestions where to go would be appreciated.

Brett

```
Step 6/30 : RUN lsb_release -a
 ---> Running in c5120a6be61b
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
``