Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2023 13:18:16 +0100
From:      Maurizio Vairani <maurizio1018@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   If I 'cd' in a ZFS snapshot I cannot mount it 'Device busy'
Message-ID:  <CAN0zgYWks7tG%2BL=MYYzg0Dw6c_0mex14SPn_UaVxuEZTis85yg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000000000000a4c9fb05f5d5b5b8
Content-Type: text/plain; charset="UTF-8"

This code give the Device busy error:
zfs create ztemp/test_snap
cp /bin/c* /ztemp/test_snap
zfs snapshot ztemp/test_snap@first
mkdir /mnt/test_snap
cd /ztemp/test_snap/.zfs/snapshot/first/
cd
mount -t zfs -o ro ztemp/test_snap@first /mnt/test_snap
mount: ztemp/test_snap@first: Device busy

This code works:
zfs snapshot ztemp/test_snap@second
mount -t zfs -o ro ztemp/test_snap@second /mnt/test_snap
ls -l /mnt/test_snap/
total 367
-r-xr-xr-x  1 root  wheel   14600 Mar  1 11:33 cat*
-r-xr-xr-x  1 root  wheel    8920 Mar  1 11:33 chflags*
-r-xr-xr-x  1 root  wheel   20720 Mar  1 11:33 chio*
-r-xr-xr-x  1 root  wheel    9616 Mar  1 11:33 chmod*
-r-xr-xr-x  1 root  wheel   22496 Mar  1 11:33 cp*
-r-xr-xr-x  1 root  wheel  442056 Mar  1 11:33 csh*
umount /mnt/test_snap

Tested in 13.1-RELEASE-p3 and 13.2-BETA3

Regards
Maurizio

--000000000000a4c9fb05f5d5b5b8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>This code give the Device busy error:<br></div><div>z=
fs create ztemp/test_snap</div>cp /bin/c* /ztemp/test_snap<br>zfs snapshot =
ztemp/test_snap@first<br>mkdir /mnt/test_snap<br>cd /ztemp/test_snap/.zfs/s=
napshot/first/<br>cd<br>mount -t zfs -o ro ztemp/test_snap@first /mnt/test_=
snap<br>mount: ztemp/test_snap@first: Device busy<br><div><br></div><div>Th=
is code works:<br></div>zfs snapshot ztemp/test_snap@second<br>mount -t zfs=
 -o ro ztemp/test_snap@second /mnt/test_snap<br>ls -l /mnt/test_snap/<br>to=
tal 367<br>-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 14600 Mar =C2=A01 11:=
33 cat*<br>-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 =C2=A08920 Mar =C2=A0=
1 11:33 chflags*<br>-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 20720 Mar =
=C2=A01 11:33 chio*<br>-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 =C2=A0961=
6 Mar =C2=A01 11:33 chmod*<br>-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 22=
496 Mar =C2=A01 11:33 cp*<br>-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A04420=
56 Mar =C2=A01 11:33 csh*<br>umount /mnt/test_snap<br><br><div>Tested in 13=
.1-RELEASE-p3 and 13.2-BETA3</div><div><br></div><div>Regards</div><div>Mau=
rizio</div><div><br></div></div>

--000000000000a4c9fb05f5d5b5b8--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN0zgYWks7tG%2BL=MYYzg0Dw6c_0mex14SPn_UaVxuEZTis85yg>