Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5622314rwp; Mon, 17 Jul 2023 07:07:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJ1/8BlosxKC/3htmizOjRy9uFaZnn9UR9TeR7udhJwNx4ShTsEWciPnSFtCAmj7bw48X8 X-Received: by 2002:a17:902:e804:b0:1b8:a277:4b5b with SMTP id u4-20020a170902e80400b001b8a2774b5bmr13203119plg.7.1689602844697; Mon, 17 Jul 2023 07:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689602844; cv=none; d=google.com; s=arc-20160816; b=s2RLFBpOfFtAyW0QyWZQEYpv4Jtt9a/E0WXLGFHvKnfKzGqL5sUoPyWa5XzQRb5NbU zDfVWZzuTrdcR8MOeHg44Q5bB0HAF37ctufCzFFjthuqV9ccHTydJlZ4HGho7IPvDt5T CqlQJ8gkxwL+nEh0yWaAYdf9tvZxJpEZC2fXQZZ4iktoVuQ2axQYNhUnoXQyKIyPoKhT F8ioQTASbUfiA52FtBTR4mV/TobCcHUBUoRdWkgdWFzoU+jdvYQde4pdoY4M9KiR66mD LPvE3ljiN4OCkz7djKnCN1t0w+NFy7U8/ccM0JVreGIEpxyKsmmeKfs5OPsKQoaUS95J F+6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=oYHuuSfNjJZcBmM6jc7gdvXI0YIA2XY0RjFUm7p2/wA=; fh=X4ZSTchFPb/YY78j+Q56RewUV5pWz8pjgpnEj9/jP3Q=; b=TfT52eY2YvGt9bD5P2nWEWrE/wzresFWkqcqPJSm6/WUaAfidGxT475H2rqNU8UhlK boBN+I8g0vWGDBTKErRy2U0KH4WmUxAxIM09wm0wyILpKGWFIJZ3E0IlG6BMBUOtfv/c /0CxOeu63rvM7lK9qVp0V/puv3e5+8o6N5SiqgCr81tyCEitmAwEBkSePrEsetEZ0sd5 22iBOvS4YzAYWqj6AeLuG+057WF8gb7uctPy/KRfx1jE4lvZp4tpQKVD2gBCepin6gnR mhySzeAcPrE8ostd44f7jaoq1vJqtuAJi4wOXiWah6StXmNvxk9ZfT0DqPxmArdUkq+E fx5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=olnVw8DG; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u20-20020a170902e21400b001aae905065csi11193233plb.284.2023.07.17.07.07.17; Mon, 17 Jul 2023 07:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-embedded-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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=olnVw8DG; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjGQNuy (ORCPT + 37 others); Mon, 17 Jul 2023 09:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjGQNux (ORCPT ); Mon, 17 Jul 2023 09:50:53 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51BC18F for ; Mon, 17 Jul 2023 06:50:52 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3a36b309524so3571989b6e.3 for ; Mon, 17 Jul 2023 06:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689601851; x=1692193851; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oYHuuSfNjJZcBmM6jc7gdvXI0YIA2XY0RjFUm7p2/wA=; b=olnVw8DGB1/LhkAuPtgqcvOSAnA1J5PT6AeaEfcyQyzNSx4+fQTgTuL1P2Hsq6FkBY 21tvgTqw2QpnWtDVvK1ioGVfgAHN5BUR4Z5+aDNGx5U5XDFHxVCgG14ynOJa5dGAYmwA ViRDNt8RjoXSfkvNAyMIoHwtChajRna9E2bFpgLtCTcNNQHz/DPXb4eNQkO1MsCCSQG5 ZefBQOu0ytMc6pCm3NfqLJCPt2Zso+LU+4o2I4i0KKIeZMBsjo8eK0EvqMTOgD8yT2NF lZRHZBkef5+UsS7R+SuaG0dC15/CjkU/AsuhnT63jNP+DZoNtkJ52yA8OO/3Elsi29Vw Fi3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689601851; x=1692193851; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oYHuuSfNjJZcBmM6jc7gdvXI0YIA2XY0RjFUm7p2/wA=; b=RolBYfY95SxdyLiPGADmdcw8v3H1hZA2x8/ZAy40HiQcSh4o7/9LN5cLWvIw8YhsWx VmhcUE0cjRyZO9bukTNsn+nNyd6S/GLU6RBlTyRrdZosZA/K5JvXBlLEy1S+LW/Bm7Eq 4zjVMy9zfnWjyOW+W+mOaCMsr8TKn9c+V0dA9PYSk3keiRXMvZyk79w0NhCiwRv9xYbX XGANNpoiDCVHyhH5kZ99G5t9X3RwGkDbJU8vzvNKdSjSAK6L43cesLaWvP5PXkYK6+TC JRidQU0OxjMGN2LB4Zy+tOVnX9XiW230Ocihtd2s+VG1fBxunqXfR8ROY1yEi2b8qfO8 uP6g== X-Gm-Message-State: ABy/qLauXbaTw1iVf4CFx52vrUDB3r5SW4hy8NP57WDx3lmZoE75Hp/n wHcWiUcOyzVHy0L72OwZ6AT9bVZbwPwOASCcnjaqb1wrmGY= X-Received: by 2002:a05:6358:5922:b0:132:db25:bbfc with SMTP id g34-20020a056358592200b00132db25bbfcmr10650047rwf.2.1689601851342; Mon, 17 Jul 2023 06:50:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:7108:76a4:b0:31a:16:342c with HTTP; Mon, 17 Jul 2023 06:50:50 -0700 (PDT) In-Reply-To: <20230717075035.GA9549@tomerius.de> References: <20230717075035.GA9549@tomerius.de> From: "Alan C. Assis" Date: Mon, 17 Jul 2023 10:50:50 -0300 Message-ID: Subject: Re: File system robustness To: Kai Tomerius Cc: linux-embedded@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-embedded@vger.kernel.org Hi Kai, On 7/17/23, Kai Tomerius wrote: > Hi, > > let's suppose an embedded system with a read-only squashfs root file > system, and a writable ext4 data partition with data=journal. > Furthermore, the data partition shall be protected with dm-integrity. > > Normally, I'd umount the data partition while shutting down the > system. There might be cases though where power is cut. In such a > case, there'll be ext4 recoveries, which is ok. > > How robust would such a setup be? Are there chances that the ext4 > requires a fsck? What might happen if fsck is not run, ever? Is there > a chance that the data partition can't be mounted at all? How often > might that happen? > Please take a look at this document: https://elinux.org/images/0/02/Filesystem_Considerations_for_Embedded_Devices.pdf In general EXT4 is fine, but it has some limitation, more info here: https://opensource.com/article/18/4/ext4-filesystem I think Linux users suffer from the same problem we have with NuttX (a Linux-like RTOS): which FS to use? So for deep embedded systems running NuttX I follow this logic: I need better performance and wear leveling, but I don't need to worry about power loss: I choose SmartFS I need good performance, wear leveling and some power loss protection: SPIFFS I need good performance, wear leveling and good protection for frequent power loss: LittleFS In a NuttShell: There is no FS that 100% meets all user needs, select the FS that meets your core needs and do lots of field testing to confirm it works as expected. BR, Alan