Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11301871rwl; Mon, 2 Jan 2023 18:41:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXs1brjPpsBGsm2EM1JMbcfZ2yJoQq7FLYeiNVmosTbPKxsWOCeenArDVcDjceFqzHcRT5eW X-Received: by 2002:a17:902:7409:b0:192:6019:a3d7 with SMTP id g9-20020a170902740900b001926019a3d7mr35338861pll.41.1672713696252; Mon, 02 Jan 2023 18:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672713696; cv=none; d=google.com; s=arc-20160816; b=FQ9XU0q/70om1GpU32fjRLJf9ple24kVNoj/pJotWLOAnjK9jQZv86Cx83ixflspnM 4/GCfYB2i+dzG3xBCBqOoFeYf74hJG3fPGc/ip/xSmfUj0OdL8WczLdJz5Lt8rzuLWoc VHlsQJ0pPzukqTMiFL/taiCXmvGEjW8qpsj/9VOPEskP1qupB6f50PWrYxwsDcG0k1uS 3By4qN8g2U/ZL2UojtOEJJoC4/vn/fmRmgfZPimTIXcwVAqnxO9PBk6aeQ20qrGR4lMc L9lQyQakP8bB8JJ/a6P9Stvg0S2eB3RmX4mF+EMVXAKR2+W+6KAEFbIi84ZZEbDe2MgL zOgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=ACJ0MMfaKzzvdW3+vvyyWCvPBf1dCgvj1E4aCNa+qUU=; b=qn6bddAAVZru8MSyOGBgF7QxiAVRnFhmwIhGxweEPem17JoVBPXBAUYUucLdBZQKMl p7g8XFsI05Epimw4ItyKqIBnrNPHLW9XOVawJcYIT9lDqT3lLZAAd+2kd3H2rN8LMW4k 8+zYC514am4WqXnw/nLNDo2e/0E+hgId5rC1EOxTn+CZdFE3nZ8PYeeYfX3MDshE3GYF Fvv7FsirpnUeEQzO4wJyfXEQOTjeS+CdycLxfIxWivAL/fLutv4FSVyXrdbR2YnzB+ED iwZ0QtMZaR8FrAZ8WkvtxxlBR0lckEwicFF4isIOk1oMRQC+svreWLWZo6wyGJVJ6dxX A5YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n23-20020a63a517000000b004985aa60f58si27468220pgf.192.2023.01.02.18.41.17; Mon, 02 Jan 2023 18:41:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232938AbjACCho (ORCPT + 99 others); Mon, 2 Jan 2023 21:37:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbjACChn (ORCPT ); Mon, 2 Jan 2023 21:37:43 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45EC22C8 for ; Mon, 2 Jan 2023 18:37:41 -0800 (PST) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NmH0n5RKLzRqLX for ; Tue, 3 Jan 2023 10:36:09 +0800 (CST) Received: from [10.174.177.174] (10.174.177.174) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 3 Jan 2023 10:37:39 +0800 Message-ID: <1346be25-5984-e980-9745-f3944c4ddb74@huawei.com> Date: Tue, 3 Jan 2023 10:37:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: ext4 superblock checksum invalid after running resize2fs Content-Language: en-US To: Zsolt Murzsa , "linux-ext4@vger.kernel.org" References: From: Baokun Li In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.174] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 2023/1/3 8:35, Zsolt Murzsa wrote: > Hi! > > I've had the same issue with twice in the last couple of days with the resize2fs online expand function. > I have a md raid 1, with an LVM volume, which is formatted with ext4. I resized the volume (from 4T to 5T), then I ran resize2fs, which ran without error, the file system got bigger. > > After a few hours, I reset the machine (unsafely), due to some zombie processes, but after restarting, the system could not mount the filesystem. > I checked the disks, and ran some hardware checks, but I didn't find anything wrong. I thought the hard reset caused some problem. > > That was the problem: "Superblock checksum does not match superblock". I tried several superblocks, e2fsck, testdisk, but nothing helped, dumpe2fs showed all the data about the superblock. > I started to restore from a backup. > > In the meantime, I found the debugfs tool, with which I could skip the checksum check and thus see all the folders and files that I restored to a separate disk. > I replaced the two drives, recreated md RAID 1, LVM, then reformatted with ext4, started copying the data back. > > I ran out of space so expanded the LV and ran resize2fs again (from 3T to 5T). It ran successfully again, the attached file system is 5T. > Then I ran an e2fsck. > > "e2fsck -n /dev/vg1/data > e2fsck 1.46.5 (30-Dec-2021) > Warning! /dev/vg1/data is mounted. > ext2fs_open2: Superblock checksum does not match superblock > e2fsck: Superblock invalid, trying backup blocks... > e2fsck: Superblock checksum does not match superblock while trying to open /dev/vg1/data > > The superblock could not be read or does not describe a valid ext2/ext3/ext4 > filesystem. If the device is valid and it really contains an ext2/ext3/ext4 > filesystem (and not swap or ufs or something else), then the superblock > is corrupt, and you might try running e2fsck with an alternate superblock: > e2fsck -b 8193 > or > e2fsck -b 32768 " > > I'm shocked it happened again. > I can currently write / read the files, but it is suspicious that I will not be able to mount the filesystem again. > In the first case, I couldn't find a simple solution, but is it possible to fix the checksum somehow? > It takes a lot of time to use debugfs to copy everything to another drive and back again. > > My current kernel version: 5.19.17-1-pve. > I can attach all the superblocks (Both the first and second case), or any other information, if needed. > > Best Regards, > Zsolt Murzsa Hi Zsolt, Maybe this patch on the mainline has fixed your problem: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a408f33e895e455f16cf964cb5cd4979b658db7b -- With Best Regards, Baokun Li .