From nobody Mon Sep 11 17:50:35 2023 X-Original-To: bugs@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 4RkvQ32dllz4sk2p for ; Mon, 11 Sep 2023 17:50:35 +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 4RkvQ26wh0z4Zrq for ; Mon, 11 Sep 2023 17:50:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694454635; a=rsa-sha256; cv=none; b=gbEjRMdfG3qBPRfcREwQzRBbCrwwaaY++imfbiiXmcVRZ8t1KEcrTGVCdsb5/vK0qihBbw UW14WYRfBtp0dpDwd7W8tl5EPLeUlXhJstchlzH8me8MorEUSBHSaQ6lfOiCCSmPScEXvV 9m/8Xm2wAXY8qfPjnWhYMVkJOddMnr3Kc+l4+GrSZ1J7If0d/8943AFJoqleu089LXA94g Sz6EJ5xlMnuFFpiRBrNGXdLBW0e0PCECXM+TPJUH9iKqvkqN6NpBi3SBMRLMAKS0kZy8F6 Opw1loW8ZMnMBnMDJOA7Pd0sNmE0hTAF3FpyhdYij6PU50XMB75obEn+wmid2w== 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=1694454635; 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=xsNWAKz8KVr65D1qFWZweaR2Lf//8ZYxz8MWqMJl6cQ=; b=yKM3Js2bKXnwEk2HL9Cwu5fJYbIxrNA4BuGAuoCX2vLnJjtkX7w93sK2zJzEg6CNPp5Wkg lKAXJ4uojZQlf5B7goBN52gwmJy3QFMUfUeaFrh2yLeV2hkzoMg86JcNwx1unL58dwD53e vN9et/WB94vjltvWNCyqA6WNMComzyvsvQlqAmSIeOhSf6OFU07qE8ZfN+HYz//42BWlKp W8mBnJ+9JqExL13wO+rVG42hgtKYZ24ZsK+ovgLAfy66QYnUqgaODXShhjVyGhmXfyKTLa OsKqt4kNHFq7cqSjiRvSikbyPP9D5yjEWwXq5v2DccySkuptLQMqwlPEtyL1hQ== 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 4RkvQ261s9zyPk for ; Mon, 11 Sep 2023 17:50:34 +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 38BHoYlA040387 for ; Mon, 11 Sep 2023 17:50:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38BHoYmm040385 for bugs@FreeBSD.org; Mon, 11 Sep 2023 17:50:34 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: bugs@FreeBSD.org Subject: [Bug 273725] makefs command creates corrupted UFS fs when size option (-s) is specified Date: Mon, 11 Sep 2023 17:50:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jane062019a@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273725 Bug ID: 273725 Summary: makefs command creates corrupted UFS fs when size option (-s) is specified Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jane062019a@gmail.com Verified on FreeBSD 13.2, but it happens also on freebsd 15.0-CURRENT: makefs command executed without parameters creates a UFS clean fs as expect= ed, but if size option is used the fs is corrupt.=20 A simplified test: root@freebsd:~ # uname -a FreeBSD freebsd 13.2-RELEASE-p3 FreeBSD 13.2-RELEASE-p3 GENERIC amd64 E.g. I use the content of /usr/bin to fill out the new fs with makefs: root@freebsd:~ # du -hs /usr/bin/ 328M /usr/bin/ Without the -s option the fs is good: # makefs ./image1 /usr/bin Calculated size of `./image1': 400621568 bytes, 368 inodes Extent size set to 32768 ./image1: 382.1MB (782464 sectors) block size 32768, fragment size 4096 using 1 cylinder groups of 382.06MB, 12226 blks, 512 inodes. super-block backups (for fsck -b #) at: 64, Populating `./image1' Image `./image1' complete root@freebsd:/makefs_test # mdconfig -a -t vnode -f ./image1 md0 root@freebsd:/makefs_test # fsck /dev/md0 ** /dev/md0 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 367 files, 83999 used, 13768 free (40 frags, 1716 blocks, 0.0% fragmentatio= n) ***** FILE SYSTEM IS CLEAN ***** root@freebsd:/makefs_test # mount /dev/md0 /mnt root@freebsd:/makefs_test # du -hs /mnt 328M /mnt If any size is specified, the created fs is corrupt: root@freebsd:/makefs_test # makefs -s 600m ./image2 /usr/bin Calculated size of `./image2': 629145600 bytes, 368 inodes Extent size set to 32768 density reduced from 1709635 to 8192 ./image2: 600.0MB (1228800 sectors) block size 32768, fragment size 4096 using 1 cylinder groups of 600.00MB, 19200 blks, 76800 inodes. super-block backups (for fsck -b #) at: 64, Populating `./image2' Image `./image2' complete root@freebsd:/makefs_test # mdconfig -a -t vnode -f ./image2 md1 root@freebsd:/makefs_test # fsck /dev/md1 ** /dev/md1 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes UFS1 cylinder group 0 failed: cgp->cg_old_niblk ("11264") !=3D sblock.fs_ipg ("76800") CYLINDER GROUP 0: INTEGRITY CHECK FAILED REBUILD CYLINDER GROUP? [yn] y ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups SUMMARY INFORMATION BAD SALVAGE? [yn] y BLK(S) MISSING IN BIT MAPS SALVAGE? [yn] y 367 files, 83999 used, 67176 free (40 frags, 8392 blocks, 0.0% fragmentatio= n) ***** FILE SYSTEM IS CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** The fs is not repaired despite repeated fsck and the 'clean' final status: root@freebsd:/makefs_test # fsck -y /dev/md1 ** /dev/md1 ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes UFS1 cylinder group 0 failed: cgp->cg_old_niblk ("11264") !=3D sblock.fs_ipg ("76800") CYLINDER GROUP 0: INTEGRITY CHECK FAILED REBUILD CYLINDER GROUP? yes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups SUMMARY INFORMATION BAD SALVAGE? yes BLK(S) MISSING IN BIT MAPS SALVAGE? yes 367 files, 83999 used, 67176 free (40 frags, 8392 blocks, 0.0% fragmentatio= n) ***** FILE SYSTEM MARKED CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** Thank you! --=20 You are receiving this mail because: You are the assignee for the bug.=