Skip to content

Instantly share code, notes, and snippets.

@fevangelou
fevangelou / Software RAID 1 setup on Ubuntu Server 20.04.md
Last active March 1, 2024 01:02
Software RAID 1 setup on Ubuntu Server 20.04 (or newer)

Looking to create a Software RAID 1 setup for your 2-disk server on Ubuntu Server 20.04?

Screen Shot 2020-06-05 at 20 55 31

Let's start with the basics: the official guide by Ubuntu (https://ubuntu.com/server/docs/install/storage) is outdated/wrong. And as of March 2021 it's possible that there's a bug as well with how the bios_grub partitions are created when using multiple disks.

Now on to the solution:

  • Select "Custom storage layout" when you reach the storage configuration step of the installer.
  • If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.
@ogrodnek
ogrodnek / packer-permissions.json
Created September 19, 2016 17:25
packer IAM permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "NonResourceBasedReadOnlyPermissions",
"Action": [
"ec2:DescribeSubnets",
"ec2:DescribeSnapshots",
"ec2:DescribeImages",
"ec2:DescribeVolumes",
@sbuzonas
sbuzonas / nginx-cors.conf
Created September 8, 2015 15:36
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}
@kesor
kesor / Gemfile
Last active September 30, 2019 09:04
Vagrantfile to create a chef-server (11.x) and a client box that uses it.
source :rubygems
gem 'json', '= 1.5.4' # knife/chef 11.0 and 11.20 is broken with json 1.5.5/1.7.7
gem 'vagrant'
gem 'vagrant-hostmaster'