Would you prefer English? (Clink this!)
Why bcache?
bcache는 빠르지만 용량이 제한적인 SSD를 느리지만 저장 공간이 충분한 HDD의 캐시로 활용하는 linux kernel 모듈입니다.(like OSX fusion drive) 리눅스 커널 버전 3.10 이상이면 포함되어 있어서 Ubuntu (14.04.3 ~, 15.04 ~), Fedora (20~) 에서는 아래 명령어로 손쉽게 적용가능합니다.
ubuntu, install bcache-tools
apt-get install bcache-tools
fedora, install bcache-tools
yum install bcache-tools
우분투 15.04 + bcache + lvm2 + iscsi tgt으로 꽤 재미를 봐서 Xenserver 에 사용할 수 없을까 고민 중이었습니다.(4K 32 랜덤억세스 5MBytes/sec, core2duo 32bit)
Using bcache on XenServer 6.5
Xenserver 6.2 까지는 Linux Kernel Version 2.6 을 사용하기 때문에 bcache를 사용하기 어려웠지만, Xenserver 6.5 는 CentOS 5.10 기반으로 Kernel v3.10을 사용하기 때문에 bcache를 사용할 수 있습니다.
bcache는 bcache kernel module + bcache-tools user module 로 구성되어 있는데, 커널에 포함되어 있다면 bcache-tools 만 설치하면 사용할 수 있습니다. Ubuntu, Fedora 의 bcache-tools 도 커널 모듈이 아닌 bcache를 제어하기 위한 모듈을 설치해주는 패키지 입니다. Xenserver 에서도 커널에 bcache 모듈을 이미 포함하고 있기 때문에 bcache를 제어하는 bcache-tools (User space 모듈)만 Xenserver 에 올리면 됩니다.
다만, Ubuntu, Fedora 는 bcache-tools 설치 패키지가 존재하는데, Xenserver 가 오래된 CentOS 5 를 기반으로 하고 있기 때문에 Ubuntu나 Fedora 처럼 설치패키지가 존재하지 않습니다.
CentOS 5에서 bcache-tools package 가 존재하지 않는 가장 큰 이유는 CentOS 5.10 이 아직 2.X kernel 을 사용하기 때문일 것입니다. Xenserver 6.5 는 CentOS 5.10을 기반으로 하지만, 커널은 3.10 이상을 사용하기 때문에 bcache 를 사용할 수 있는 것입니다. (Xenserver 6.5 != CentOS 5.10)
bcache-tools가 yum/apt package에 없다면 직접 빌드해서 설치하면 됩니다.
다만, bcache-tools 을 설정 그대로 빌드하면 shared library 를 사용해서 빌드되는데, 이 경우 Xenserver 6.5 의 .so 와 일치 시켜야 되는데 일치 시키기가 쉽지 않습니다. shared library 를 일치 시키려면 bcache-tools 를 Xenserver 6.5 에서 빌드하면 가장 좋은데, build 에 필요한 libblkid, libuuid 가 오래된 버전이어서 bcache-tools 에서 사용되는 함수가 빠져 있습니다. (CentOS 5 epel repository 의 libblkid, liquid) 그렇다고 Xenserver 6.5 의 shared library 를 업그레이드 하자니 다른 모듈이 영향을 받을 것이기 때문에 일이 너무 커집니다.
커널 모듈은 올라가 있고 user space excutable 만 있으면 실행할 수 있는데, shared library version 맞추기가 어려워서 빌드하기 어렵습니다. 어떻게 해야 할까요?
그러면 Xenserver 의 Shared Library 에 영향받지 않도록, bcache-tools 를 Static Library 로 빌드하면 됩니다.
그래서 우리는 bcache-tools 를 libblkid, libuuid 를 포함해서 static library 로 빌드하기로 했습니다.
Xenserver 를 사용하거나 또는 kernel 은 지원하는데 user space module 실행에 어려움을 겪는 분들을 위해서 아래에 삽질한 내용을 공유합니다.
Check Kernel Support
# uname -a
Linux xenserver 3.10.0+2 #1 SMP Tue Dec 9 12:45:36 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Xenserver 에서 Kernel version 을 확인합니다. 3.10 이상이면 bcache 가 포함되어 있습니다.
# modprobe bcache
# lsmod|grep bcache
bcache 200549 4
# ls /sys/fs/bcache/
register register_quiet
확실하게 하기 위해서 커널 모듈을 로딩하고, /sys/fs/bcache 가 존재하는지 확인합니다. bcache 모듈이 로딩된다면 /sys/fs/bcache/ 가 반드시 존재해야 합니다.
Build Dependency (On Build Machine Not “XenServer”)
build util-linux – libblkid,libuuid
Xenserver 6.5 DDK 에서도 빌드가 가능할 수도 있는데, 개발환경을 맞추는 것이 번거로워서 Fedora 20 (linux kernel 3.11.10-301) 에서 bcache-tools을 빌드하기로 합니다.
bcache-tools 가 libblkid, libuuid 를 필요로 하는데, Fedora 20 의 패키지인 (libblkid-devel libuuid-devel) 이 shared library 만 설치하고 가장 필요한 static library는 포함하지 않아서 libblkid, libuuid도 직접 빌드 합니다.
$ git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
$ cd util-linux
$ ./autogensh
$ ./configure
$ make
$ sudo make install
install glibc
$ sudo yum install glibc-static
아마도 glibc 도 shared library 만 설치되어 있을 것입니다. 그래서 glibc도 static version 을 설치합니다.
Build Bcache-tools (On Build Machine Not “XenServer”)
get source
$ git clone http://evilpiepirate.org/git/bcache-tools.git
dependency 를 맞추었으면, 이제 bcache-tools 을 빌드합니다. 빌드하기 위해서 source 를 가져옵니다.
edit Makefile
#make-bcache: LDLIBS += `pkg-config –libs uuid blkid`
make-bcache: LDFLAGS += -static
make-bcache: LDLIBS += -lblkid -luuid
#make-bcache: CFLAGS += `pkg-config –cflags uuid blkid`
make-bcache: CFLAGS += -I/usr/include/blkid
make-bcache: bcache.o
#probe-bcache: LDLIBS += `pkg-config –libs uuid blkid`
probe-bcache: LDFLAGS += -static
probe-bcache: LDLIBS += -lblkid -luuid
#probe-bcache: CFLAGS += `pkg-config –cflags uuid blkid`
probe-bcache: CFLAGS += -I/usr/include/blkid
#bcache-super-show: LDLIBS += `pkg-config –libs uuid`
bcache-super-show: LDFLAGS += -static
bcache-super-show: LDLIBS += -luuid
bcache-super-show: CFLAGS += -std=gnu99
bcache-super-show: CFLAGS += -I/usr/include/blkid
bcache-super-show: bcache.o
bcache-register: LDFLAGS += -static
bcache-register: bcache-register.o
원래 bcache-tools Makefile 을 위와 같이 수정해 줍니다. 살펴보면 shared library 를 static library 를 사용하도록 변경하고, pkg_config 을 사용하지 않기 때문에 빠진 header 를 include 하도록 변경하는 내용입니다.
build bcache-tools with static library
$ make
Makefile 을 수정했다면 make 로 bcache-tools 를 Fedora 에서 static build 합니다.
Install Static Linked Bcache-tools (On “Xenserver”)
get bcache-tools with static library
static library 로 build 한 bcache-tools 에서 필요한 것은 모듈을 모아서 Xenserver 6.5 로 옮겨 줍니다. (make-bcache, bcache-super-show, probe-bcache, bcache-register, 69-bcache.rules)
위의 build 가 귀찮은 분들을 위해서 저희가 빌드한 모듈을 링크해 둡니다. (static linked bcache-tools by Hubrite) 링크의 파일에서 69-bcache.ruls 는 Fedora 20 를 참조해서 수정했고, 원래 bcache-tools 에는 없는 bcache.modules 를 포함하고 있습니다.
install bcache-tools
# install -m0755 make-bcache bcache-super-show /usr/sbin/
# install -m0755 probe-bcache bcache-register /lib/udev/
# install -m0644 69-bcache.rules /lib/udev/rules.d/
옮긴 파일을 위와 같이 Xenserver 6.5 에 설치합니다.
create /etc/sysconfig/modules/bcache.moduels
lsmod|grep -q bcache||/sbin/modprobe bcache >/dev/null 2>&1
# chmod +x /etc/sysconfig/modules/bcache.modules
부팅할 때 로딩하기 위해서 bcache.modules 를 추가해 주고, 실행 권한을 줍니다.
run bcache (automatic attach)
# make-bcache -C /dev/md2 -B /dev/md3 –writeback –discard
bcache 를 로딩하고 (modprobe bcache), bcache-tools 를 설치했다면 이제 bcache 를 동작시킬 수 있습니다. 위의 예는 /dev/md2 를 cache device (SSD) 로 사용하고, /dev/md3 를 backup device (HDD) 로 사용하는 예입니다.
makebcache 에서 -B,-C 를 한꺼번에 지정하면 추가 과정 없이 (attatch) bcache를 사용할 수 있습니다. 따로 하는 방법은 뒤에서 다시 설명합니다. (manual attach)
edit /etc/rc.local
echo /dev/md2 > /sys/fs/bcache/register
echo /dev/md3 > /sys/fs/bcache/register
blkid 버전이 높으면 (2.24 이상) 다음번 부팅에서 bcache device 를 자동으로 찾겠지만, Xenserver 의 blkid 는 버전이 낮기 때문에 bcache device 를 부팅할 때마다 register 해줘야 합니다. 그래서 make-bcache 에서 포맷한 bcache device 를 rc.local 에 넣어 줍니다.
/etc/sysconfig/modules/bcache.modules 에 추가해도 되는데, 저희는 md device를 사용하기 때문에 부팅 시퀀스가 모두 끝난 후에 register 해야 원할하게 동작하기 때문에 rc.local 에서 bcache device 를 registration 합니다.
edit /etc/lvm/lvm.conf
types= [ “nvme”, 64, “mtip32xx”, 64 , “bcache”, 251,]
위의 과정까지 하면 bcache block device 를 사용할 수 있습니다. (/dev/bcache0) 이제 /dev/sdX 를 사용하는 것 처럼 /dev/bcache0 을 사용할 수 있는데, Xenserver 에 필요한 lvm 을 사용하기 위해서는 lvm 에 bcache type 을 위와 같이 알려줘야 합니다. lvm.conf 를 수정하지 않으면 pvcreate 에서 filter 되는 것을 확인할 수 있습니다. (kern.log or pvcreate -vvv /dev/bcache0)
create SR
# xe sr-create content-type=user device-config:device=/dev/bcache0 \
host-uuid=”YOUR XenServer HOST UUID” name-label=”Local Storage (bcache)” \
shared=false type=lvm
LVM 에 bcache type 을 알려 주었으면 이제 Xen Storage Repository 를 드디어 만들 수 있습니다. 이 것 만들려고 여기까지 삽질한 것 아니겠습니까? 🙂
그 밖에
Bcache Manual Attach
# make-bcache -C /dev/md2
# make-bcache -B /dev/md3
# echo /dev/md2 > /sys/fs/bcache/register
# echo /dev/md3 > /sys/fs/bcache/register
# cat /sys/block/bcache0/bcache/state
no cache
# bcache-super-show -f /dev/md2|grep cset.uuid
XXXXXXXXXXXXXXXX
# echo XXXXXXXXXXXXXXXX > /sys/block/bcache0/bcache/attach
# cat /sys/block/bcache0/bcache/state
clean
make-bcache -C /dev/md2 -B /dev/md3 처럼 cache device (SSD) 와 backup device (HDD) 한꺼번에 만들지 않으면 backup device 에 cache device 를 attach 하는 과정이 필요합니다. 위의 attach 는 딱 한 번만 해주면 됩니다.
HDD 에 SSD 를 attach 하는 과정이라고 이해하면 됩니다. 그래서 ssd 의 cset.uuid 를 hdd 에 write 하는 것이고, 실제로 attach 전 후의 HDD 의 cset.uuid 를 bcache-super-show 로 관찰해보면 attach 하면 HDD 의 cset.uuid 가 ssd 의 cset.uuid로 변경되는 것을 볼 수 있습니다.
유용한 command
bcache 동작확인
# cat /sys/block/md2/bcache/running
1
cache mode 확인 및 변경
# cat /sys/block/md2/bcache/cache_mode
writethrough [writeback] writearound none
# echo writeback > /sys/block/bcache0/bcache/cache_mode
SSD trim 을 위해서 discard 명령 활성화
# echo 1 > /sys/block/bcache0/bcache/cache/cache0/discard
Segmentation Fault, make-bcache –wipe-bcache
# make-bcache -C /dev/md2 -B /dev/md3 –wipe-bcache
segmaentation fault
# dd if=/dev/zero of=/dev/md2 bs=512 count=1000
# bcache-super-show -f /dev/md2
위에서 빌드한 static linked bcache-tools 는 –wipe-bcache 옵션을 주면 segmentation fault 가 발생합니다. 그래서 사용하던 bcache 장비를 다시 bcache 장비로 만들 때, bcache signature 를 지우는 wipe-bcache 는 사용할 수 없고 대신 dd 를 사용해서 bcache super block 을 지워줘야 합니다. wipefs -a 를 사용해도 되는데, Xenserver의 wipefs 도 버전이 낮아서 -a 를 사용할 수 없습니다.
꼭 이렇게까지 해야하나요???
서비스하고 있는 여행의 시작 – Arrangy.com 의 메인 서버는 All SSD 로 구성되어 있습니다. SSD 값이 아무리 내리고 있다지만 TB 단위로 SSD 를 구매해서 서버를 채우는 것이 쉬운 일만은 아닙니다. 그래서 추가되는 서버들은 조금 더 경제적인 방법을 찾기 위해서 위해서 위의 삽질들이 필요합니다.
그래서 위의 삽질의 결과가 아래의 performance 입니다. bcache write-back 모드에서 테스트한 결과인데, write 는 HDD 를 어느 시점에서든지 거쳐야하기 때문에 read 성능보다 떨어지지만 추가 비용 없이 read/write 를 어느 정도 수준에서는 확보할 수 있을 것으로 예상합니다.
cache 가 SSD 에 있을 때의 이야기겠지만, 4K random 기준으로 read 13Mbytes/Sec, write 15Mbytes/Sec)는 전체가 SSD로 구성된 서버보다 우수한 결과를 보여주고 있습니다.

