Update and new bcachefs fs usage command
Added 2017-12-24 21:21:48 +0000 UTCReplication tests are finally all passing! This means that device removal and write error handling (for replicated writes) should finally be fully working.
Those two codepaths have in common that they need to modify pointers to existing btree nodes - removing the pointer to the device that either failed to write or is being removed - which is a particularly tricky operation, partially due to the btree node cache being physically indexed. Also fixed a whole bunch of bugs in the code that tracks replicas in the superblock recently, which is relevant to anyone who's using multiple devices.
The only thing left before replication is ready for real use is a tool to rereplicate degraded data (i.e. find all data in a filesystem that has fewer replicas than the desired number of replicas and write more copies). Also want a scrub tool, but that won't be much extra work once there's a userspace interface for these kinds of "do stuff with existing data" jobs.
There's also a new "bcachefs fs usage" command, which reports a whole bunch of information about disk usage. Example output (apologies for formatting):
Filesystem 96e038ff-b680-4d3d-b5fa-8b0ecf4f1ebe:
Size: 7.4G
Used: 1.2M
By replicas: 1x 2x 3x 4x
btree: 0 640.0K 0 0
data: 0 0 0 0
cached: 0 0 0 0
reserved: 0 0 0 0
online reserved: 0
Device 0 usage: /dev/sdb readwrite
data buckets fragmented
sb: 132.0K 2 124.0K
journal: 16.0M 128 0
btree: 640.0K 5 0
data: 0 0 0
cached: 0 0 0
Device 1 usage: /dev/sdc readwrite
data buckets fragmented
sb: 132.0K 2 124.0K
journal: 16.0M 128 0
btree: 640.0K 5 0
data: 0 0 0
cached: 0 0 0
Comments
Yes. One ssd and one spinner (I thought I had replied already, but I don't see it here...)
2018-04-02 16:23:17 +0000 UTCI have a fairly small patch that makes this a little more user-friendly. Are you interested? If so, I have a git account already, so I could do a PR?
2018-04-02 14:31:16 +0000 UTCIs it a multi device filesystem?
Kent Overstreet
2018-04-01 21:12:54 +0000 UTCAh, that did it, thanks. Still have the other error though: [root@bcachefs-test ~]# bcachefs list /dev/sda1 error opening /dev/sda1: Cannot allocate memory
2018-04-01 19:59:16 +0000 UTCPass it a path where the filesystem is mounted, like you would df
Kent Overstreet
2018-04-01 19:53:34 +0000 UTCOkay, made sure there was nothing stale on the spinner (/dev/sda). Created the same ssd+spinner filesystem and mounted it. Same two problems. Is this CentOS 7 related?
2018-04-01 18:53:14 +0000 UTCHmmm, that SSD had been being used for a ZFS pool. I see this: /dev/sda1: LABEL="tank" UUID="6128373464424778028" UUID_SUB="10325141586781680955" TYPE="zfs_member" I wonder if something stale was left? Let me try blowing everything on that SSD away and retry this...
2018-04-01 18:02:23 +0000 UTCNot sure where to ask this. Just built and booted latest bcachefs on centos 7. I got a filesystem mounted with a spinner as background and an ssd as promote and foreground targets. It seems to be running okay, except if I try 'bcachefs fs usage', I get: bcachefs fs usage BCH_IOCTL_QUERY_UUID ioctl error: Inappropriate ioctl for device And doing 'bcachefs fs /dev/sda1': error opening /dev/sda1: Cannot allocate memory
2018-04-01 17:54:23 +0000 UTCNice. Good steady incremental progress. Considering how we were at the beginning of 2017 really looking forward to where we'll be at the end of 2018! Keep up the great work!
veritanuda
2017-12-26 12:56:40 +0000 UTCthanks!
Kent Overstreet
2017-12-25 02:11:55 +0000 UTC