Homework 3 frank Computer Center CS NCTU 2
- Slides: 18
Homework 3 frank
Computer Center, CS, NCTU 2 ZFS - Automatic Snapshot Script q Specification • Usage: . /zbackup [[--list | --delete] target dataset [ID] | target dataset [rotation count]] • Example $ sudo. /zbackup data/to/backup 5 $ sudo. /zbackup --list data/to/backup ID Dataset Time 1 data/to/backup 2016 -10 -05 10: 12: 23 2 data/to/backup 2016 -10 -05 10: 14: 25
Computer Center, CS, NCTU ZFS - Automatic Snapshot Script q Specification • Create (Default) Ø No more than rotation count snapshots per dataset Ø If no rotation count specified, max 20 snapshots are allowed Ø If rotation count has reached, delete the very first one • List Ø List the snapshot created by zbackup Ø If dataset is specified, list only the snapshot of that dataset Ø Otherwise, list all of the snapshot • Delete Ø Delete snapshots created by zbackup Ø Must specify dataset Ø If ID is specified, delete that one Ø Otherwise delete them all 3
Computer Center, CS, NCTU 4 ZFS - Backup to google drive q Backup your dataset to google drive q Must compress with xz q Must encrypt with aes 256 q The filename should be dataset/to/backup@2016 -10 -12. xz. enc q Download it and roll back
System Administration Practice HW 3 - Micro Computer Center pschiu
Computer Center, CS, NCTU sa-core NFS Master nullfs sabsd Export /net/data (ro) /net/home (maproot=nobody) /net/admin /usr/ports saduty NFS Client 6 1. sudoers sahome Export /net/data (ro) /net/home (maproot=nobody) /usr/ports ……. . . NFS Client
Computer Center, CS, NCTU sa-core sahome 3. Only sa-adm can login sa-core. Connect to sahome only from saduty Connect to sa-core only from sa-bsd sabsd ssh saduty 7 1. 2. ssh ……. . .
Computer Center, CS, NCTU 8 Requirements (1) - Overview q Machines • sahome: NFS Server • saduty: NFS Client • sabsd: NFS Client q Groups • sysadm: can access /net/data/sata, can sudo everything but su and any shells • nctucs: everyone
Computer Center, CS, NCTU 9 Requirements (2) - sahome q nullfs • /net/home • /net/data • /net/admin q login • sa-adm only • Only from saduty => /vol/home => /vol/data => /vol/admin
Computer Center, CS, NCTU 10 Requirements (3) - saduty q NFS • /net/home • /net/data • /net/admin q login • sa-adm only => sahome: /vol/home (maproot=nobody) => sahome: /vol/data (ro) => sahome: /vol/admin (ro)
Computer Center, CS, NCTU 11 Requirements (4) - sabsd q NFS • /net/home • /net/data • /net/admin q login • All (anywhere) => sahome: /vol/home (maproot=nobody) => sahome: /vol/data (ro) => sahome: /vol/admin (ro)
Computer Center, CS, NCTU 12 Requirement (5) q All machines share /net/admin/sudoers q All user’s home directory must be in /net/home except root q Auto-start all services
Computer Center, CS, NCTU 13 Step 1 - Setup NFS environment q Nullfs (NFS Server) • $ mount_nullfs /vol/home /net/home • In /etc/fstab: /vol/home /net/home nullfs rw 2 2 q Edit /etc/exports (NFS Server) q Edit /etc/rc. conf • nfs_server, mountd (NFS Server)
Computer Center, CS, NCTU Step 2 - Finishing q sudoers (/usr/local/etc/sudoers) • Including other sudoers file from /net/admin/sudoers • man sudoers to see more about “include”. q sahome: /etc/hosts. allow or other method (firewall or sshd_config) • sa-adm only can login sahome from saduty. q /net/data/sata • sysadm only q Login permissions • only sa-adm can login sa-core. 14
Computer Center, CS, NCTU 15 Help q Go to bsd*. cs. nctu. edu. tw q IRC channel #nctu. NASA on freenode q Email ta@nasa. cs. nctu. edu. tw q Goto CSCC to ask TA @ EC 3 F! q Join our Facebook Group • https: //www. facebook. com/groups/328840520802507/
Computer Center, CS, NCTU Appendix A – mount_nullfs q $ man exports A host may be specified only once for each local file system on the server and there may be only one default entry for each server file system that applies to all other hosts. q The command • mount_nullfs <origin> <new_path> • For example Ø % mkdir /home/allhome make a directory for Real NFS Home Ø % mkdir /home/for_nis make a directory for NFS Home exports Ø % mount_nullfs /home/allhome /home/for_nis mount it q Use it in /etc/fstab • Change the fstype to nullfs • For example Ø /home/allhome 16 /home/for_nis nullfs rw 2 2
Computer Center, CS, NCTU 17 Appendix B – sshd_config q $ man sshd_config Open. SSH daemon configuration file
Computer Center, CS, NCTU Additional Bonus q Create NFS Server from zpool. q Build NIS to resolve some synchronize issue. q Refer page 6 to draw your own “Micro Computer Center” topology diagrams. • You have few option of software to finish this task. Ø Microsoft Visio (you can download from ca. nctu. edu. tw) Ø Online Diagram editor (Gliffy / draw. io / Others) Ø Microsoft Power. Point (not recommended) • Including more information as possible. (ip, port, service, hostname, etc. ) 18
- Homework oh homework
- Homework oh homework i hate you you stink
- Jack prelutsky homework oh homework
- Oh homework oh homework poem
- Homework oh homework i hate you you stink
- Literal and figurative language
- Frank william abagnale jr
- Postfix transport map
- Webmail nctu
- Nctu domain
- Nfc nctu
- Irssi screen
- Nctu network programming github
- Nctu ok
- Nctu ok
- Nctu vpn
- Csie.nctu.edu.tw login
- Nctu vpn
- Csie.nctu.edu.tw mail