bcache performance (Windows10 VM, 4 x SSD RAID 0 + 2 x HDD RAID 1, SR)

All SSD Performance (Windows10 VM, 4 x SSD RAID 10)
우리가 한 삽질이 다른 분들에게도 도움이 되기를 기대하고, 더 깔끔한 솔루션은 다른 분들이 만들어 주시겠지요?
‘bcache’는 아래의 ‘여행의 시작 – Arrangy’ 서비스를 만드는데 사용하고 있습니다. 서버 보충했으니 다시 서비스 만들러 갑니다~
유럽 축구 성지 순례, 4,026Km
여행의 시작 – Arrangy (지도 클릭하면 실제 확인)
Is it possible to get this guide in english? I’ve tried a few translations, but they miss a few words.
Hi Joshua?
We edited some wordpress code block and you can read in English via google translate.
https://translate.google.com/translate?sl=ko&tl=en&js=y&prev=_t&hl=ko&ie=UTF-8&u=https%3A%2F%2Fhubrite.com%2F2015%2F11%2F02%2Fbcache-on-xenserver-6-5-by-static-linking%2F&edit-text=&act=url
You can get our woks in this link: http://1drv.ms/1MAneb1 (binary and configurations)
If you have troubled, let me know.
Possible to do this for Xenserver 7?
Sorry for solid answer for XenServer 7 environment. We don’t have any XenServer 7.
But you can probe bcache capability by this command (which is mentioned in above article)
# modprobe bcache
# lsmod|grep bcache
# ls /sys/fs/bcache/
try above commands and check ‘bcache’ is included in XenServer 7.
If ‘bcache’ is included, you should watch ‘register’ and ‘register_quiet’ in ‘/sys/fs/bcache’
Let me know above result if you try.
using your instructions, I got it to work on Xenserver 7 (at least compiled). 🙂
changes for util-linux
yum install autoconf automake gettext–devel libtool
git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
changes to makefile
My file
bcache-test: LDLIBS += `pkg-config –libs openssl` -lm
#make-bcache: LDLIBS += `pkg-config –libs uuid blkid`
#make-bcache: CFLAGS += `pkg-config –cflags uuid blkid`
#make-bcache: bcache.o
make-bcache: LDFLAGS += -static
make-bcache: LDLIBS += -lblkid -luuid
make-bcache: CFLAGS += -I /usr/include/blkid
make-bcache: bcache.o
#probe-bcache: LDLIBS += `pkg-config –libs uuid blkid`
#probe-bcache: CFLAGS += `pkg-config –cflags uuid blkid`
probe-bcache: LDFLAGS += -static
probe-bcache: LDLIBS += -lblkid -luuid
probe-bcache: CFLAGS += -I /usr/include/blkid
#bcache-super-show: LDLIBS += `pkg-config –libs uuid`
#bcache-super-show: CFLAGS += -std=gnu99
#bcache-super-show: bcache.o
the rest pretty much the same. Thanks mate!
Good luck Joshua and have a nice trip with XenServer 7.0 and bcache 🙂
I get an error. Same one twice. I thought it was because I updated other packages, but this time I didn’t. This is in xenserver 7. Won’t reboot.
http://imgur.com/a/HA7pQ
Sorry joshua. Did you apply bcache to “Xen Boot Partition”? (Not SR but Xen itself)
Maybe I did. I ran everything under root (hence cd ~).
Here is my complete setup.
yum install git gcc autoconf automake gettext-devel libtool glibc-static
git clone git: //git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
cd util-linux
./autogensh
./configure
make
sudo make install
cd..
git clone $ http://evilpiepirate.org/git/bcache-tools.git
cd bcache-tools
nano Makefile
PREFIX=/usr
UDEVLIBDIR=/lib/udev
DRACUTLIBDIR=/lib/dracut
INSTALL=install
CFLAGS+=-O2 -Wall -g
all: make-bcache probe-bcache bcache-super-show bcache-register
install: make-bcache probe-bcache bcache-super-show
$(INSTALL) -m0755 make-bcache bcache-super-show $(DESTDIR)${PREFIX}/sbi$
$(INSTALL) -m0755 probe-bcache bcache-register $(DESTDIR)$(UDE$
$(INSTALL) -m0644 69-bcache.rules $(DESTDIR)$(UDEVLIBDIR)/rules.d/
$(INSTALL) -m0644 — *.8 $(DESTDIR)${PREFIX}/share/man/man8/
$(INSTALL) -D -m0755 initramfs/hook $(DESTDIR)/usr/share/initramfs-$
$(INSTALL) -D -m0755 initcpio/install $(DESTDIR)/usr/lib/initcpio/ins$
$(INSTALL) -D -m0755 dracut/module-setup.sh $(DESTDIR)$(DRACUTLIBDIR)/m$
# $(INSTALL) -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
clean:
$(RM) -f make-bcache probe-bcache bcache-super-show bcache-test — *.o
bcache-test: LDLIBS + = `pkg-config -libs openssl` -lm
# Make-bcache: LDLIBS + = `pkg-config -libs uuid blkid`
# Make-bcache: CFLAGS + = `pkg-config -cflags uuid blkid`
# Make-bcache: bcache.o
make-bcache: LDFLAGS += -static
make-bcache: LDLIBS += -lblkid -luuid
make-bcache: CFLAGS += -I /usr/include/blkid
make-bcache: bcache.o
# Probe-bcache: LDLIBS += `pkg-config -libs uuid blkid`
# Probe-bcache: CFLAGS += `pkg-config -cflags uuid blkid`
probe-bcache: LDFLAGS += -static
probe-bcache: LDLIBS += -lblkid -luuid
probe-bcache: CFLAGS += -I /usr/include/blkid
# Bcache-super-show: LDLIBS += `pkg-config -libs uuid`
# Bcache-super-show: CFLAGS += -std = gnu99
# Bcache-super-show: bcache.o
bcache-super-show: LDFLAGS += -static
bcache-super-show: LDLIBS += -luuid
bcache-super-show: CFLAGS += -std=gnu99
bcache-super-show: CFLAGS += -I /usr/include/blkid
bcache-super-show: bcache.o
bcache-register: LDFLAGS += -static
bcache-register: bcache-register.o
make
install -m0755 make-bcache bcache-super-show /usr/sbin/
install -m0755 probe-bcache bcache-register /lib/udev/
install -m0644 69-bcache.rules /lib/udev/rules.d/
echo ‘lsmod | grep -q bcache | / sbin / modprobe bcache> / dev / null 2> & 1’ >> /etc/sysconfig/modules/bcache.modules
chmod +x /etc/sysconfig/modules/bcache.modules
#uninstall util-linux
cd ~
cd util-linux
make uninstall
oh, to answer your question. No, I don’t even get to the point of creating a bcache. I just want to make sure it installs and I can reboot successfully before I try to create any bcache’s… I wouldn’t create it for the root.
1. Joshua, I tested bcache on Xenserver7 (in VirtualBox)
try below clip. I successfully made bcache SR on Xenserver 7.0
https://www.facebook.com/hubrite/videos/1330040520357475/
Clean Install Xenserver 7 and use my binary used in Xen 6.5 ( http://1drv.ms/1MAneb1 )
2. You should install “bcache-tools” on your Xenserver 7 (After “install bcache-tools” above article)
Would you install bcache-tools on your build machine like Fedora22?
everything installs, but when I try to reboot, that’s when errors occur. Even after installing util-linux by itself… the system becomes unbootable.
“You should install “bcache-tools” on your Xenserver 7 (After “install bcache-tools” above article)
Would you install bcache-tools on your build machine like Fedora22?”
I don’t understand what you are asking.
I thought I was installing bcache-tools using “make install” after I “make”‘d the bcache git version.
It sounds like you want people to use the static built version you linked as if it were a type of rpm. Is that correct?
Does that mean I don’t need to attempt installation of util-linux as well?
Is there any way you can screenshot your history on your xenserver? I’ve been using virtualbox as well today in trying to troubleshoot this.
For sure, when I install util-linux… whether it’s 2.24, or 2.28… my linux will fail to restart. So I’m guessing I don’t need to install util-linux?
YOU SHOULD NOT COMPILE ‘bcache-tools’ on XENSERVER!!!
I think you compiled ‘bcache-tools’ on Xenserver 7. Is that right?
Because of many dependencies and confliction, I compiled ‘bcache-tools’ on Fedora 22. (Fedora 22 is same kernel and redhat-release version of Xenserver 6.5.)
Maybe install util-linux and other components you installed makes Xenserver bootless.
Use binary I already compiled or Build your binary on your LINUX not XENSERVER is up to you. I linked binary for your convenience.
(building bcache-tools is somewhat bothersome…)
TRY BUILD ‘bcache-tools’ ON OTHER LINUX AND KEEP XENSERVER CLEAN.
And then just install the ‘bcache-tools’ which is build on another machine to Xenserver.
Lol, thanks mate. Will give that a try. Makes a lot of sense now.
Two more questions.
Do I use the –prefix command to install bcavhe to an alternate location so I van tar it and move it to xenserver?
And why fc22 vs centos 7? Or was it because in your case fc21 was closer to the kernel xenserver 6.5 was on even though it was still centos 5?
Maybe you already done 🙂
1. -prefix is probably ok. Because binary is not depend on anythings (all included static linking) and XenServer can find your binary in any locations (by PATH)
2. Sorry!!!!!!!!!! I think I used FC22 but restore backup and check version…. I USED FC20 (linux kernel 3.11.10-301). I don’t know why I write FC22. I fix it (FC22 -> FC20)
I choose FC20 (3.11.10-301) because kernel version of Xenserver 6.5 is 3.10.0+2. (Maybe…)
I finally figured it out looking at your statics. I used centos 7 as my dev environment. I was able to install it in xenserver 7. I will try out tonight. Thank you for all your support (sorry for being such a headache!)
https://drive.google.com/open?id=0B_BdaXUaNVMnMjdvdG9QeVRNdEE
Good Luck to you.
Our bothersome work will help your work is good things.
Your comments is proof of our previous tedious things is not useless. 🙂
hrmmm…. I got it up and running, but I’m certainly not getting the benchmarks you were. I see just standard raid performance… my 4k random’s are super low, about 4MB/s, and my caching device is lvm stripe across 4 ssd’s, I did a tail /sys/block/bcache0/bcache/stats_total/* to check the status, and it shows reads being done… I have writethrough disabled… what’s weird is my raid controller card (backing device) has a 512MB ramcache on it as well, so the writes isn’t an issue with the caching I believe… must be some bottleneck with xenserver
solved, needed guest-tools installed
http://imgur.com/a/g80Gp
Congratulations:) impressive random write speed and hard work!!!!! Would you work on Saturday?
One more things, check vm volume latency sometimes (by munin). In my case, Latency did soar to seconds level. I recreated bcache block device and disappeared.
Pingback: Links 24/7/2016: Elive 2.7.1 Beta, New Flatpaks and Snaps | Techrights
Centos7 에서 설명하신대로 하고 있습니다. 올려주신 모듈을 압축을 풀어보면 bcache.modules이 없습니다.
install.sh 에 보면
install -m0755 bcache.module /etc/sysconfig/modules/
이 라인이 있어서 필요한 파일인듯 한데, 어떻게 진행을 해야 하나요??
안녕하세요?
/etc/sysconfig/modules/bcache.module 은
echo ‘lsmod | grep -q bcache | / sbin / modprobe bcache> / dev / null 2> & 1’ >> /etc/sysconfig/modules/bcache.modules
로 만들어지는데,
없으면, /etc/sysconfig/modules/bcach.module 이라는 파일을 만들고 아래 내용을 채워 넣으세요.
lsmod|grep -q bcache||/sbin/modprobe bcache >/dev/null 2>&1
* 그리고 더 중요한 것은, 위의 글은 ‘yum install bcache-tools’ 가 실행되지 않는 xenserver 같은 환경을 위한 내용입니다. ‘yum install bcache-tools’ 로 설치할 수 있으면 필요 없는 내용입니다.
# make-bcache -B /dev/sdc -writeback -discard
block size too small
이라는 메세지가 출력됩니다.
도움이 필요합니다.
안녕하세요?
make-bcache -B /dev/sdc 를 실행했을 때의
/var/log/kern.log, /var/log/message 정보가 더 있어야 무슨 이야기를 할 수 있을 것 같습니다. 🙂