This shows the superblock set_uuid, given the user_uuid.
Signed-off-by: Jacob Malevich <jam@daterainc.com>
Issue DAT-1913
Change-Id: If5f81427ac02bceeb609ae119f044de3fb5a0d77
it might not exists when a cache disk device is removed and
further cache device might be active.
Also handle the case where cache set might not be registered
and the status should just believe what the super block
says and not mark the disk as missing.
This part of code needs optimization but that is a separate
change.
Issue DAT-1859
Issue DAT-1860
Change-Id: I7eb8e8ff517eae240fde30c70b3ac90aa9a50ed6
information in both set-uuid and user-uuid until support is added
in the CLI to display user-uuid as part of query-devs and in
format command to accept set_uuid and user_uuid.
Issue DAT-
Change-Id: I6f2306d858211933cb783f0efe8fe0ade64dd312
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>
Don't say that the device is missing unless it is still showing
"active" state.
Change-Id: I708d7719c6f6804cd06e75cbadf7bea36ac4b62d
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>
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>
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>
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>
-c cache# displays stats for a specific cache in the cacheset
--stats-five-min,hour,day,total specific stats for the cacheset
Change-Id: I436d36d0853a250fe773573126c7a50a7251c72d
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>
bcacheadm is a combination of make-bcache, probe-bcache, bcache-super-show, and bcachectl(register).
Change-Id: Ia4f4cdd5f882516358eb0e26a75296d2103af1d0
Signed-off-by: Jacob Malevich <jam@daterainc.com>