Commit Graph

321 Commits

Author SHA1 Message Date
Jacob Malevich
34980cc0df bcacheadm: dev path parsing
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>
2014-11-18 14:23:02 -08:00
Jacob Malevich
4603dcf36b Option for returning only the uuid of the dev when doing a
query-dev

Change-Id: Ia055da0516bc7baac836642fa1405b77adfc5139
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-14 11:24:02 -08:00
Jacob Malevich
28271115d7 bcache query-dev fixes, and don't print the sb out for status
Change-Id: I909ac15ca32a9cdecd6c7455e884d14f30ab0188
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-13 17:31:39 -08:00
Jacob Malevich
3fda6adc19 bcacheadm: list-cachesets --list-devs option
lists the devices in each cacheset

Change-Id: Ie3beb38203eefc3ab64b2a3d37652964f7021e54
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-13 17:08:20 -08:00
Jacob Malevich
7d34cf342e bcacheadm: register bcache ioctl already takes an argv, no need to parse it
Change-Id: I0295ebde998c038feb40332ea303935035b8e2bd
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-13 12:46:03 -08:00
Jacob Malevich
34f54790d5 bcacheadm: fix tiering and backing device bugs
TODO: Support multiple devices for a single -C or -B flag

Change-Id: I73b18a39a0e0ff564600c2fc7386a785d3a10870
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-12 17:51:42 -08:00
Jacob Malevich
552dc9fa7d bcacheadm: format bug fixes
bcacheadm format is now working in replacement of make-bcache

Change-Id: Ib152dde3b8dc1418d1508020529dd58e4cf5d222
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-12 15:22:38 -08:00
Jacob Malevich
84eb67c6a6 Initial template for bcacheadm man page.
TODO: Work with Kent to fill in descriptions for several items

Change-Id: Iea4fe9e6a99842bf40b0213eecb61d48952aa1bb
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-10 18:42:36 -08:00
Jacob Malevich
b602f0bf6a Update some bcacheadm error messages
Change-Id: Iddc638dacb7c68b621d686ba632da16fbe39bc15
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-10 15:37:58 -08:00
Jacob Malevich
bae9ea7bbd bcacheadm stats, add flags
-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>
2014-11-06 18:11:31 -08:00
Jacob Malevich
269761b11f bcacheadm status [FLAGS] <list of stats>
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>
2014-11-06 15:36:38 -08:00
Jacob Malevich
637b614630 bcacheadm status <list of devs>
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>
2014-11-05 17:45:57 -08:00
Jacob Malevich
bc69c8fe04 bcacheadm add list-cachesets and query-devs
Change-Id: Ie2bc7ba8293d1d493c0a215119456e4bb9e659aa
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-10-27 17:37:25 -07:00
Jacob Malevich
82ac2a0338 bcacheadm tool
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>
2014-10-27 17:37:05 -07:00
Jacob Malevich
0fca0e5502 Add multiple bucket_sizes to make-bcache
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>
2014-10-27 12:14:44 -07:00
Jacob Malevich
ee44c4f509 set btree_node_size for the cache_sb based on bucket_size
Change-Id: I98dab6e9a221cd8781095039d653ace84ffae806
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-10-27 12:14:38 -07:00
Jacob Malevich
e8c1cee578 Create libbcache.a.
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>
2014-10-27 12:13:52 -07:00
Kent Overstreet
2b1176d6d5 Add crc32c support
Change-Id: I9f830560b25cc84d77f46e3670ed07c05f44adc9
2014-09-11 15:55:39 -07:00
Kent Overstreet
02c47b0373 Superblock version 6
Change-Id: Iba976c8c5a4a91dcac06145471fc70baa6a6393e
2014-08-29 21:48:17 +00:00
Surbhi Palande
219c3966c8 Changed the keyword register_devices to register
This change is done after a discussion with Slava and
Raghu.

Change-Id: I225a890f08e162536d080d66bddaeae02196d215
Signed-off-by: Surbhi Palande <sap@rts26.daterainc.com>
2014-08-07 15:04:43 -07:00
cmf
0013272744 add missing dependency linux-headers
Change-Id: I9dea8e70a60b11d0626b06f20f0dc3471d945ad0
2014-08-07 09:57:31 -07:00
Surbhi Palande
59a6730a02 Better usage message.
Invoking bcachectl will now show you a help
message and a usage indicator.

Change-Id: I9f6163b196b32723c21ddbce04d4a20015173a1a
Signed-off-by: Surbhi Palande <sap@daterainc.com>
2014-08-05 16:20:55 -07:00
Surbhi Palande
73ef76c1c0 Add bcachectl: to start bcache, add and remove devices.
Useful for lifecycle management of bcache devices.

