From nobody Wed Mar 1 12:18:16 2023 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PRYDQ15G1z3vnTD for ; Wed, 1 Mar 2023 12:18:30 +0000 (UTC) (envelope-from maurizio1018@gmail.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PRYDN4pcTz4YxK for ; Wed, 1 Mar 2023 12:18:28 +0000 (UTC) (envelope-from maurizio1018@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="hXhYGp/P"; spf=pass (mx1.freebsd.org: domain of maurizio1018@gmail.com designates 2607:f8b0:4864:20::735 as permitted sender) smtp.mailfrom=maurizio1018@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qk1-x735.google.com with SMTP id g25so3509937qki.9 for ; Wed, 01 Mar 2023 04:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677673108; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=IEf5yD0nyoUTIYZMSfHcnW3WQxOP/6Qchkqdq8cz9EY=; b=hXhYGp/PlNIkGedarKQtqJYrTcYA0VoEW2q1QxGs9k47J0z1NPs/PS6NuT4WKntoJQ 1U8nX1WZ/GLvYAj33bfCiaAoOY3PxgD/N0tYRkHM9OFYDdZPVc/pWpDDO8kJHLxmKgg+ N+pWgC7NpcKZ+gHNRN0clnnHANoveOoo33k8peCyRRIh6qYy3LbN2iPbN3SiknayG8zw R25bZl4pukj/+wkB+x2ynwIYXYDeFvOd+dHblivGs7SaGk/79manrBPQWnbhf73yeChW 26N/xOTgZbTw/fwy3LwSTJvUrBg03QnOMgBlQQVr5NHkM02bdv+D3h3BWE27Ewm11mJn w5Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677673108; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IEf5yD0nyoUTIYZMSfHcnW3WQxOP/6Qchkqdq8cz9EY=; b=YVRv3wUc7mkofGfItS8Jooz94zEtXbB7emx3XLKhBxNntwnOgT5KzPnmBvvAa5ELQV UcUrN1/wkNYAMwtL+Q3YIpwk0+6Dua9fM9QWMwkDX2T6h4Db5LtUlTF3fWJz2btuJpDS qSp07l0VZOaDm5ms9AkND2xrjFh/leUwTKvJz3pORuBoqnKXFNTIXPHJaPHaecdIXsWl UXkOArApH5TVsyI5ird3p9KD6JxXDrChgDuK+JFJ6CjBNHvepO89nk31sne0zeRJBMvB zIhJeIdUU5I2XXIxr658wW+jK+c9jQpOH9c8F4rtB0aBpfinwcEaWZNC9EhoXZHDENX0 HAYQ== X-Gm-Message-State: AO0yUKW4kMp3opr+lyriuxNWgo/ij8jGL5QRyAkXABafQ2IIgxcnjBxf CmN41RUXS/HgHHO5Qd0qn6W8homESsle+2cRqAuflMRAhE4= X-Google-Smtp-Source: AK7set/zqYUKCehEDi3A3YgFqN9ZNwhv/kCldafimYdM2UmrCsA/5WPIMwRaJhyMevY3VSrujfXcnhtLm+F86nSp9Ro= X-Received: by 2002:a05:620a:1539:b0:732:e573:96fb with SMTP id n25-20020a05620a153900b00732e57396fbmr1203118qkk.9.1677673107867; Wed, 01 Mar 2023 04:18:27 -0800 (PST) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 From: Maurizio Vairani Date: Wed, 1 Mar 2023 13:18:16 +0100 Message-ID: Subject: If I 'cd' in a ZFS snapshot I cannot mount it 'Device busy' To: freebsd-stable@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a4c9fb05f5d5b5b8" X-Spamd-Result: default: False [-3.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.90)[-0.901]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::735:from]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4PRYDN4pcTz4YxK X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --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
This code give the Device busy error:
z= fs 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/s= napshot/first/
cd
mount -t zfs -o ro ztemp/test_snap@first /mnt/test_= snap
mount: ztemp/test_snap@first: Device busy

Th= is 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/
to= tal 367
-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 14600 Mar =C2=A01 11:= 33 cat*
-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 =C2=A08920 Mar =C2=A0= 1 11:33 chflags*
-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 20720 Mar = =C2=A01 11:33 chio*
-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 =C2=A0961= 6 Mar =C2=A01 11:33 chmod*
-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A0 22= 496 Mar =C2=A01 11:33 cp*
-r-xr-xr-x =C2=A01 root =C2=A0wheel =C2=A04420= 56 Mar =C2=A01 11:33 csh*
umount /mnt/test_snap

Tested in 13= .1-RELEASE-p3 and 13.2-BETA3

Regards
Mau= rizio

--000000000000a4c9fb05f5d5b5b8--