Also display the internal cacheset uuid for each dev, stored in
the superblock.
As well as the dev uuid stored in the struct member_info.
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Issue DAT-1913
Change-Id: Ib9815a023b0791c54ffde573fda1e9911d757c34
add-devs, rm-devs, and set-failed no longer need the
cacheset uuid. The cacheset already comes with the bcache_extent0
chardev.
Change-Id: I32572e865361d3c6ce759cf53f19d3f0e4cf04ce
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Given a cacheset uuid and a device uuid, set that devices
member_info to CACHE_FAILED.
Change-Id: Ideb2034b1deb5fd11efda67f85b82d8a49fe71e4
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Cross reference the superblock with the highest sequence number
to sysfs. If there is a device shown still active in the superblock,
mark it as 'missing'.
Fixes DAT-1758
Change-Id: I13098bbde6bd4b0b402c74ed648160576605311c
Signed-off-by: Jacob Malevich <jam@daterainc.com>
If the user added n caches but <n bucket_sizes, print a message
saying that cache# will be using the default bucket_size
Change-Id: I025474ca672bf79d1c88813e6f030ba7590e820d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
buckets over 512k were causing deadlocks when the btree node
size was smaller than the bucket size.
Change-Id: Icb278d75c241e9643ab1355620e3d656df52c4ee
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Previously we were reading old superblocks stuck in the cache.
Pass in O_DIRECT when opening the device. This requires that
the dest buffer be memaligned.
If we are unable to read the entire superblock then increase
the buffer and try again.
Also since we now have to alloc the sb, make sure it is freed
everywhere in bcacheadm.
Fixes DAT-1609 DAT-1626
Change-Id: I04b5337b992a8569809835b5826a2656df753214
Signed-off-by: Jacob Malevich <jam@daterainc.com>
list-cachesets now searches through all cache# symlinks
instead of iterating with i++. This is because bcache
doesn't immediately reuse a cache# symlink when a dev
gets removed.
Fixes DAT-1635
Progress DAT-1646
Change-Id: I6901e29dc13f4e2a76bdc49871e87f07667ec786
Signed-off-by: Jacob Malevich <jam@daterainc.com>
prints the device capacity, and free space for a cacheset
example:
bcacheadm capacity -u UUID --devs
Device Name Capacity (512 Blocks) Free (512 Blocks)
/dev/sdb 1048576.00 1024128.00
/dev/sdc 1048576.00 1024128.00
/dev/sdd 1048576.00 1024128.00
Total 3145728.00 3072384.00
Also did some bcacheadm stats refactoring.
Change-Id: Iff5562191478c5fd9f03399a9479d3d75740904d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
bcacheadm query-devs --brief /dev/sdb /dev/sdc /dev/sdd
will output table showing only the dev name, dev uuid,
server uuid, and cluster uuid for each device
Change-Id: I47a375c9a8f9284942befa0151fae32b0b856a53
Signed-off-by: Jacob Malevich <jam@daterainc.com>
previously it wasn't properly looking through the list of
member info in the cache that has the highest seq.
Change-Id: I2a6ebf6bd0814055ec1247d0f4d79dab683115d3
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Option to add multiple devices and remove single devices.
bcacheadm add-devs --set=uuid <list of devices>
bcacheadm rm-dev <dev>
Change-Id: I4f0a287c02dfad76d8263554e455c408191ea7ba
Signed-off-by: Jacob Malevich <jam@daterainc.com>
uses unregister ioctl to unregister a cacheset that the device
belongs to
Change-Id: I01772de3471888c4951f050b3e92f41b58c5d103
Signed-off-by: Jacob Malevich <jam@daterainc.com>
simplifies input for finding stats for a single dev
Change-Id: I5d879aaa8cb68aaaedabd2bc780fbea4994e2541
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Parse out the dev name for list-cachesets --list-devs
This gives the dev path that will be needed for query-dev
to get the superblock
Change-Id: I333cd8a0e593e02d7635111309b8aff14050cc41
Signed-off-by: Jacob Malevich <jam@daterainc.com>
TODO: Support multiple devices for a single -C or -B flag
Change-Id: I73b18a39a0e0ff564600c2fc7386a785d3a10870
Signed-off-by: Jacob Malevich <jam@daterainc.com>
bcacheadm format is now working in replacement of make-bcache
Change-Id: Ib152dde3b8dc1418d1508020529dd58e4cf5d222
Signed-off-by: Jacob Malevich <jam@daterainc.com>
FLAGS:
--list -list all stats in the uuid directory
--all -list all stats/values in the uuid directory
--uuid -must pass in a uuid for the cacheset
TODO: -subdirectory stats for individual caches
-subdirectory stats for over time stats
Change-Id: Ic7126a511fb17aa8c9ac7bf89e014ddbb719f46d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
provides status for the newest sb version for each tier for all
the devs passed in
Change-Id: Ib6e5b08e65b5c36e7b1af0e9806efc39d069f94c
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Move make-bcache, probe-bcache, and bcache-super-show functions into a
static library called libbcache.
Change-Id: Ieed626225e08507a8ccd12f6bb0c07f64480de9b
Signed-off-by: Jacob Malevich <jam@daterainc.com>