From owner-svn-src-all@freebsd.org Fri Nov 1 03:12:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3A5C1A19F6; Fri, 1 Nov 2019 03:12:36 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4746gm4pMSz4D11; Fri, 1 Nov 2019 03:12:36 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7CA3518D62; Fri, 1 Nov 2019 03:12:36 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f171.google.com with SMTP id 205so7986226qkk.1; Thu, 31 Oct 2019 20:12:36 -0700 (PDT) X-Gm-Message-State: APjAAAVxVGrfx+13OcEGtKM0Hj4G2vU5cGqbi+Je66csIuyKebHVV28P +W6ibk3PsqSNEXKbAjCU4rVsyxvVmSwJL7Aew4M= X-Google-Smtp-Source: APXvYqwcpyTSqefPIoAR5htHV8UE0lXxuYAZkXuCmYy/enlZvkcafZCaxKbyW6fndjBtQhv/ikRQ3VNF+HGw8fpJx20= X-Received: by 2002:ae9:ef50:: with SMTP id d77mr2648199qkg.430.1572577955910; Thu, 31 Oct 2019 20:12:35 -0700 (PDT) MIME-Version: 1.0 References: <201911010310.xA13ArC0061756@repo.freebsd.org> In-Reply-To: <201911010310.xA13ArC0061756@repo.freebsd.org> From: Kyle Evans Date: Thu, 31 Oct 2019 22:12:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r354236 - head/sbin/mdmfs To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Nov 2019 03:12:36 -0000 On Thu, Oct 31, 2019 at 10:11 PM Kyle Evans wrote: > > Author: kevans > Date: Fri Nov 1 03:10:53 2019 > New Revision: 354236 > URL: https://svnweb.freebsd.org/changeset/base/354236 > > Log: > mdmfs(8): add -k skel option to populate fs from a skeleton > > mdmfs(8) lacks the ability to populate throwaway memory filesystems from an > existing directory. > > This features permits an interesting setup where /var for instance lives on > a device where wear-leveling is something you want to avoid as much as > possible and nonetheless you don't want to lose your logs, ports metadata, > etc. Here are the steps: > > 1. Copy /var to /var.bak; > 2. Mount an mfs into /var using -k /var.bak at startup; > 3. Synchronize /var to /var.bak weekly and on shutdown. > > Note that this more or less mimics OpenBSD's mount_mfs(8) -P flag. > > PR: 146254 > Submitted by: jlh (many moons ago) > MFC after: 1 week Reviewed by: bcr (manpages) Differential Revision: https://reviews.freebsd.org/D19963