Changes

Jump to navigation Jump to search
1,049 bytes added ,  18:52, 14 May 2019
Instructions for taking apart and/or (re-)creating a RAID array are here:
*https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-ubuntu-18-04
 
Instructions on building a bcache are here:
*https://wiki.ubuntu.com/ServerTeam/Bcache
*https://www.kernel.org/doc/Documentation/bcache.txt
 
Unmount the RAID array:
umount /dev/md0
 
Wipe the m.2:
wipefs -a /dev/nvme0n1p1
wipefs -a /dev/md0
 
Make the bcache, formatting both drives (md0 as backing, m.2 as cache)
make-bcache -B /dev/md0 -C /dev/nvme0n1p1
 
Note: if you screw up - cd to /sys/fs/bcache/whatever and then ls -l cache0. If there is an entry in there echo 1 > stop. This unregisters the cache.
 
Check it is there, format it and mount it:
ls /dev/bcache*
mkfs.ext4 /dev/bcache0
mount /dev/bcache0 /bulk
 
Now we need to update fstab (see https://help.ubuntu.com/community/Fstab) with the right UUID and spec:
blkid /dev/bcache0
UUID="4c63f20b-ad35-477d-bfaa-82571beba841" TYPE="ext4"
cp /etc/fstab /etc/fstab.org
vi /etc/fstab
Comment out old RAID array entry
Add new entry:
UUID=4c63f20b-ad35-477d-bfaa-82571beba841 /bulk ext4 rw 0 0
 
And give it a reboot to check it comes back up ok!
 
edit fstab
update-initramfs -u
===Dev Tools===

Navigation menu