AFS Quick Tips

advertisement
AFS Quick Tips
A CRASH COURSE IN NJIT’S AFS
- Kashif Qazi
What is AFS
 AFS stands for Andrew File System
 A way to have storage space
 Distributed file system lets you access your data
virtually anywhere, anytime
Distributed Computing

Defn:


Users won’t know that the process or data is in some other
computer in the network
Advantages


Availability
Efficiency
What is AFS for ME in NJIT?
 A way to have storage space on the college network
 A place to store
 Web pages
 Course Material
 Research Material
 Course Assignments
Client/Server
• Server provides data and services to the client
• Client is accessed by the user and gets services and
data from the server
AFS
File Server
File Server
File Server
(username,
password)
Client
Remotely
E.g. afsconnect1.njit.edu
Laptop
Authentication
Server
Tokens
Where is AFS
 File Servers:
 In NJIT
 Clients:
 afsconnect1.njit.edu and afsconnect2.njit.edu
 Any NJIT maintained MS Windows Workstation (Library,
Student Mall PC Labs, GITC 2302)
 Your own PC with OpenAFS Client installed
 Each student has 125 MB of AFS disk space
Services Available by NJIT on AFS
 Web Services (Apache Tomcat)
 Variety of open source and commercial software
(compilers like javac and gcc)
 MySQL Database
How to Use AFS
 Three ways of accessing your 125 MB AFS space
 Secure Shell (Remote Login)
 OpenAFS Client for Windows, Mac, Linux, Solaris
 One of the AFS client machines in the labs
 You need your UCID and AFS password
How to Use AFS – Secure Shell
 Download and install the SSH Secure Shell from
http://ist.njit.edu
 If downloading remotely, you need VPN
 Run SSH
 Click ‘Quick Connect
How to Use AFS – Secure Shell
 Enter afsconnect1.njit.edu or afsconnect2.njit.edu in
‘Host Name’
 Enter UCID in User Name
 Click ‘Connect’
Step 1
Step 2
How to Use AFS – Secure Shell
 Enter your AFS Password
 Click ‘OK’
Step 3
How to Use AFS – Secure Shell
 You are connected!!
How to Use AFS – Secure Shell
 Unix commands work in this environment
 Type in ls and press return to see the list of files and
directories in your root
How to Use AFS – Secure Shell
 Unix commands work in this environment
 Type in cd directory_name to go to particular
directory
How to Use AFS – OpenAFS Client
 Install and setup OpenAFS Client as per instructions
at
http://web.njit.edu/all_topics/AFS/windows.client/
 After this, you should have a drive in ‘My Computer’
called H:
 This is your AFS ‘drive’ which means your AFS space
is directly accessible from ‘My Computer’
How to Setup Web Page
 Your web-page’s address is:




http://web.njit.edu/~ucid
The index.html file is located in public_html
directory under root in your AFS space
For SSH you can type in cd public_html from root
For OpenAFS you can double click H: in ‘My
Computer’ and then double click public_html
directory
Modifying index.html modifies the web-page at the
above address
How to Setup Web Page
 You can now build your website in the public_html
directory
 Additionally NJIT’s AFS also provides for an Apache
TomCat Web Server
 You can also install CMSs like Drupal or CodeIgnitor
Backup




Backup is taken every day
Last backup of home directory will be in the home
directory itself
Older backups up to one year available from tape
Backups of research directories are backed up every
week in a tape and kept for 1 year!
Some Help with Unix Commands
 cd <path/directory_name> : changed current
directory to path/directory. E.g. cd public_html
 ls : Lists all files and directories in current directory
 cp <path1/file> <path2/file> : copies file from path1
to path2
 cat file_name : displays the file on the screen. Useful
for reading small files
Some Help with Unix Commands
 rm file_name : removes the file
 mkdir dir_name : creates a new directory
 rmdir dir_name : removes directory
 fs sa ~/<path> ucid rl : gives ucid access to path
directory on your AFS
Killing a process?

If an application hangs?

Find the process id


ps –u <username> | grep <processname>
Kill the process

kill -9 <processid>
Moving Files from your Computer
 SSH
 Includes SSH Secure File Transfer
 Run and connect same way as Secure Shell Client
 Drag and drop
 OpenAFS Client
 H: is like any other drive
 Copy-Paste as usual
Connecting via Linux - I
 Open up a terminal window in Linux
 Execute the command
 ssh –l ucid afsX.njit.edu
 The first time you will see:
 The authenticity of host afsX.njit.edu' can't be established.
RSA key fingerprint is a long string of characters
Are you sure you want to continue connecting (yes/no)?
 Type in ‘yes’ and press return
 Type in password and press return
Connecting via Linux - II
 Install OpenAFS Client
 apt-get install openafs-client
 Set “CELL” to cad.njit.edu
 Other values use default
 klog ucid
 cd /afs/cad.njit.edu/u/k/m/kmq2
Further References
 For further information on NJIT’s AFS, visit
 http://ist.njit.edu
 http://web.njit.edu
 http://web.njit.edu/all_topics/one.stop/
 The last link is useful to check your AFS Quota,
Usage, Reset Password, etc.
Download