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>
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>
TODO: Work with Kent to fill in descriptions for several items
Change-Id: Iea4fe9e6a99842bf40b0213eecb61d48952aa1bb
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>
This is needed since libbcache expects an array of bucket sizes to be passed in. This is just so the tests can continue to use make-bcache until we can change them over to bcacheadm.
Change-Id: I1002e3d8355d45ffa914e6577569a5adfd1d6ccf
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>