All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr.-Ing. Heiko Münkel" <heiko.muenkel@arcor.de>
To: linux-bcachefs@vger.kernel.org
Subject: bcachefs as a caching filesystem
Date: Sun, 9 Apr 2023 12:55:35 +0200	[thread overview]
Message-ID: <3d6a29d9-91aa-cc81-85cf-978320a7018a@arcor.de> (raw)

Hello,

I am in the process of testing bcachefs. I have two partitions 
/dev/nvme0n1p1 and /dev/sde1. The first (internal SSD) should be as 
cache for the second (is an SSD on a USB3 port).

First I created the bcachefs file system with:
   sudo bcachefs format \
        --label=Shotwell-3 /dev/sde1 \
        --label=Shotwell-Cache-1 /dev/nvme0n1p1 \
        --foreground_target /dev/nvme0n1p1 \
        --promote_target /dev/nvme0n1p1 \
--background_target /dev/sde1
and then mount the disks with
  sudo mount -t bcachefs /dev/nvme0n1p1:/dev/sde1 /mnt

This worked fine so far. I then used dd to create a 100GB file on /mnt 
and found, as expected, that the file was written much faster.

Since I occasionally want to use the external disk on another machine, I 
then tried disconnecting the cache from the array.

Since I didn't really find anything in the documentation about this, I 
tried the following command (after the external disk had come to rest 
and thus the 100GB file was presumably also on the disk):
     bcachefs device evacuate /dev/nvme0n1p1

After this command, it took what felt like hours for the external disk 
to come to rest again. Is this normal?

Is this the right command for this case, or do I have to use the command
   bcachefs device offline /dev/nvme0n1p1
to disconnect the cache and
   bcachefs device online /dev/nvme0n1p1
to reconnect?


Thanks for your help,

Heiko





             reply	other threads:[~2023-04-09 10:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-09 10:55 Dr.-Ing. Heiko Münkel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-10 11:51 bcachefs as a caching filesystem Dr.-Ing. Heiko Münkel
2023-04-10 13:46 ` Brian Foster
2023-04-11 21:20   ` Dr.-Ing. Heiko Münkel
2023-04-13 18:37     ` Brian Foster
2023-04-15 16:54       ` Dr.-Ing. Heiko Münkel
2023-04-17 15:52         ` Brian Foster
2023-04-18 20:16           ` Dr.-Ing. Heiko Münkel
2023-04-08  7:39 Dr.-Ing. Heiko Münkel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d6a29d9-91aa-cc81-85cf-978320a7018a@arcor.de \
    --to=heiko.muenkel@arcor.de \
    --cc=linux-bcachefs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.