Tern: Difference between revisions
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) |
||
Line 91: | Line 91: | ||
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. :-) | 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. :-) | ||
'''Note on filenames''' First I mimicked what I saw created by Plover: Plover.sparsebundle. I created Stellar.sparsebundle and ran Time Machine. It smiled and happily accepted that as a destination and immediately created 'stellar.sparsebundle' next to it. I think this is a screw up waiting to bite me, so I shut the Time Machine backup down, removed both bundles from the server with "rm -rf", revised the above sample command and created 'stellar.sparsebundle'. | |||
NOW it's busily creating "stellar 1.tmp". Sigh, seems very Mac-ish. I wonder if that's good or bad. I will let it play and go do something else. This Mac is backed up to an external drive right now anyway so I can't think of any unbearable worst-case scenarios. | |||
I am thinking about what a great program 'rsync' is... |
Revision as of 17:49, 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. :-)
Note on filenames First I mimicked what I saw created by Plover: Plover.sparsebundle. I created Stellar.sparsebundle and ran Time Machine. It smiled and happily accepted that as a destination and immediately created 'stellar.sparsebundle' next to it. I think this is a screw up waiting to bite me, so I shut the Time Machine backup down, removed both bundles from the server with "rm -rf", revised the above sample command and created 'stellar.sparsebundle'.
NOW it's busily creating "stellar 1.tmp". Sigh, seems very Mac-ish. I wonder if that's good or bad. I will let it play and go do something else. This Mac is backed up to an external drive right now anyway so I can't think of any unbearable worst-case scenarios.
I am thinking about what a great program 'rsync' is...