Skip to content

Instantly share code, notes, and snippets.

@max107
max107 / lvm-cache-fedora.md
Created September 11, 2020 15:32 — forked from gabrieljcs/lvm-cache-fedora.md
Instructions to create an LVM cache for root in Fedora

LVM cache in Fedora

From the man-pages: "The cache logical volume type uses a small and fast LV to improve the performance of a large and slow LV. It does this by storing the frequently used blocks on the faster LV. LVM refers to the small fast LV as a cache pool LV. The large slow LV is called the origin LV. Due to requirements from dm-cache (the kernel driver), LVM further splits the cache pool LV into two devices - the cache data LV and cache metadata LV. The cache data LV is where copies of data blocks are kept from the origin LV to increase speed. The cache metadata LV holds the accounting information that specifies where data blocks are stored (e.g. on the origin LV or on the cache data LV). Users should be familiar with these LVs if they wish to create the best and most robust cached logical volumes. All of these associated LVs must be in the same VG."

Assuming LVM is already setup in HDD (e.g. from anaconda) and SSD is untouched.

Create a physical

@max107
max107 / .gitignore
Created September 21, 2016 21:33 — forked from Ocramius/.gitignore
`Zend\EventManager` examples
vendor
composer.lock
@max107
max107 / tmux-cheatsheet.markdown
Created December 23, 2015 08:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@max107
max107 / sshd.go
Last active August 29, 2015 14:11 — forked from jpillora/sshd.go
// A simple SSH server providing bash sessions
//
// Server:
// cd my/new/dir/
// ssh-keygen -t rsa #generate server keypair
// go get -v .
// go run sshd.go
//
// Client:
// ssh foo@localhost -p 2022 #pass=bar
package main
import (
"fmt"
"github.com/moovweb/gokogiri"
"io/ioutil"
"net/http"
"net/url"
"time"
)
#!/usr/bin/perl
use strict;
use warnings;
my $exclude_list_path_static = "/etc/ovznodes_backup_rsync_exclude_list.static";
my $exclude_list_path_dynamic = "/etc/ovznodes_backup_rsync_exclude_list.dynamic";
my $config_file_path = '/etc/ovznodes_backup_config';
# должна объявляться в конфиге
@max107
max107 / 0_reuse_code.js
Created January 26, 2014 16:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>