Xubuntu 13.04上的Flashcache

首先,我是使用flashcache的noob,我将在这里发布的所有内容都在研究它。

我有一个华硕K56CM,i5配备500GB高清和24Gb SSD用于缓存。 在Windows 8中,默认操作系统使用Expresscache在SSD中缓存HD。

我想在Xubuntu中做同样的事情,我已经看到Flashcache是​​更好的方法。

我已经遵循了几本手册,但我正在放松一些东西。

分区表是:

sda 8:0 0 465,8G 0 disk ├─sda1 8:1 0 5,9G 0 part [SWAP] ├─sda2 8:2 0 117,2G 0 part / └─sda3 8:3 0 342,7G 0 part /home sdb 8:16 0 22,4G 0 disk ├─sdb1 8:17 0 250M 0 part /boot/efi ├─sdb2 8:18 0 5,9G 0 part └─sdb3 8:19 0 16,3G 0 part 

SDA是硬盘,SDB是SSD

在SDB2中我使用gdisk进行Intel Rapid Boot,我想在SDB3中缓存/ home。

我所遵循的演练是( http://nitocris.over-blog.net/article-flash-cache-as-home-or-root-on-ubuntu-109792445.html ):

  - apt-get install git-core - mkdir -p ~/Build/ ; cd ~/Build/ - git clone https://github.com/facebook/flashcache.git - sudo apt-get install git build-essential dkms linux-headers-`uname -r` uuid-dev - cd flashcache - sudo make -f Makefile.dkms all boot_conf - sudo make install - sudo modprobe flashcache - sudo echo "flashcache" >> /etc/modules - dmesg | tail 

现在安装了Flashcache。 但我的问题是当我创建flashcache链接时。

我使用SDA3的UUID并在SDB3上创建flashcache_Create:

 - umount /home - flashcache_create -p back home_cached /dev/sdb3 /dev/disk/by-uuid/XXX-XXX (the ID) 

然后,我编辑FSTAB,评论/ home挂载并添加:

 - /dev/mapper/home_cached /home reiserfs defaults 0 2 

一切都好,但是现在,然后当我重启系统时,/ home没有安装……我不知道为什么……

有帮助吗?

谢谢!

PD:抱歉我的英语,我是西class牙语:S

编辑:好的,我有解决方案。 必须在每次重新启动时创建Flashcache,因此我创建了一个在引导时执行的脚本。 我在这里描述了它: http : //ubuntuforums.org/showthread.php?t = 2179297

我有同样的问题; 我想出了这个upstart conf文件,它将找到所有flashcache驱动器并加载它们,然后为驱动器设置sysctl设置,然后安装它们。 如果添加更多驱动器,您只需将它们添加到/ etc / fstab并确保它们在第四个字段中具有选项nobootwait,例如

/ dev / mapper / export / export ext4 nobootwait 0 1

这是文件,应该进入/etc/init/flashcache.conf

 # flashcache - Set up flashcache devices and mount them description "Set up flashcache devices and mount them on boot" start on mounted task console output script # Load any flashcache devices and get them ready to mount, then set sysctl settings. PATH=/sbin:/bin:/usr/bin # Load up any flashcache devices for P in /dev/disk/by-id/*; do if flashcache_load $P 2>/dev/null; then echo "Loaded flashcache device from $P" fi done # Now look through all WRITE_BACK devices and set the sysctl settings for d in $(dmsetup table | grep 'cache mode(WRITE_BACK)' | perl -pe 's@.*ssd dev \(/dev/disk/by-id/(.*?)\), disk dev \(/dev/disk/.*?/(.*?)\).*@$1+$2@'); do # disable writing dirty cache data at shutdown sysctl -w dev.flashcache.$d.fast_remove=1 # change reclaim policy from FIFO to LRU sysctl -w dev.flashcache.$d.reclaim_policy=1 # do not write "stale" data to disk until evicted due to lack of space sysctl -w dev.flashcache.$d.fallow_delay=0 done end script 

参考:
如何安装和使用flashcache / bcache将HDD缓存到SSD?

有两种情况可以制作/配置你的flashcache:

  1. 缓存您的根设备,或
  2. 缓存非根(未安装在/ )设备