Mailinglist Archive: opensuse (1470 mails)

< Previous Next >
Re: [opensuse] experiences with bache / logic of caching
On Son, 2016-02-14 at 18:43 +0100, Carlos E. R. wrote:
On 2016-02-14 17:34, Olav Reinert wrote:
With writeback, bcache releases system calls as soon as the blocks
involved have been written to the SSD. Flushing to the underlying
storage happens later, asynchronously. Importantly, bcache
that the system can be safely shut down even if the cache is dirty;
will resume flushing at the next reboot.

Would fsck work with a dirty cache?

Ie, does fsck know that it has to read both the HD and the SSD to do
job properly?

Yes, it does:

Assuming /dev/sda is an SSD, and /dev/sdb is a spinning harddisk, and
that bcache is set up to cache sdb on sda. Then you will have a
/dev/bcache0 device to represent the caching assembly, and that's the
device on which the file system is created, not sda or sdb.
Consequently, /dev/bcache0 is the device to use in /etc/fstab, and when
running fsck.

bcache writes special superblocks on both sda and sdb to identify the
devices involved in a bcache assembly. (This allows automatic assembly
of /dev/bcache0 at boot time via udev rules.) Hence, running fsck
directly on sda or sdb won't work at all because it won't find any file
system superblocks.


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >