[Samba] [ns]mbd, sync'ing of disks, and hdparm

Elizabeth Barham soggytrousers at yahoo.com
Thu Oct 31 01:56:00 GMT 2002

John Benedetto <jbenedet at unm.edu> writes:

> I _think_ it might be Samba re-reading the smb.conf, though I am no expert, 
> so you might want to see what other people on the list say...
> Not sure how to tell you how to make it not do that...

Your response was much better than the others. Thank you. However,
after much experimentation, I have deduced that the file(s) that are
written out occasionally are the ones in nmbd's cache. On Debian,
these reside in:


To remedy the drive access, I mounted a ramdrive at the above mount
point and added support in the initializaton script (after "mkdir
/var/state/samba" manually):


function ram_disk_start {
    if [ -e $STATE_RD_SAVE ] ; then
        # just copy it into the ramdisk
        gunzip -c $STATE_RD_SAVE | dd of=/dev/ram bs=1k count=256 2>/dev/null
        rm -f $STATE_RD_SAVE
        # create an e2fs file system    
        dd if=/dev/zero of=/dev/ram bs=1k count=256 2> /dev/null
        mke2fs -vm0 /dev/ram 256 >/dev/null

    # and now mount it
    mount /dev/ram $CACHE_MOUNT_POINT

function ram_disk_stop {
    dd if=/dev/ram bs=1k count=256 2>/dev/null | gzip -c > $STATE_RD_SAVE

case "$1" in
                modprobe rd
		echo -n "Starting Samba daemons:"
		# (etc)	
		# normal except for ending

		echo "."

	# etc

It's been running like this for about the last 6 hours and there have
been very few disk accesses that I recollect, maybe two.

Thank you,


More information about the samba mailing list