From nobody Mon Sep 04 06:44:46 2023 X-Original-To: standards@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 4RfJz24qMLz4rjvr for ; Mon, 4 Sep 2023 06:44:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RfJz22xVwz3Qp0 for ; Mon, 4 Sep 2023 06:44:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693809886; a=rsa-sha256; cv=none; b=FnDHhcUdR9m3LpDpW0ZnvXe3Q7TFUJeUDR+43jNUcXkaf9IY6pnpLyqc3pkZnPtIghkIZ9 cl9oLb7onjhgkjY+rmMuGztAUZYhP3c6TgiViVsPSwOH/KEtcA+p4EEMvDJs0Cmp3Mv5Jg yEwwTbX5r+WES9f9fGY7UTYiH2aIpGUfZj8MB0goDSu6aLhkj1ITtcN66h9qy55Wz4/yL5 LjeQA9HBH0gmp46sqyt/h5pvjSr0xOSAQ2J8BJOEAMlKSu56yKCSw9zm7Vvg5DI6IRH+ZU hT8inok88kZNqM73V+JrLhBE08rPKmi8UDBoReVFGc5gBFGOa4+iQYWneFF/YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693809886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CIzcJiqO8ko9vozYX8D+wtT4kXBJeiNvDZe8JFck7bs=; b=FePRRVHDBIx4ZcS3/dZSddUrnAZN9l7A25RJ0a0mSRy5Wx3w4Jrg0DsBKk+FG3EWSRe0QQ 9FPEYCv+7tZwnkWJFf72kld7ApXQnead7JHtlBTnIP7FpFQdq8Ke78pSHKQMw0XxgpTTxM koDUuiBp65hk+W3aRMFhsYj7LaXYaSmn8YbmmBP+HsvyCSrpVmlLpSSY50etAvfTEQ9AWG guJvIffbXw7hH5eprgWWupYohe4nFdR8psDWECkE0pMJ9wDyO89wQv0mrq801uZZ8rbHra qlZs1VaO+GGHN+JoknvcrvOTldlNIP2PPcuEkG9tSB+3XNkjPIMKIqzayBUriQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RfJz21vxpzwnP for ; Mon, 4 Sep 2023 06:44:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3846ikdE057124 for ; Mon, 4 Sep 2023 06:44:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3846ikl2057123 for standards@FreeBSD.org; Mon, 4 Sep 2023 06:44:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 273555] GPT table lost or filesystem became invalid for new disk hot added on an existing LSILogic/LSILogicSAS controller in VM with guest OS FreeBSD 13.2-RELEASE i386 running on ESXi Date: Mon, 04 Sep 2023 06:44:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: zouy@vmware.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273555 Bug ID: 273555 Summary: GPT table lost or filesystem became invalid for new disk hot added on an existing LSILogic/LSILogicSAS controller in VM with guest OS FreeBSD 13.2-RELEASE i386 running on ESXi Product: Base System Version: 13.2-RELEASE Hardware: i386 OS: Any Status: New Severity: Affects Some People Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: zouy@vmware.com This issue mainly happens on a new disk hot added on an existing LSILogic/LSILogicSAS controller. After performing file read/write testing on the hot added disk, reboot the guest OS, and then check the new disk partit= ion, the GPT table would lost or the filesystem is invalid. I captured a kernel panic once but can't reproduce it at every time: In /var/log/message: 1177 Aug 28 16:21:03 FreeBSD-20230825202248 syslogd: kernel boot file is /boot/kernel/kernel 1178 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: panic: ufs_dirbad: /mnt/598dc209-45be-11ee-ad23-005056a9fb8a: b ad dir ino 2 at offset 0: mangled entry 1179 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: cpuid =3D 0 1180 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: time =3D 1693239639 1181 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: KDB: stack backtrace: 1182 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #0 0x10704bf at kdb_backtrace+0x4f 1183 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #1 0x1028ab4 at vpanic+0xf4 1184 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #2 0x10289b4 at panic+0x14 1185 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #3 0x12c637a at ufs_lookup_ino+0xc7a 1186 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #4 0x12c56f6 at ufs_lookup+0x16 1187 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #5 0x10d6f7a at vfs_cache_lookup+0x9a 1188 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #6 0x10e3e84 at lookup+0x3d4 1189 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #7 0x10e31bb at namei+0x20b 1190 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #8 0x1106990 at vn_open_cred+0x480 1191 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #9 0x10fd268 at kern_openat+0x2f8 1192 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #10 0x10fd47f at sys_openat+0x2f 1193 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #11 0x142efc9 at syscall+0x179 1194 Aug 28 16:21:03 FreeBSD-20230825202248 kernel: #12 0xffc03479 at __stop_set_sysinit_set+0xd93df94d Steps might be able to reproduce it: 1. Create VM in ESXi with VM settings:=20 guest OS Version: FreeBSD 13 (32-bit) vcpu : 2 memory: 3 G disk controller: VMware Paravirtual=20 disk: 16 G other default 2. Install guest OS with FreeBSD 13.2-RELEASE i386 ISO and reboot after fin= ish installation. 3. Edit VM settings and Add a lsilogic/lsilogicsas controller 4. Add a new disk (e.g 1G) to this new controller.=20 The new disk will be recognized as /dev/da1 5. Create GPT partition table, add new partition and create filesystem on i= t. gpart create -s GPT /dev/da1 gpart add -t freebsd-ufs /dev/da1 newfs -EU /dev/da1p1 6. Mount the device mkdir /mnt/testdir mount /dev/da1p1 /mnt/testdir 7. Test file write/read: Create and write to file test.txt under /mnt/testd= ir/ 8. Unmount the device /dev/da1p1 9. Reboot VM 10. Mount the device /dev/da1p1 For the step 10, it maybe hit the issue: GPT is lost for disk /dev/da1 or filesystem is invalid for /dev/da1p1 Additional, I try the command "newfs" for the newly added disk partition /dev/da0p1 and find this command doesn't works well. Try 1: No issue root@FreeBSD-20230808092435:~ # newfs -EU /dev/da0p1 /dev/da0p1: 1022.0MB (2093056 sectors) block size 32768, fragment size 4096 using 4 cylinder groups of 255.53MB, 8177 blks, 32768 inodes. with soft updates Erasing sectors [128...2093055] super-block backups (for fsck_ffs -b #) at: 192, 523520, 1046848, 1570176 root@FreeBSD-20230808092435:~ # fstyp /dev/da0p1 ufs root@FreeBSD-20230808092435:~ # mount /dev/da0p1 /mnt/da0p1/ root@FreeBSD-20230808092435:~ # mkdir /mnt/da0p1/testdir Try 2: no error message from command 'newfs', but the filesystem is not recognized. root@FreeBSD-20230808092435:~ # newfs -EUN /dev/da0p1 /dev/da0p1: 1022.0MB (2093056 sectors) block size 32768, fragment size 40= 96 using 4 cylinder groups of 255.53MB, 8177 blks, 32768 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 523520, 1046848, 1570176 root@FreeBSD-20230808092435:~ # newfs -EUN /dev/da0p1 /dev/da0p1: 1022.0MB (2093056 sectors) block size 32768, fragment size 40= 96 using 4 cylinder groups of 255.53MB, 8177 blks, 32768 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 523520, 1046848, 1570176 root@FreeBSD-20230808092435:~ # fstyp /dev/da0p1 fstyp: /dev/da0p1: filesystem not recognized Try 3: hit issue "iput: check-hash failed for inode read from disk" root@FreeBSD-20230808092435:~ # newfs -EU /dev/da0p1 /dev/da0p1: 1022.0MB (2093056 sectors) block size 32768, fragment size 40= 96 using 4 cylinder groups of 255.53MB, 8177 blks, 32768 inodes. with soft updates Erasing sectors [128...2093055] super-block backups (for fsck_ffs -b #) at: 192, 523520, 1046848, 1570176 iput: check-hash failed for inode read from disk Try 4: hit issue "cg 0: bad magic number": root@FreeBSD-20230808092435:~ # newfs -EU /dev/da0p1 /dev/da0p1: 1022.0MB (2093056 sectors) block size 32768, fragment size 40= 96 using 4 cylinder groups of 255.53MB, 8177 blks, 32768 inodes. with soft updates Erasing sectors [128...2093055] super-block backups (for fsck_ffs -b #) at: 192, 523520, 1046848, 1570176 cg 0: bad magic number This issue is not related to ESXi version. It seems to be kernel/driver iss= ue --=20 You are receiving this mail because: You are the assignee for the bug.=