4

I would like to have FlashCache cache my /var partition however I can't seem to get it to play nice upon bootup (IE: not really sure how to do it).

I'm not sure if I need to modify the initramfs/use DKMS or if I can do it in user-land during bootup. The issue I'm running into is /var mounts early and therefore the device is busy (whether it by generally by syslogd).

I'm positive this can be resolved by modifying the initramfs although I simply haven't fiddled with it enough to get it working.

They have instructions on how to boot your root partition however I'm not sure if these instructions would apply to my use case.

Any help / pointers in the right direction would be absolutely splendid.

mgorven
  • 30,036
  • 7
  • 76
  • 121
WinkyWolly
  • 598
  • 6
  • 19
  • 1
    I can get it working if I have it mount /var normally then before things that rely on it startup (syslogd, MySQL, etc) create the FlashCache device and remount. This however seems remarkably kludge. – WinkyWolly Jun 29 '12 at 22:46

2 Answers2

3

Short answer: The instructions for the root filesystem will work just fine. A simpler solution is very likely possible, but depends on your distribution (more specifically, its early boot process).

Note that with new releases of Fedora, and likely with future releases of many distributions, this won't be necessary. Lennart Poettering started a move not to require /var for early boot. In particular, FHS 3.0 will likely introduce /run.

Pierre Carrier
  • 2,607
  • 17
  • 28
  • That's something I was attempting to do however it appears the instructions / Makefile is specific to Debian (/etc/initramfs-tools , update-initramfs binary, etc). Any hints on how to do this in CentOS/RHEL? – WinkyWolly Jul 30 '12 at 17:32
2

I was similar problem, I found solution. You have to load resp. create flashcache device on early boot, but you dont need to make it with initramsfs... Just make init script, which runs in runlevel S.

I made one and also I wrote guide for installing flashcache on debian with setup init on early boot. Look at this: https://github.com/feldsam/flashcache-debian