Tag Archives: CentOS

WebDAV server on CentOS – Provider encountered an error while streaming a multistatus PROPFIND response

I’ve encountered this error when trying to connect to web dav enabled folder.
I saw some web posts to add :

RewriteEngine Off

However that did not work for me, I finally traced it back to SElinux, I was using a custom folder and needed to change the permissions :

[user@server]>sudo stat -Z -c %C /var/webdav
user_u:object_r:user_home_dir_t

Compared to /var/www

[user@server]>sudo stat -Z -c %C /var/www
system_u:object_r:httpd_sys_content_t

A change of SElinux permissions and all was well :

[user@server]> chcon -R -u system_u -r object_r -t httpd_sys_content_t /var/webdav

Linux HA – CRM commands

Small reminder as I always tend to forget these :

Dump the CRM cib db :

cibadmin -Q > cib.backup.xml

Modify a resource , dump the cib, modify the xml for the resources and then import using cibadmin -M

cibadmin -V -M -o resources -x modified_resources.xml

Add a resource , create the xml for the resource and them use -C

cibadmin -V -C -o resources -x new_resource.xml

Move resource from one location to another, -f to force it …

crm_resource -M -r resource -H host
crm_resource -M -r resource -H host -f

DRBD , Centos and unmount nfs resources

I have recently built a DRBD + Linux HA NFS cluster , part of the structure was to create a drbd disk resource and mount it on /var/lib/nfs. This allows to switch nfs over to the secondary node without getting “stale nfs handle” errors. Heartbeat was having a hardtime doing a clean umount of the file system and ended up rebooting the machine.

Apr 20 06:47:07 fs Filesystem[9823]: [9887]: INFO: No processes on /var/lib/nfs were signalled
Apr 20 06:47:08 fs Filesystem[9823]: [9890]: ERROR: Couldn’t unmount /var/lib/nfs; trying cleanup with SIGKILL

After some poking around the systems It looked like nfs was not showtdown cleanly. looking into the rc script i changed the signal from 2 to 9

From :

stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -2
echo

To :

stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -9
echo

and now, all is well :)

Apr 20 06:52:49 fs Filesystem[8696]: [8754]: INFO: unmounted /var/lib/nfs successfully

searching the web shows this is a somewhat known issue

Mount ISO on Linux/FreeBSD

On Linux

mount -o loop -t iso9660 path/to/iso.iso /mnt

On FreeBSD

mdconfig -a -t vnode -f /isofile -u 0
mount -t cd9660 /dev/md0 /mnt

Yum Cheats

install with broken packages

# yum -y install yum-skip-broken