Enabling WebDav for CDN [Building Coda file system support] using CentOS 5.2 Linux
Filed under: IT, Open Source Projects, Tech
Many people have asked me about setting up WebDav to directly address a CDN repository as a /local/path directory. This requires Coda file system (Advanced NFS) support. This particular tutorial is directed at people who wish to use WebDav support for a CDN such as BitGravity (as in this example) on a Linux system. The particular flavor of Linux used in this tutorial is CentOS 5.2, so if you are using a different form of Linux the procedure is similar but will vary from distro to distro.
Install the Necessary Packages:
To access the necessary packages in Yum, the RPM repository needs to be up to date. I used the following commands to clean up Yum:
rpm -e yum-plugin-fastestmirror
yum clean all
yum install yum-metadata-parser yum-updatesd
yum install yum-plugin-fastestmirror
Once added, run the following installations:
yum install davfs2
yum install dkms
yum install dkms-fuse
yum install fuse
yum install fuse-davfs2
Verify that the Coda File System is Supported in the kernel:
For the WebDAV share to mount correctly the module for the Coda file system needs to be supported by the kernel. To test if it is supported run the following command command:
dmesg | grep -i coda
If the system returns an output, then everything should be fine, and the configuration of WebDAV can continue. However, if it responds with nothing then the kernel does not support coda. To overcome this obstacle the kernel source tree will need to be built so that the necessary coda files can be extracted.
Build the Kernel Source Tree and Add Coda Support
By building the kernel source tree the necessary files for coda file system support can be manually compiled, and then copied into the current kernel’s library. In this way you don’t have to rebuild your running kernel.
During the most of the build procedure it is critical that it be performed as a non-root user to maintain the necessary permissions.
>> As root user or su - <<
yum install kernel-devel
yum install kernel-headers
yum install rpm-build
yum install redhat-rpm-config
yum install unifdef
>> Exit su – (or sudo to a non-root user) and continue with the following steps! <<
After installing the packages log into the non-root user and navigate to ~ (the $HOME directory), and create the directory for the source:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo ‘%_topdir %(echo $HOME)/rpmbuild’ > .rpmmacros
Type “uname -ar” to display the kernel version and then install the respective kernel source. For example:
rpm -i http://mirror.centos.org/centos/5/updates/SRPMS/kernel-2.6.18-92.1.18.el5.src.rpm 2> /dev/null
Now spec the kernel module version for this build with:
rpmbuild -bp –target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log
After installing the kernel source tree navigate to the install location and start the build process:
cd ~/rpmbuild/BUILD/kernel-2.6.18/2.6.18.x86_64/
make oldconfig
Accept the default values [especially if you aren't sure].
make menuconfig
Browse the source tree menus to ‘File Systems’ –> ‘Network File Systems’ –> ‘Coda File System’. Type “m” for the value, which specifies modular support for coda.
Continue the build process with these commands:
make prepare
make modules_prepare
make M=fs/coda
With the build steps completed the fruits of labor can be plucked from the kernel source tree:
>> As the root user, or su – <<
cp ~/rpmbuild/BUILD/kernel-2.6.18/2.6.18.x86_64/fs/coda/coda.ko /lib/modules/2.6.18-53.1.6.el5/updates/
And at last, coda module installation can be initiated:
depmod -a
modprobe coda
Check that the module started correctly with :
lsmod | grep coda
Now we want to be sure the Coda module starts at boot time so add this line to /etc/modules.conf
probe coda
Configure WebDAV
Once all packages are installed navigate to /etc/davfs2 and edit two configuration files. The configuration for BitGravity’s WebDAV will be used as an example.
By default all the options are commented out on /etc/davfs2/davfs2.conf. For WebDAV to work properly for Deca’s setup the following lines need to be un-commented, and edited as such:
# General Options
# —————
dav_user davfs2 # system wide config file only
dav_group users # system wide config file only
kernel_fs coda
# WebDAV Related Options # ———————-
use_locks 0
# Debugging Options # —————–
debug most # possible values: config, kernel, cache, http, xml,
# httpauth, locks, ssl, httpbody, secrets, most
And add the following line to the Credential Line section of the secrets file:
[Adjust as per your own particular CDN. This line was for BitGravity but check with your CDN provider to be sure what your credentials are before proceeding.]
http://webdav.bitgravity.com/ userid@yourdomain.com password
Next, make a directory for the WebDAV share to mount:
mkdir /davtest
Create dav2fs user:
useradd dav2fs [make sure you choose nologin, and no shell]
Check /etc/passwd to be sure the user dav2fs has no permissions on the system [/sbin/nologin should be the shell interpreter]:
davfs2:x:101:102:davfs2:/var/cache/davfs2:/sbin/nologin
Give the new user ownership of the WebDAV mount
chown -R dav2fs.users /davtest
The final file to edit is /etc/fstab, in which you will add a line like this:
http://webdav.bitgravity.com/ /davtest davfs uid=dav2fs,gid=users,dir_mode=755 0 0
To initiate the mount run:
mount -a
Test that you have everything correct with:
touch /davtest/test.txt
ls -l /davtest/test.txt
You can manually mount the share for troubleshooting purposes with:
mount.davfs -o dir_mode=755,uid=dav2fs,gid=users http://webdav.bitgravity.com/ /davtest
If there is a problem check /var/log/messages!
Enhancing Program Performance on Windows

Unix system administrators noticed a long time ago, that if you installed multiple partitions sized carefully, you could split your operating system data from your program and application data by partitioned drives. By doing this, you could prevent your application data from being intermingled with operating system data on the disk’s physical geometry, and since Unix or Linux won’t store data in a fragmented state, you could be sure that the OS data was (for the most part) “One continuous read” for the hard disk. The same could be said for the application data.
It also allows you to format and re-install your primary disk/OS without completely losing your application or program data, and visa – versa.
Perhaps one of the greatest benefits of this configuration is that if you inadvertently wipe out your partitions you might lose your OS, OR your applications/programs, but usually not both.
Long ago I started doing this on my windows systems, and I’ve had tremendous success. I’ve seen cases where my small outdated desktop at home ran much faster than my all powerful office desktop, mainly because of configuration customizations like this.
If you are installing a Windows XP or similar type system I recommend you do the following with regards to disk partitioning.
Primary partition 1 – 7.5 GB Size – Windows Installation and OS disk.
Partition 2 – 2.5 X the amount of RAM in your system.
Partition 3, 4, 5… Allocated as you wish, with at least one large NTFS partition to support your program file installations and applications data. I recommend not less than 50% of the drive, or more if you choose. If the system is not going to be multi-boot, then you might as well allocate at least 15GB blocks. You needn’t use the entire disk if you aren’t sure what you will need for a breakdown, you can always modify those later.
Install Windows and Critical Drivers
Format your drives as NTFS. You can format them all, or just the system disk (partition 1) for now, and format the others later. It might be smart to do it now to avoid getting lost later in the article. Install Windows to the C: drive (Partition 1). Install ONLY THE DRIVERS and critical device software needed for the system. Connect to update.microsoft.com and follow instructions to get your service packs (and OS patches) up to date as you desire. The service packs are important because SP3 for XP (for example) is over 250 MB, and is more of an OS “re-installation” than a service pack.
Move the system page file (swap file)
Right click on “My Computer”, and choose “Properties” (or simultaneously press the Windows Key + Pause Break) to reach the “System Properties” window.
Click on the “Advanced” tab, and then on “Performance” click “Settings”.
Click on the “Advanced” tab within the “Settings” window, and under the “Virtual Memory” settings click the “Change” button.
Disable the system swap file on drive C:.
Enable the system swap file on drive D (second partition). Set your swap file MIN and MAX to NO less than 1.4 X the amount of RAM in your system, and not more than 2.5 X your system RAM. I recommend using 2X the size of my system’s RAM, or 2048 MB, whichever is lowest. Some experts recommend up to 2.5 X the amount of your RAM be allocate for swap, so I have set that as the MAX for purposes of this article. The important part is to make the MIN and MAX the same, which will alleviate window’s propensity to continuously map swap space.
Click OK to save, and exit the properties dialogs.
Defragment the Windows Drive
Install Programs and Application Data
On your third partition, which should be at least 15 GB, install all your favorite programs. Make sure as you go through each program or application installation routine that you choose “Custom” installation type, and change the installation directory to be “E:\Program Files\programname” (or whatever drive letter you choose past the swap disk of D:).
All future software an add-ons should be installed here if possible.
Defragment the Applications Drive
That’s it! You are done! Now if you will be able to reap the benefits from the performance metrics I hit on at the start of this article.
Good luck, and happy computing!
RF Engineering – Performance Reporting
Filed under: Engineering, RF Engineering, RF Engineering, Tech, Technology Engineering
SM OM DataGrid Design
Tired of having to run performance and trending reports?
Getting inaccurate results from your drop/block reports because of time shift?
Tired of handling such large amounts of data, and kludging through OMP data?
Designed for firms which use Lucent and Motorola switching with cellular networks (3G), we offer data grid design and implementation. We offer complete turn key solutions where your SM/OM data is imported hourly into a database, and using dynamic programming, and open source projects like PhP, Perl, Mysql, Apache, and JpGraph, we can design your interface custom tailored to you!
Imagine viewing your network performance metrics, spotting bad mobiles, high drop sites, all over your morning cup of coffee, and be in the field tilting antennae before first break! Think of the hundreds of thousands of dollars you’ll save in man hours as your engineers are free to zoom in on trouble spots using visual cues such as color-maps, and not sifting through tons of data and merging excel spreadsheets with VB macros!
With options like troposphere angle views on color-maps, you can literally get a birds eye view of meshed networks, overlapping service areas, and drill down to visit individual switch level metrics at a glance.
Forget out of the box solutions like Ocelot! Based around the original design (and from the original designer of Netwatch and Netwatch II) SM Data grid is by far the superior design, and tailored around your firm’s style of engineering.
Want to know more about how InnerTechnical can engineer SM/OM Data grid solutions for you? Fill out the form below to contact us, and we’ll arrange a meeting to discuss your needs:

