Berkeley CSUA MOTD:Entry 46017
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2007/3/19-20 [Computer/SW/Unix] UID:46017 Activity:kinda low
3/19    Debian Linux NFS client/server configuration for Dummies:
        http://www.debianadmin.com/network-file-system-nfs-server-and-client-configuration-in-debian.html
        In summary, on the NFS server (assume it is myserver), you do:
        % apt-get install nfs-kernel-server nfs-common portmap
        % vi /etc/exports
        /home 195.12.32.2(rw,no_root_squash) <DEAD>www.first.com(ro<DEAD>
        /usr 195.12.32.2/24(ro,insecure)
        % exportfs -a

        On the NFS client, you do:
        % apt-get install nfs-common portmap
        % mount myserver:/home /mnt/nfs
        For a permanent mount you do:
        % vi /etc/fstab
        195.12.32.1:/home /home nfs rw,rsize=4096,wsize=4096,hard,intr,async,nodev,nosuid 0 0
        195.12.32.2:/usr /usr nfs ro,rsize=8192,hard,intr,nfsvers=3,tcp,noatime,nodev,async 0 0
        \- why would you be exporting /usr? 'cause you're a dummy?
           \_ maybe for a diskless system?
2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2012/9/20-11/7 [Computer/SW/Unix, Finance/Investment] UID:54482 Activity:nil
9/20    How do I change my shell? chsh says "Cannot change ID to root."
        \_ /usr/bin/chsh does not have the SUID permission set. Without
           being set, it does not successfully change a user's shell.
           Typical newbie sys admin (on soda)
           \_ Actually, it does: -rwsr-xr-x 1 root root 37552 Feb 15  2011 /usr/bin/chsh
	...
2012/5/8-6/4 [Computer/SW/Unix] UID:54383 Activity:nil
5/8     Hello everyone!  This is Josh Hawn, CSUA Tech VP for Spring 2012.
        About 2 weeks ago, someone brought to my attention that our script
        to periodically merge /etc/motd.public into /etc/motd wasn't
        running.  When I looked into it, the cron daemon was running, but
        there hadn't been any root activity in the log since April 7th.  I
        looked into it for a while, but got lost in other things I was
	...
2012/2/9-3/26 [Computer/SW/Security, Computer/SW/Unix] UID:54305 Activity:nil
2/9     Reminder: support for mail services has been deprecated for *several
        years*. Mail forwarding, specifically .forward mail forwarding, is
        officially supported and was never deprecated.
        \_ There is no .forward under ~root.  How do we mail root and how do
           we get responses?
           \_ root@csua.berkeley.edu is and always has been an alias.
	...
2011/9/14-12/28 [Computer/SW/Unix] UID:54172 Activity:nil
9/12    We've restored CSUA NFS to something vaguely resembling normal
        functionality -- plus, with some luck, we should now have something
        vaguely resembling normal uptime, too!  Ping root@csua.org if you
        notice any problems.  --jordan
--------------------------------------------------------------------------------
        \_  Oh, and http://irc.CSUA.Berkeley.EDU is online again.
	...
2011/6/5-8/27 [Computer/HW/Memory] UID:54127 Activity:nil
6/5     In an effort to stabilize our services, we'll be rebuilding parts of
        the CSUA infrastructure over the course of this summer.  To give us
        some wiggle room, I've temporarily decreased soda's allocated RAM from
        8GB to 2GB.  If you need to run something that requires large amounts
        of memory, please send mail to root@csua.org and we'll try to
        accommodate your request.  --jordan
	...
2011/4/27-7/30 [Computer/SW/Security, Computer/SW/Unix] UID:54096 Activity:nil
4/28    Will wall be fixed?   - jsl
        \_ What's wall?
           \_ An anachronism from a bygone era, when computers were hard to
              comeby, the dorms didn't have net, there was no airbears, and
              when phones didn't come standard with twitter or sms.
           \_ A non useful implementation of twitter.
	...
2011/5/19-7/30 [Computer/SW/Security] UID:54110 Activity:nil
5/19    Uh, is anyone still using this? Please mark here if you post and
        haven't added this yet. I'll start:
        \_ person k
        \_ ausman, I check in about once a week.
        \_ erikred, twice a week or so.
        \_ mehlhaff, I login when I actually own my home directory instead of
	...
2010/12/13-2011/2/19 [Computer/SW/Unix] UID:53978 Activity:nil
12/21   Help, all my files are owned by nobody! -ausman
        (yes I emailed root)
        \_ Things should be fine now. As usual, the NFS server caused a cascade
           of errors.
	...
Cache (7613 bytes)
www.debianadmin.com/network-file-system-nfs-server-and-client-configuration-in-debian.html
Network NFS was developed at a time when we weren't able to share our drives like we are able to today - in the Windows environment. It offers the ability to share the hard disk space of a big server with many smaller clients. While this seems like a standard service to offer, it was not always like this. In the past, clients and servers were unable to share their disk space. Thin clients have no hard drives and thus need a "virtual" hard-disk. The NFS mount their hard disk from the server and, while the user thinks they are saving their documents to their local (thin client) disk, they are in fact saving them to the server. In a thin client environment, the root, usr and home partitions are all offered to the client from the server via NFS. Some of the most notable benefits that NFS can provide are: Local workstations use less disk space because commonly used data can be stored on a single machine and still remain accessible to others over the network. There is no need for users to have separate home directories on every network machine. Home directories could be set up on the NFS server and made available throughout the network. Storage devices such as floppy disks, CDROM drives, and Zip drives can be used by other machines on the network. This may reduce the number of removable media drives throughout the network. The user-mode NFS server in the "nfs-user-server" package is slower but more featureful and easier to debug than the kernel-mode server. A Debian NFS client needs # apt-get install nfs-common portmap while a Debian NFS server needs # apt-get install nfs-kernel-server nfs-common portmap NFS Server Configuration NFS exports from a server are controlled by the file /etc/exports. Each line begins with the absolute path of a directory to be exported, followed by a space-seperated list of allowed clients. Wildcards are allowed in names, as are netmasks (eg /24) following IP addresses, but should usually be avoided for security reasons. A client specification may be followed by a set of options, in parenthesis. It is important not to leave any space between the last client specification character and the opening parenthesis, since spaces are intrepreted as client seperators. If you make changes to /etc/exports on a running NFS server, you can make these changes effective by issuing the command: # exportfs -a NFS Client Configuration NFS volumes can be mounted by root directly from the command line. Of course, for this to work, the directory /mnt/nfs must exist on the client and the server must have been configured to allow the client to access the volume. It is more usual for clients to mount NFS volumes automatically at boot-time. NFS volumes can be specified like any others in /etc/fstab. NFS Performance Tuning NFS does not need a fast processor or a lot of memory. I/O is the bottleneck, so fast disks and a fast network help. If you use IDE disks, use hdparam to tune them for optimal transfer rates. If you support multiple, simultaneous users, consider paying for SCSI disks; SCSI can schedule multiple, interleaved requests much more intelligently than IDE can. On the software side, by far the most effective step you can take is to optimize the NFS block size. If the chunks are too small, your computers spend more time processing chunk headers than moving bits. If the chunks are too large, your computers move more bits than they need to for a given set of data. To optimize the NFS block size, measure the transfer time for various block size values. Here is a measurement of the transfer time for a 256 MB file full of zeros. Try writing with block sizes of 1024, 2048, 4096, and 8192 bytes (if you use NFS v3, you can try 16384 and 32768, too) and measuring the time required for each. In order to get an idea of the uncertainly in your measurements, repeat each measurement several times. In order to defeat caching, be sure to unmount and remount between measurements. It may occur that, like mine, your data do not indicate a clear optimum, but instead seem to approach an asymptote as block size is increased. In this case, you should pick the lowest block size which gets you close to the asymptote, rather than the highest available block size; anecdotal evidence indicates that too large block sizes can cause problems. Once you have decided on an rsize and wsize, be sure to write them into your clients' /etc/fstab. Important points Hard or Soft Link Soft mounts cause data corruption, that I have never tried them. When you use hard, though, be sure to also use intr, so that clients can escape from a hung NFS server with a Ctrl-C. Udp or Tcp Protocol Most admins usually end up using udp because they use Linux servers, But if you have BSD or Solaris servers, by all means use TCP, as long as your tests indicate that it does not have a substantial, negative impact on performance. NFS v2 or NFS v3 NFS v2 and NFS v3 differ only in minor details. While v3 supports a non-blocking write operation which theoretically speeds up NFS, in practice I have not seen any discernable performance advantage of v2 over v3. Still, I use v3 when I can, since it supports files larger than 2 GB and block sizes larger than 8192 bytes. rsize and wsize options in fstab file See the section on performance tuning below for advise of choosing rsize and wsize. An NFS server trusts an NFS client to enfore file access permissions. Therefore it is very important that you are root on any box you export to, and that you export with the insecure option, which would allow any old user on the client box arbitrary access to all the exported files. March 13th, 2007 at 12:25 pm Hi, As the Debian NFS maintainer, I have to say I'm a bit disappointed at the quality of this article; I can't address them all in too great detail, but a few points are (and I hope the website doesn't mess up my list :-) ): * You do not install things with apt-get unless you really know what you're doing; For one, it supports NFSv4, which the article for some reason doesn't cover at all. Soft mounts do not cause data corruption just by themselves; it has to be combined with some kind of outage (like a network outage). In fact, NFSv4 only lets you use TCP, which is a good thing. I appreciate people writing articles on difficult topics, but please, make a better job of checking your facts first instead of copying them blindly from man pages or old versions of package descriptions. March 13th, 2007 at 12:57 pm Steinar, This is off topic, however I was wondering why you recommend using aptitude over apt-get? I'd always thought that aptitude was just a frontend to apt-get and have never used it (when I came to debian years ago from RedHat/Slackware apt-get seemed like the best thing in the world) so I was wondering if I'm missing something important? Debian Admin All Trademarks are the property of their respective owners. The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner. DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. Changes to the existing content and new additions are made to this website periodically, without notification.