{"id":1001,"date":"2011-02-01T16:51:27","date_gmt":"2011-02-01T09:51:27","guid":{"rendered":"http:\/\/www.icez.net\/blog\/?p=1001"},"modified":"2011-09-25T21:09:40","modified_gmt":"2011-09-25T14:09:40","slug":"openvz-flashcache-instal","status":"publish","type":"post","link":"https:\/\/www.icez.net\/blog\/1001\/openvz-flashcache-instal","title":{"rendered":"0117 | \u0e25\u0e07 Flashcache \u0e43\u0e19 OpenVZ"},"content":{"rendered":"<p>\u0e2a\u0e32\u0e23\u0e1e\u0e31\u0e14\u0e27\u0e34\u0e0a\u0e32\u0e21\u0e32\u0e23\u0e01\u0e31\u0e19\u0e40\u0e25\u0e22\u0e17\u0e35\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e01\u0e27\u0e48\u0e32\u0e08\u0e30\u0e25\u0e07\u0e44\u0e14\u0e49 \u0e40\u0e25\u0e48\u0e19\u0e40\u0e2d\u0e32\u0e41\u0e17\u0e1a\u0e15\u0e32\u0e22<br \/>\n\u0e2d\u0e31\u0e19\u0e17\u0e35\u0e48\u0e08\u0e23\u0e34\u0e07\u0e21\u0e31\u0e19\u0e19\u0e34\u0e14\u0e40\u0e14\u0e35\u0e22\u0e27\u0e40\u0e2d\u0e07\u0e04\u0e23\u0e31\u0e1a \u0e41\u0e04\u0e48\u0e44\u0e1b\u0e40\u0e2d\u0e32 source \u0e21\u0e32<\/p>\n<p>\u0e01\u0e48\u0e2d\u0e19\u0e2d\u0e37\u0e48\u0e19 check \u0e01\u0e48\u0e2d\u0e19\u0e40\u0e25\u0e22\u0e27\u0e48\u0e32\u0e43\u0e0a\u0e49 kernel \u0e15\u0e31\u0e27\u0e44\u0e2b\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e14\u0e49\u0e27\u0e22\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07<\/p>\n<pre lang=\"bash\">uname -r<\/pre>\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e14\u0e49\u0e32\u0e19\u0e25\u0e48\u0e32\u0e07\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a kernel <strong>ovzkernel-xen<\/strong> <strong>ovzkernel-2.6.18-274.el5.028stab093.2<\/strong> \u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a<br \/>\n\u0e2b\u0e32\u0e01 version \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e01\u0e47\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e1b\u0e2b\u0e32 source tree \u0e43\u0e2b\u0e21\u0e48\u0e14\u0e49\u0e27\u0e22 \u0e17\u0e35\u0e48 http:\/\/ftp.openvz.org\/kernel\/branches\/rhel5-2.6.18\/current\/<\/p>\n<p><!--more--><\/p>\n<p>\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e02\u0e49\u0e32\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c root \u0e23\u0e31\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<\/p>\n<pre lang=\"bash\">yum install rpm-build.x86_64 git.x86_64 ovzkernel-xen-devel.x86_64 ovzkernel-xen.x86_64\r\nshutdown -r now<\/pre>\n<p>\u0e23\u0e35\u0e1a\u0e39\u0e17\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e19\u0e36\u0e07 \u0e41\u0e25\u0e49\u0e27\u0e01\u0e47\u0e2d\u0e2d\u0e01\u0e21\u0e32\u0e1e\u0e34\u0e21\u0e1e\u0e4c\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e1e\u0e27\u0e01\u0e19\u0e35\u0e49\u0e14\u0e49\u0e27\u0e22\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c user \u0e18\u0e23\u0e23\u0e21\u0e14\u0e32<br \/>\n(\u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e30 root \u0e01\u0e47\u0e44\u0e14\u0e49 \u0e41\u0e15\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e02\u0e49\u0e32\u0e21\u0e1a\u0e32\u0e07\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 \u0e01\u0e30\u0e41\u0e01\u0e49\u0e44\u0e02 path \u0e40\u0e2d\u0e32\u0e40\u0e2d\u0e07\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a)<\/p>\n<pre lang=\"bash\">cd\r\nmkdir -p rpmbuild\/{BUILD,RPMS,SOURCES,SPECS,SRPMS}\r\necho '%_topdir %(echo $HOME)\/rpmbuild' > .rpmmacros\r\nwget http:\/\/mirrors.thzhost.com\/openvz\/kernel\/branches\/rhel5-2.6.18\/current\/ovzkernel-2.6.18-274.el5.028stab093.2.src.rpm\r\nrpm -i ovzkernel-2.6.18-274.el5.028stab093.2.src.rpm 2>&1 | grep -v mockb\r\ncd rpmbuild\/SPECS\/\r\nrpmbuild -bp --target=`uname -m` kernel-ovz.spec 2> prep-err.log | tee prep-out.log\r\ncd ..\/BUILD\/ovzkernel-2.6.18\/linux-2.6.18-274.el5.028stab093.2.x86_64\/\r\nmake oldconfig\r\nmake prepare\r\nmake modules_prepare\r\nrsync -av \/usr\/src\/kernels\/2.6.18-274.el5.028stab093.2-x86_64\/ .\/<\/pre>\n<p>\u0e01\u0e25\u0e31\u0e1a\u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e17\u0e35\u0e48\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c root \u0e44\u0e1b\u0e42\u0e2b\u0e25\u0e14\u0e44\u0e1f\u0e25\u0e4c src flashcache \u0e08\u0e32\u0e01 github \u0e21\u0e32<br \/>\nhttps:\/\/github.com\/facebook\/flashcache\/tarball\/master<\/p>\n<p>\u0e41\u0e15\u0e01\u0e44\u0e1f\u0e25\u0e4c\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22 cd \u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e43\u0e19 folder \u0e19\u0e31\u0e49\u0e19\u0e41\u0e25\u0e49\u0e27\u0e1e\u0e34\u0e21\u0e1e\u0e4c<\/p>\n<pre lang=\"bash\">make KERNEL_TREE=\/home\/icez\/rpmbuild\/BUILD\/ovzkernel-2.6.18\/linux-2.6.18-274.el5.028stab093.2.x86_64  KERNEL_SOURCE_VERSION=2.6.18-274.el5.028stab093.2 install<\/pre>\n<p>\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e04\u0e27\u0e32\u0e21\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e14\u0e49\u0e27\u0e22\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07<br \/>\nmodprobe flashcache<\/p>\n<p>\u0e16\u0e49\u0e32\u0e44\u0e21\u0e48\u0e21\u0e35 error \u0e2d\u0e30\u0e44\u0e23\u0e02\u0e36\u0e49\u0e19\u0e21\u0e32\u0e01\u0e47\u0e1c\u0e48\u0e32\u0e19 <s>\u0e16\u0e49\u0e32\u0e21\u0e35\u0e01\u0e47\u0e41\u0e01\u0e49\u0e01\u0e31\u0e19\u0e40\u0e2d\u0e07\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a T_T<\/s><br \/>\n\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e30<br \/>\n\u0e17\u0e35\u0e48\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e01\u0e47\u0e2a\u0e23\u0e49\u0e32\u0e07 flashcache device (check \u0e43\u0e2b\u0e49\u0e41\u0e19\u0e48\u0e43\u0e08\u0e27\u0e48\u0e32\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49 mount harddisk \u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a)<\/p>\n<pre lang=\"bash\">flashcache_create -b 4k -s 100g vzdata \/dev\/SSD \/dev\/HDD<\/pre>\n<p>\u0e21\u0e31\u0e19\u0e08\u0e30\u0e44\u0e14\u0e49 block device \u0e17\u0e35\u0e48 \/dev\/mapper\/vzdata<br \/>\n\u0e43\u0e2b\u0e49 mount \u0e17\u0e35\u0e48\u0e44\u0e2d\u0e49\u0e19\u0e35\u0e48\u0e41\u0e17\u0e19\u0e44\u0e14\u0e49\u0e40\u0e25\u0e22\u0e04\u0e23\u0e31\u0e1a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e2a\u0e32\u0e23\u0e1e\u0e31\u0e14\u0e27\u0e34\u0e0a\u0e32\u0e21\u0e32\u0e23\u0e01\u0e31\u0e19\u0e40\u0e25\u0e22\u0e17\u0e35\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e01\u0e27\u0e48\u0e32\u0e08\u0e30\u0e25\u0e07\u0e44\u0e14\u0e49 \u0e40\u0e25\u0e48\u0e19\u0e40\u0e2d\u0e32\u0e41\u0e17\u0e1a\u0e15\u0e32\u0e22 \u0e2d\u0e31\u0e19\u0e17\u0e35\u0e48\u0e08\u0e23\u0e34\u0e07\u0e21\u0e31\u0e19\u0e19\u0e34\u0e14\u0e40\u0e14\u0e35\u0e22\u0e27\u0e40\u0e2d\u0e07\u0e04\u0e23\u0e31\u0e1a \u0e41\u0e04\u0e48\u0e44\u0e1b\u0e40\u0e2d\u0e32 source \u0e21\u0e32 \u0e01\u0e48\u0e2d\u0e19\u0e2d\u0e37\u0e48\u0e19 check \u0e01\u0e48\u0e2d\u0e19\u0e40\u0e25\u0e22\u0e27\u0e48\u0e32\u0e43\u0e0a\u0e49 kernel \u0e15\u0e31\u0e27\u0e44\u0e2b\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e14\u0e49\u0e27\u0e22\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 uname -r \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e14\u0e49\u0e32\u0e19\u0e25\u0e48\u0e32\u0e07\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a kernel ovzkernel-xen ovzkernel-2.6.18-274.el5.028stab093.2 \u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \u0e2b\u0e32\u0e01 version \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e01\u0e47\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e1b\u0e2b\u0e32 source tree \u0e43\u0e2b\u0e21\u0e48\u0e14\u0e49\u0e27\u0e22 \u0e17\u0e35\u0e48 http:\/\/ftp.openvz.org\/kernel\/branches\/rhel5-2.6.18\/current\/<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/comments?post=1001"}],"version-history":[{"count":7,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1312,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/posts\/1001\/revisions\/1312"}],"wp:attachment":[{"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/media?parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/categories?post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icez.net\/blog\/wp-json\/wp\/v2\/tags?post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}