Another reason to safely update files that are looked at over NFS
Suppose that you are writing a script on one system but testing it onanother (perhaps the first system is the one that has your full editingenvironment setup). You go along in your cycle of edit, save, run, edit,save,
./testscript: Stale NFS file handle
What just happened?
You've run into the issue of safely updating files that are read overNFS , even though you weren't reading the fileat the time you saved it.
In theory, every time an
A Bourne shell gotcha with ( ... ) command grouping
Here is a mistake that I spent part of today discovering that I'd made.
Consider the following Bourne shell script fragment:
(for i in $SOMETHING; do if ! some-command $i; then echo $0: failed on $i 1>&2 exit 1 fidone) | sort | ....
Tragically, this shell script fragment is broken. The exit is notdoing what you think it is doing.
(If it actually is doing what you think it is doing,
Shell scripts should not use absolute paths for programs
There is a certain habit in shell scripts of referring to uncommonprograms by their absolute path; for example, if you need to run lsof ,people will write ' /usr/sbin/lsof .... ' in their shell script. Wedo a certain amount of that here, and then recently one of our shellscripts started reporting:
netwatch: line 15: /usr/sbin/lsof: No such file or directory
You see, you shouldn't do this, because every so often
Some stuff on NFS access restrictions
Roughly speaking, there's two sorts of access restrictions that an NFSserver can put on a client: what filesystems the client can access,and what directories in the filesystems the client can access (this isnecessary when you export a subdirectory in the filesystem, instead ofthe whole filesystem).
(This ignores just firewalling off the client entirely. The NFS servercode generally doesn't have any special handling for this, because fromits perspective, not allowing someone to talk at all is functionallyidentical to not
A brief history of NFS server access restrictions
In the beginning, NFS servers had no access restrictions. No, really.
In the early versions of NFS, the kernel NFS code had no access checks;if you had a valid filehandle , the kernelwas happy to talk to you, regardless of who you were. What NFS accessrestrictions existed were all done during the NFS mount process ; if you were not authorized to mount the particular thingyou were asking for, mountd would not give you a filehandle forit. This was, of course, secure only
What can go wrong in making NFS mounts
Now that we know what goes on in NFS mounts , wecan see that there are any number of moving parts that can go wrong:
- the RPC portmapper refuses to talk to you (possibly because a firewallgets in the way, possibly because it has been set up with tcpwrappersbased restrictions).
- the NFS mount daemon refuses to talk to you, possibly because itusually insists that clients use a reserved port , or there could be another firewallproblem since it uses a different port than the portmapper.
- the NFS mount
An unpleasant surprise about ZFS scrubbing in Solaris 10 U6
Here is something that we discovered recently: ZFS will refuse toscrub a pool that is DEGRADED , even if the degraded state is harmlessto actual pool redundancy and there is no resilvering going on. In theusual ZFS manner, it doesn't give you any actual errors, it just doesn'tdo anything when you ask for a pool scrub.
(Now, I can't be completely and utterly sure that it was the DEGRADEDstate that blocked the scrub and not coincidence or somethingunrelated. But I
The high-level version of how mounting NFS filesystems works
For reasons that are going to become apparent soon, I need to explainhow NFS mounting works.
NFS servers (in the code and protocol sense) just talk NFS, which isto say that you give them an NFS filehandle and tell them what operation you want to do with it and they give you areply. One of those operations is to look up a name in a directory andgive you its filehandle, which is the basic building block that lets aclient traverse a filesystem's directory hierarchy.
Thus
Fedora and workstations (on Linux distributions for desktops)
Comments on the last entry brought up the questionFedora on desktops (what I call 'workstations' out of tradition), andin general the issue of what distribution to run on them. It's a goodquestion and I can't claim exhaustive experience, but here's my views.
I run Fedora on my own desktop and, despite my gripes, it generallyworks and works well. I deal with the short support period partly byaccepting that I'll lose a few days to upgrades every
Why and why not Fedora
There's a certain perception that Fedora is the beta-quality testbedfor Red Hat Enterprise (to condense a comment from an earlier entry ), and this is why you shouldn't put it on anymachine you care about. This isn't the case, but I think people wind upwith this perception because they hear the accurate suggestion that youprobably shouldn't put it on servers or production machines unless youreally know what you're doing.
Fedora is supposed to be (and by and