Change-Id: Icdcb559786ab0557dbe7f2a30b5dbeacf7dad665
Signed-off-by: Surbhi Palande <sap@daterainc.com>
2014-08-05 11:28:47 -07:00
rk
039b45dfe9 make-bcache.c: Added support for storing "label" information for the
the devices in the super-block.
bcache.h:       Bring version information to the latest kernel version.
bcache-super-show.c: Add setsize for caching devices. This indicates
                     the number of devices in caching set.

Testing done:

1.0  make-bcache with --label option and checking back to see if
     bcache-super-show shows the devices.
2.0  bcache-super-show does not bail if version is 5.
3.0  bcache-super-show shows the correct setsize.

Change-Id: If0f1ec6204b233b34ff4c8a57a8809d2c8dbe3e3
2014-06-03 10:24:10 -07:00
Slava Pestov
9115b9a7ba make-bcache: update --help 2014-05-01 11:00:30 -07:00
Rob Millner
576336b326 RHEL 7 dependencies 2014-03-28 23:51:17 +00:00
Kent Overstreet
93c17b5f5f fix Makefile.am to use pkg-config 2014-03-20 22:05:38 +00:00
Kent Overstreet
214dd0cb2d Add support for setting cache tier field 2014-03-20 13:46:04 -07:00
Kent Overstreet
a1aa5961dc Merge remote-tracking branch 'remotes/angband/master'
Conflicts:
	make-bcache.c
2014-03-20 13:38:08 -07:00
Rob Millner
fc10e61267 Substitute proper package name 2014-03-18 19:15:39 +00:00
Automation
9d3f3f0f8e Merge ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2014-01-22 15:32:21 -08:00
Claudio Fleiner
07f64dea00 add missing spec files 2013-11-25 21:39:35 +00:00
Nicholas Swenson
9ae5ee2905 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools
Conflicts:
	.gitignore
2013-11-21 17:41:18 -08:00
Nicholas Swenson
fd07c41fcd .gitignore: tags, scope
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
2013-11-03 00:55:22 -07:00
Nicholas Swenson
f5cf644def bcache: writes correct superblock for multiple cache devs
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
2013-10-31 16:15:49 -07:00
Claudio Fleiner
24e98ce46d Adding autotools support to bcache-tools
thie enables building it in a different directory, more
flexible install and configure options, and should make it
easier to eventualy create deb and rpm packages. Additionally
this makes it much easier to build and test this package
as it now behaves the same way as others we are using.
2013-10-28 22:47:23 -07:00
Rolf Fokkens
89f11b135d Simplify 69-bcache.rules
Gabriel: simplified a bit further
2013-10-11 13:21:56 +02:00
Rolf Fokkens
4ff504e17b Add an INSTALL macro to the Makefile 2013-10-07 12:57:45 +02:00
Rolf Fokkens
6494253698 Add DRACUTLIBDIR to Makefile 2013-10-07 12:57:38 +02:00
Rolf Fokkens
7703224daa Add a dracut module for bcache 2013-10-07 12:57:31 +02:00
Gabriel
86ba62c6a1 Move probe-bcache to UDEVLIBDIR 2013-10-06 17:35:59 +02:00
Gabriel
0c7a484a5b udev: Fit into the standard rule sequence
Move the rule to run a bit later, after
the standard udev rules have called blkid.

Don't run blkid manually, and run probe-bcache
as a fallback which can be patched out in a
package that depends on util-linux 2.24+.

probe-bcache: bail if libblkid finds anything
Preserve our last-resort safety check here
in case earlier rules fail to call blkid.
2013-10-05 22:16:22 +02:00
Gabriel
866e21a35d super-show: Print label 2013-10-03 13:48:50 +02:00
Gabriel
decab73814 super-show: Show sync mode and cache replacement policy 2013-09-27 12:05:46 +02:00
Gabriel
8b3e39e052 Install the initramfs hook in /usr/share not /etc 2013-09-22 12:34:51 +02:00
Gabriel
0d54a238b1 Use the absolute path to modprobe
This is necessary on Fedora, according to Rolf Fokkens.
2013-09-22 01:15:36 +02:00
Gabriel
b15fb776c9 make-bcache: Prevent stray superblocks
Fail if the device has any leftover superblock or partition table label.

Add a --wipe-bcache flag to overwrite bcache superblocks and recommend
wipefs for non-bcache superblocks.

Once the device is safe to write, always zero immediately before the
bcache superblock.

Make sure errors go to stderr.  Use pkg-config.
2013-09-01 12:38:11 +02:00
Kent Overstreet
8327108eea Use register_quiet for udev hook 2013-08-26 14:46:19 -07:00
Claudio Fleiner
fe921e118b Merge git://evilpiepirate.org/~kent/bcache-tools
Conflicts:
	README - fixed
2013-08-12 10:39:08 -07:00
Claudio Fleiner
f2c0495fc6 Creating package bcache-tools 2013-08-12 10:36:11 -07:00