≡ Menu


Missing Memory

Today, I've upgraded total 8 servers from 4GiB to 8GiB to improve performance of system by inserting additional memory modules. We started each server and checked for memory count at console. All severs booted normally after the upgrade and services such as SMTP, NFS, CIFS, HTTP started as expected. Shortly, afterwords I got a call from help desk about pop3 server for slow performance.
[click to continue…]

mount forcedirectio: Disable Linux CIFS / NFS Client Caching

If your network is heavily loaded you may see some problem with Common Internet File System (CIFS) and NFS under Linux. By default Linux CIFS mount command will try to cache files open by the client. You can use mount option forcedirectio when mounting the CIFS filesystem to disable caching on the CIFS client. This is tested with NETAPP and other storage devices and Novell, CentOS, UNIX and Red Hat Linux systems. This is the only way to avoid data mis-compare and problems.

The default is to attempt to cache ie try to request oplock on files opened by the client (forcedirectio is off). Foredirectio also can indirectly alter the network read and write size, since i/o will now match what was requested by the application, as readahead and writebehind is not being performed by the page cache when forcedirectio is enabled for a mount

mount -t cifs //mystorage/data2 -o username=vivek,password=myPassword,rw,bg,vers=3,proto=tcp,hard,intr,rsize=32768,wsize=32768,forcedirectio,llock /data2

Refer mount.cifs man page, docs stored at Documentation/filesystems/cifs.txt and fs/cifs/README in the linux kernel source tree for additional options and information.

Exporting Networked File Systems Via Another Networked File System

Recently, I received a call from client about FTP server not working. Basically, someone was trying to
access networked file system mounts such as cifs and nfs via ftp. This is bad idea and it will result into problems because it is not supported by many applications (I'm not talking about cluster file system here). There are many issues with this kind of weird setup:

+ Permission problem
+ I/O Problem
+ Performance issue etc

Some FTP server do offer work around but I don't recommend exporting networked file system via another file system.

Bottom line, don't mix networked file system with each other.

Setup OpenLDAP authentication on Linux for OSX Client and sync / share home directory

Finally, someone spends time to work with a Linux server and OS X authentication issue:

OSX has what I would call an undocumented feature of the operating system- the portable home directory. Basically, it keeps a user's home directory sync'd up between a network share and the local pc. If you are not on the network you work on the local home directory. Whenever you login on the network, the mirror agent running on the local pc synchronizes the two directories.

Full Stack: Portable Home Directory over NFS on OSX authenticated via OpenLDAP on Debian Linux