Boot scripts for write-thru and write-around cache creation

Bug #1162424 reported by Shahar Or
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
flashcache (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Three types of caches are supported in flashcache: Write-back, write-thru and write-around.

Write-back type caches require launching of 'flashcache_load' on before they can be mounted.

For write-back type caches there's a udev rule in the packaging that does this automagically so you can add your flashcache write-back type cache(s) to fstab and they will be mounted at boot up.

Write-thru and -around cache devices need to be created with 'flashcache_create' after each boot.

My request is for boot scripts that will create write-thru and write-around cache devices on boot up and a configuration file to go along with that.

Thank you,
Shahar

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: flashcache-utils 1.0+git20121114-1
ProcVersionSignature: Ubuntu 3.8.0-15.25-generic 3.8.4
Uname: Linux 3.8.0-15-generic x86_64
ApportVersion: 2.9.2-0ubuntu5
Architecture: amd64
Date: Sun Mar 31 10:40:28 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2010-10-12 (900 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MarkForUpload: True
SourcePackage: flashcache
UpgradeStatus: Upgraded to raring on 2012-11-07 (143 days ago)

Revision history for this message
Shahar Or (mightyiam) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in flashcache (Ubuntu):
status: New → Confirmed
Revision history for this message
Martijn Dekkers (mdekkers) wrote :

This seems to work for me:

cat << EOF > /usr/share/initramfs-tools/hooks/flashcache
#!/bin/sh

case \$1 in
prereqs)
        echo "dmsetup"
        exit 0
        ;;
esac

. /usr/share/initramfs-tools/hook-functions

mkdir -p \$DESTDIR/sbin
copy_exec /sbin/flashcache_create

manual_add_modules flashcache
EOF
chmod +x /usr/share/initramfs-tools/hooks/flashcache
cat << EOF > /etc/initramfs-tools/scripts/local-premount/flashcache
#!/bin/sh
/sbin/flashcache_create [YOUR FLASHCACHE CREATE COMMAND]
EOF
chmod +x /etc/initramfs-tools/scripts/local-premount/flashcache
update-initramfs -u

Please note that this works for me, and might not work for you, it might eat all your data, or cause your cat to eat your goldfish.

Revision history for this message
Shahar Or (mightyiam) wrote :

Thank you, Martin.

I reported this not much less than 2 years ago.

This was about my workstation.

By now I've gone fully SSD and that's what any sane workstation owner should do if possible.

Revision history for this message
Martijn Dekkers (mdekkers) wrote :

Hi Shahar, thanks for your note. We run this on a lot of servers, updating all of them to go fully SSD is expensive :)

I posted the script for posterity - it still appears to be an issue in Trusty

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.