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>
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>
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>