Skip to content

Instantly share code, notes, and snippets.

View carlwgeorge's full-sized avatar

Carl George carlwgeorge

View GitHub Profile

How I switched from mdadm to btrfs

After reading [this Ars Technica article][1], I decided that I wanted to start using btrfs on my home fileserver. It had been running for a few years with an mdadm raid-10 array, formatted with ext4, holding about 3.4 TB of data. I figured I would take advantage of some of the special capabilities of btrfs to perform the conversion in place. After some research, I formed my basic plan.

  • backup data to external drives
  • remove two of the drives from the mdadm raid-10
  • configure those two drive with a btrfs raid-0 filesystem
  • copy the data from the degraded mdadm raid-10 to the new btrfs raid-0
  • completely deactivate the mdadm raid-10

Debian Kernel Hooks

Recently I setup my work laptop to dual boot Arch Linux and Ubuntu server with syslinux as my bootloader. I setup the laptop with a dedicated /boot partition that would be shared between the two operating systems. I added this boot entry to /boot/syslinux/syslinux.cfg.

LABEL ubuntu
    MENU LABEL Ubuntu 
    LINUX ../vmlinuz-3.8.0-29-generic
    APPEND root=LABEL=UBUNTU rw

INITRD ../initrd.img-3.8.0-29-generic

Let's install phpMyAdmin.

[root@test6 ~]# yum -v install phpMyAdmin

Yum resolves the 'php(language)' dependency with the highest available package, php56u-common, and adds it to the transaction.

--> Processing Dependency: php(language) >= 5.2.17 for package: phpMyAdmin-4.0.10.5-1.el6.noarch
TSINFO: Marking php56u-common-5.6.2-3.ius.centos6.x86_64 as install for phpMyAdmin-4.0.10.5-1.el6.noarch
# dnf install phpMyAdmin
Using metadata from Mon May 4 13:49:37 2015
Dependencies resolved.
========================================================================================================
Package Arch Version Repository Size
========================================================================================================
Installing:
dejavu-fonts-common noarch 2.33-6.el7 base 64 k
dejavu-sans-fonts noarch 2.33-6.el7 base 1.4 M
libmcrypt x86_64 2.5.8-13.el7 epel 99 k

Keybase proof

I hereby claim:

  • I am carlwgeorge on github.
  • I am carlwgeorge (https://keybase.io/carlwgeorge) on keybase.
  • I have a public key whose fingerprint is 21B0 BF53 BEA4 6F1B 0E8C 16B8 4BA2 F7E1 01D9 F512

To claim this, I am signing this object:

@carlwgeorge
carlwgeorge / php70u-setups.md
Last active March 11, 2016 23:30
php70u setups

EL6

php70u-fpm + nginx (tcp)

yum install php70u-fpm-nginx
service php-fpm start
service nginx start

php70u-fpm + httpd24u (tcp)

                    | IUS mysql56u 5.6          | Fedora community-mysql 5.7

------------------------|---------------------------|--------------------------- ignore_db_dir | lost+found | tmpdir | /var/lib/mysqltmp | /var/tmp table_definition_cache | 4096 | 1400 table_open_cache | 4096 | 2000 max_connections | 400 | 151 max_connect_errors | 1000000 | 100 max_allowed_packet | 16M | 4M skip_name_resolve | 1 | 0

@carlwgeorge
carlwgeorge / mariadb100u-yum-shell.md
Last active May 31, 2017 15:33
install mariadb100u-server via yum shell
# yum shell
Loaded plugins: fastestmirror, langpacks, replace
> erase mariadb-libs
> install mariadb100u-libs mariadb100u-server
Loading mirror speeds from cached hostfile
 * base: mirror.us.leaseweb.net
 * epel: mirror.symnds.com
 * extras: mirror.us.leaseweb.net
 * ius: iad.mirror.rackspace.com