mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-22 00:00:03 +03:00
Documentation/makefile work
This commit is contained in:
parent
97de91cb58
commit
bca2b16e55
14
INSTALL
Normal file
14
INSTALL
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
Dependencies:
|
||||
|
||||
* libblkid
|
||||
* libuuid
|
||||
* libnih
|
||||
* libscrypt
|
||||
* libsodium
|
||||
* libkeyutils
|
||||
|
||||
On debian, you can install these with
|
||||
apt install -y libblkid-dev uuid-dev libnih-dev libscrypt-dev libsodium-dev libkeyutils-dev
|
||||
|
||||
Then, just make && make install
|
25
Makefile
25
Makefile
@ -8,21 +8,15 @@ PKGCONFIG_LIBS="blkid uuid libnih"
|
||||
CFLAGS+=`pkg-config --cflags ${PKGCONFIG_LIBS}`
|
||||
LDLIBS+=`pkg-config --libs ${PKGCONFIG_LIBS}` -lscrypt -lsodium -lkeyutils
|
||||
|
||||
ifeq ($(PREFIX), "/usr")
|
||||
ifeq ($(PREFIX),/usr)
|
||||
ROOT_SBINDIR=/sbin
|
||||
else
|
||||
ROOT_SBINDIR=$(PREFIX)/sbin
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: bcache
|
||||
|
||||
install: bcache
|
||||
$(INSTALL) -m0755 bcache $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0644 -- bcache.8 $(DESTDIR)$(PREFIX)/share/man/man8/
|
||||
|
||||
clean:
|
||||
$(RM) bcache *.o *.a
|
||||
|
||||
CCANSRCS=$(wildcard ccan/*/*.c)
|
||||
CCANOBJS=$(patsubst %.c,%.o,$(CCANSRCS))
|
||||
|
||||
@ -34,5 +28,18 @@ bcache-objs = bcache.o bcache-assemble.o bcache-device.o bcache-format.o\
|
||||
|
||||
bcache: $(bcache-objs) libccan.a
|
||||
|
||||
deb:
|
||||
.PHONY: install
|
||||
install: bcache
|
||||
mkdir -p $(DESTDIR)$(ROOT_SBINDIR)
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8/
|
||||
$(INSTALL) -m0755 bcache $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0755 mkfs.bcache $(DESTDIR)$(ROOT_SBINDIR)
|
||||
$(INSTALL) -m0644 bcache.8 $(DESTDIR)$(PREFIX)/share/man/man8/
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) bcache *.o *.a
|
||||
|
||||
.PHONY: deb
|
||||
deb: all
|
||||
debuild -nc -us -uc -i -I
|
||||
|
33
README
33
README
@ -1,27 +1,12 @@
|
||||
These are the userspace tools required for bcache.
|
||||
Userspace tools for bcache-dev/bcachefs
|
||||
|
||||
Bcache is a patch for the Linux kernel to use SSDs to cache other block
|
||||
devices. For more information, see http://bcache.evilpiepirate.org.
|
||||
Documentation for the run time interface is included in the kernel tree, in
|
||||
Documentantion/bcache.txt.
|
||||
This builds the bcache tool, which has a number of subcommands for formatting
|
||||
and managing bcachefs filesystems:
|
||||
|
||||
Included tools:
|
||||
bcache format
|
||||
bcache unlock
|
||||
bcache assemble
|
||||
bcache incremental
|
||||
etc.
|
||||
|
||||
make-bcache
|
||||
Formats a block device for use with bcache. A device can be formatted for use
|
||||
as a cache or as a backing device (requires yet to be implemented kernel
|
||||
support). The most important option is for specifying the bucket size.
|
||||
Allocation is done in terms of buckets, and cache hits are counted per bucket;
|
||||
thus a smaller bucket size will give better cache utilization, but poorer write
|
||||
performance. The bucket size is intended to be equal to the size of your SSD's
|
||||
erase blocks, which seems to be 128k-512k for most SSDs; feel free to
|
||||
experiment.
|
||||
|
||||
probe-bcache
|
||||
Only necessary until support for the bcache superblock is included
|
||||
in blkid; in the meantime, provides just enough functionality for a udev script
|
||||
to create the /dev/disk/by-uuid symlink. The arguments it does support are the
|
||||
same as for blkid.
|
||||
|
||||
bcache-super-show
|
||||
Prints the bcache superblock of a cache device or a backing device.
|
||||
Run bcache --help for full list of commands.
|
||||
|
80
bcache.8
80
bcache.8
@ -1,9 +1,9 @@
|
||||
.TH bcacheadm 8
|
||||
.TH bcache 8
|
||||
.SH NAME
|
||||
bcacheadm \- manage bcache devices
|
||||
bcache \- manage bcache filesystems/devices
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B bcacheadm
|
||||
.B bcache
|
||||
[\fIoptions\fR]
|
||||
.B COMMAND
|
||||
[\fIoptions\fR]
|
||||
@ -51,61 +51,63 @@ to create the /dev/disk/by-uuid symlink.
|
||||
|
||||
.BR help
|
||||
.RS
|
||||
List the bcacheadm commands
|
||||
List the bcache commands
|
||||
.RE
|
||||
|
||||
.SH OPTIONS
|
||||
.SH Options for bcacheadm
|
||||
.SH Options for bcache
|
||||
.TP
|
||||
.BR \--help
|
||||
|
||||
|
||||
.SH Options for format
|
||||
.TP
|
||||
.BR \-C
|
||||
Create a cache
|
||||
.TP
|
||||
.BR \-B
|
||||
Create a backing device
|
||||
.TP
|
||||
.BR \-b\ --bucket-size=
|
||||
Specifies the bucket size.
|
||||
.TP
|
||||
.BR \-l\ --label=
|
||||
label
|
||||
.SH Global options:
|
||||
.TP
|
||||
.BR \-w,\ --block=
|
||||
block size (hard sector size of SSD, often 2k
|
||||
block size, in bytes (e.g. 4k)
|
||||
.TP
|
||||
.BR \-t,\ --tier=
|
||||
tier of subsequent devices
|
||||
.BR \-w,\ --btree_node_size=
|
||||
btree node size in bytes - default 256k
|
||||
.TP
|
||||
.BR \--cache-replacement-policy=
|
||||
one of lru, fifo, or random
|
||||
.BR \--metadata_checksum_type=TYPE
|
||||
.TP
|
||||
.BR \-o,\ --data_offset=
|
||||
data offset in sectors
|
||||
.BR \--data_checksum_type=TYPE
|
||||
where TYPE is one of none, crc32c (default), or crc64
|
||||
.TP
|
||||
.BR \--cset-uuid=
|
||||
Create a cache device with the specified UUID
|
||||
.BR \--compression_type=TYPE
|
||||
where TYPE is one of none (default), lz4 or gzip
|
||||
.TP
|
||||
.BR \--csum_type=
|
||||
One of none, csc32c, or csc64
|
||||
.BR \--encrypted
|
||||
Enable encryption; passphrase will be prompted for
|
||||
.TP
|
||||
.BR \--meta-replicas=
|
||||
Number of metadata replicas
|
||||
.BR \--error_action=TYPE
|
||||
where TYPE is one of continue, readonly (default) or panic
|
||||
.TP
|
||||
.BR \--data-replicas=
|
||||
Number of data replicas
|
||||
.BR \-l\ --label=LABEL
|
||||
Create the filesystem with the specified label
|
||||
.TP
|
||||
.BR \--wipe-bcache
|
||||
Destroy existing bcache data if present
|
||||
.BR \--uuid=UUID
|
||||
Create the filesystem with the specified UUID
|
||||
.TP
|
||||
.BR \--force
|
||||
Force the filesystem to be created, even if the device already contains a
|
||||
filesystem
|
||||
|
||||
.SH Options that apply to subsequent devices:
|
||||
.TP
|
||||
.BR \--fs_size=SIZE
|
||||
Create the filesystem using SIZE bytes on the subsequent device
|
||||
.TP
|
||||
.BR \-b\ --bucket-size=SIZE
|
||||
Specifies the bucket size - must be greater than the btree node size
|
||||
.TP
|
||||
.BR \-t,\ --tier=INDEX
|
||||
Specifies the tier of subsequent devices, where INDEX is a small integer and a
|
||||
smaller index indicates a faster tier - tier 0 being the fastest. Currently only
|
||||
two tiers are supported.
|
||||
.TP
|
||||
.BR \--discard
|
||||
Enable discards
|
||||
.TP
|
||||
.BR \--writeback
|
||||
Enable writeback
|
||||
Enable discards on subsequent devices
|
||||
|
||||
.SH Options for register
|
||||
|
||||
@ -117,7 +119,7 @@ Provide a directory other than /sys/fs/bcache
|
||||
.SH Options for query-devs
|
||||
.TP
|
||||
.BR \-f,\ --force-csum
|
||||
Enables bcacheadm to going even if the superblock crc is invalid
|
||||
Enables bcache to going even if the superblock crc is invalid
|
||||
|
||||
.SH Options for status
|
||||
|
||||
|
3
debian/control
vendored
3
debian/control
vendored
@ -4,7 +4,8 @@ Uploaders: Robie Basak <robie@justgohome.co.uk>
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Standards-Version: 3.9.5
|
||||
Build-Depends: debhelper (>= 9), pkg-config, uuid-dev, libblkid-dev
|
||||
Build-Depends: debhelper (>= 9), pkg-config, libblkid-dev, uuid-dev, libnih-dev,
|
||||
libscrypt-dev, libsodium-dev, libkeyutils-dev
|
||||
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/bcache-tools.git
|
||||
Vcs-Git: git://anonscm.debian.org/collab-maint/bcache-tools.git
|
||||
Homepage: http://bcache.evilpiepirate.org/
|
||||
|
3
debian/rules
vendored
3
debian/rules
vendored
@ -2,6 +2,3 @@
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- DRACUTLIBDIR=/usr/lib/dracut
|
||||
|
||||
|
3
mkfs.bcache
Executable file
3
mkfs.bcache
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec bcache format "$@"
|
Loading…
Reference in New Issue
Block a user