Tern: Difference between revisions
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) mNo edit summary |
||
Line 7: | Line 7: | ||
Hardware is a MiniITX server that used to be [[Bellman]] | Hardware is a MiniITX server that used to be [[Bellman]] | ||
The two Seagate Green 2TB drives are now | The two Seagate Green 2TB drives are now striped because I need space more than reliability for Time Machine. | ||
=== Changing over from mirror to stripe === | === Changing over from mirror to stripe === | ||
Line 29: | Line 29: | ||
apt-get install emacs | apt-get install emacs | ||
=== | === Netatalk === | ||
Installing Netatalk makes Tern visible as an Apple server. | |||
https://daniel-lange.com/archives/102-Apple-Timemachine-backups-on-Debian-8-Jessie.html | https://daniel-lange.com/archives/102-Apple-Timemachine-backups-on-Debian-8-Jessie.html | ||
Line 45: | Line 47: | ||
systemctl start netatalk | systemctl start netatalk | ||
==== | === Contents of afp.conf file === | ||
The "valid user" is the name of a user in the local passwd file on Tern. | |||
[Global] | |||
; Global server settings | |||
vol preset = default_for_all | |||
log file = /var/log/netatalk.log | |||
uam list = uams_dhx2.so,uams_clrtxt.so | |||
save password = no | |||
[default_for_all] | |||
file perm = 0664 | |||
directory perm = 0774 | |||
cnid scheme = dbd | |||
[Homes] | |||
basedir regex = /home | |||
[TimeMachine_Swift] | |||
path = /home/timemachine/swift | |||
time machine = yes | |||
vol size limit = 3000000 | |||
valid users = julie | |||
[TimeMachine_Stellar] | |||
# both plover and stellar get backed up here | |||
path = /home/timemachine/stellar | |||
time machine = yes | |||
vol size limit = 3000000 | |||
valid users = bwilson | |||
=== Time Machine, on the MAC === | |||
You have to allow TimeMachine to write to an "unsupported volume" with this command | You have to allow TimeMachine to write to an "unsupported volume" with this command | ||
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 | defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 | ||
On Stellar only, for some reason I had to manually create a sparse bundle on the server to make it work. | |||
Connect to server from Finder. Swift and Plover had no problems creating their own bundles. Then in Terminal, | |||
hdiutil create -size 300G -type SPARSEBUNDLE -verbose -fs HFS+J -volname "Time Machine" /Volumes/Timemachine_Stellar/Stellar.sparsebundle | |||
The SPARSEBUNDLE type means the filesystem will grow in 1M pieces, it won't immediately allocate 300GB. 300GB is the limit and you can resize it later if you need to. Stellar has a 256GB drive and right now has 115GB on it. After executing this command, the empty bundle consumed 430M of space. I remember when 430M was a huge amount of space. :-) |
Revision as of 17:36, 21 January 2016
History
2016-Jan-20 set up as Time Machine
Hardware
Hardware is a MiniITX server that used to be Bellman
The two Seagate Green 2TB drives are now striped because I need space more than reliability for Time Machine.
Changing over from mirror to stripe
It ended up on /dev/md126 (he shrugs).
mdadm --detail /dev/md127 mdadm --fail /dev/md127 /dev/sdc --remove /dev/sdc mdadm --stop /dev/md127 mdadm --remove /dev/md127 fdisk /dev/sdb fdisk /dev/sdc mdadm --create /dev/md127 level=0 --raid-devices=2 /dev/sdb1 /dev/sdc1 mkfs.ext4 /dev/md127 blkid /dev/md127 >> /etc/fstab emacs /etc/fstab
Software
# Must Haves apt-get install emacs
Netatalk
Installing Netatalk makes Tern visible as an Apple server.
https://daniel-lange.com/archives/102-Apple-Timemachine-backups-on-Debian-8-Jessie.html
Built deb packages for netatalk from git on bellman and install packages here.
apt-get install mysql-common libcrack2 libmysqlclient18 avahi-daemon dpkg --install libatalk16_3.1.7-1_amd64.deb netatalk_3.1.7-1_amd64.deb emacs /etc/netatalk/afp.conf systemctl enable avahi-daemon systemctl enable netatalk systemctl start avahi-daemon systemctl start netatalk
Contents of afp.conf file
The "valid user" is the name of a user in the local passwd file on Tern.
[Global] ; Global server settings vol preset = default_for_all log file = /var/log/netatalk.log uam list = uams_dhx2.so,uams_clrtxt.so save password = no [default_for_all] file perm = 0664 directory perm = 0774 cnid scheme = dbd [Homes] basedir regex = /home [TimeMachine_Swift] path = /home/timemachine/swift time machine = yes vol size limit = 3000000 valid users = julie [TimeMachine_Stellar] # both plover and stellar get backed up here path = /home/timemachine/stellar time machine = yes vol size limit = 3000000 valid users = bwilson
Time Machine, on the MAC
You have to allow TimeMachine to write to an "unsupported volume" with this command
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
On Stellar only, for some reason I had to manually create a sparse bundle on the server to make it work. Connect to server from Finder. Swift and Plover had no problems creating their own bundles. Then in Terminal,
hdiutil create -size 300G -type SPARSEBUNDLE -verbose -fs HFS+J -volname "Time Machine" /Volumes/Timemachine_Stellar/Stellar.sparsebundle
The SPARSEBUNDLE type means the filesystem will grow in 1M pieces, it won't immediately allocate 300GB. 300GB is the limit and you can resize it later if you need to. Stellar has a 256GB drive and right now has 115GB on it. After executing this command, the empty bundle consumed 430M of space. I remember when 430M was a huge amount of space. :-)