Created
January 22, 2014 21:20
-
-
Save JasonLocklin/8567549 to your computer and use it in GitHub Desktop.
Home Server Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installed Debian stable from netinstall on a USB stick created with unetbootin. | |
Selected btrfs on a raw partitian, and a small swap partitian. I chose | |
to try btrfs out for the first time on this system because I want compression | |
(8Gb internal SSD). I also want the parity checks so that, hopefully, the system | |
can run for years without any corruptuion of any of the important files. I figured | |
it would be a good first use because I can easily do a bare-metal backup of the SSD, | |
being that it's only 8gb, to another machine. | |
Deselected standard desktop, and just installed SSH and standard utilities. | |
Note: on this computer, the usb drive is the "first hard drive" so you must remove it | |
after the installer is started so that GRUB is installed on the acutal hard drive | |
instead. | |
Added backports for wheezy http://backports.debian.org/Instructions/ | |
Updated to latest kernel in backports because it's recommended for btrfs. I | |
would have done the same for btrfs-tools, but it isn't in backports (note, | |
this will have to be manually updated in the future.: | |
apt-get -t wheezy-backports install linux-image-3.12-0.bpo.1-686-pae | |
## Disk Compression | |
Before enabling disk compression, this is the disk usage: | |
root@shack:/home/jay# btrfs fi df / | |
Data: total=1.48GB, used=1021.06MB | |
System, DUP: total=8.00MB, used=4.00KB | |
System: total=4.00MB, used=0.00 | |
Metadata, DUP: total=376.62MB, used=65.06MB | |
Metadata: total=8.00MB, used=0.00 | |
I then changed the system's fstab line to the following to enable compression and ssd tweaks: | |
UUID=24c3026b-b3cd-4b99-be1f-437d2cea5e4e / btrfs noatime,ssd_spread,compress $ | |
and rebooted (rather than remounting). To defragment all the files: | |
find / -type f -exec btrfs filesystem defragment -v -czlib '{}' + | |
Note that the command normally posted around the internet: | |
btrfs filesystem defragment -r -v -clzo / | |
doesn't actually compress all the files, just the root index. There are of course errors | |
for non-regular files, but when it's done, I have halfed the install size (neat!): | |
root@shack:/home/jay# btrfs fi df / | |
Data: total=1.48GB, used=564.89MB | |
System, DUP: total=8.00MB, used=4.00KB | |
System: total=4.00MB, used=0.00 | |
Metadata, DUP: total=376.62MB, used=64.95MB | |
Metadata: total=8.00MB, used=0.00 | |
## Now, prepare the system to run Ownclud | |
Added repository, key, and installed owncloud package per instructions | |
here: | |
http://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud | |
The following results: | |
The following NEW packages will be installed: | |
apache2 apache2-bin apache2-data curl fonts-dejavu-core gcc-4.8-base | |
imagemagick-common libapache2-mod-php5 libapr1 libaprutil1 | |
libaprutil1-dbd-sqlite3 libaprutil1-ldap libcurl3 libgd3 libgomp1 libicu52 | |
libjson-c2 liblqr-1-0 liblua5.1-0 libmagickcore5 libmagickwand5 libmcrypt4 | |
libonig2 libopts25 libpq5 libqdbm14 librtmp0 libssh2-1 libtiff5 libvpx1 ntp | |
owncloud php-pear php-xml-parser php5 php5-cli php5-common php5-curl php5-gd | |
php5-imagick php5-intl php5-json php5-mcrypt php5-mysqlnd php5-pgsql | |
php5-readline php5-sqlite | |
The following packages will be upgraded: | |
fontconfig-config libedit2 libfontconfig1 libgcrypt11 libxml2 | |
ttf-dejavu-core | |
6 upgraded, 47 newly installed, 0 to remove and 416 not upgraded. | |
Need to get 74.6 MB of archives. | |
After this operation, 210 MB of additional disk space will be used. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment