Ok, resizing a servers RVM data segment, this is pretty hairy stuff, and really only should be considered if there is no other way out and you definitely, 100% surely, undoubtedly know that the problem is caused by the server running out of RVM data.
Other causes for server problems can be,
How to know we ran out of RVM data and not any of the zillion other reasons? Check the server logs, once in a while any server will dump out statistics amongst which you can find something like,
14:39:51 Printing RDS statistics Number of Free bytes: 2c05900 Alloced bytes: 43fa3a0
The numbers are hexadecimal, but obviously when Free bytes has become a really small number, the server probably doesn't have any RVM memory left. volutil printstats forces these statistics to the log if you can't find them/the server crashes before it prints them.
Ok, now on with the real stuff.
$ volutil getvolumelist | grep ^B | \ sed 's/^B\(.*\) I\(.*\) H.*/volutil purge \2 \1' > purge-backupsThe file 'purge-backups' should then contain lines like,
volutil purge d10000ad vm:u.ecc.0.backup volutil purge d10000ae vm:u.gkesden.0.backup volutil purge d10000af vm:u.jaharkes.mail.0.backup volutil purge d10000b0 vm:u.jclopez.0.backup volutil purge d10000b1 vm:u.jflinn.0.backupNow we can purge these volumes by running
$ sh -x purge-backupsIf the server is unable to stay up and running long enough, you can continue but it will take somewhat more effort to reload RVM as we have to skip these backup volumes during recovery. During the following server startup all the linkcounts on containerfiles will be off by one and it will complain a lot, but it did work the last time I tried it.
$ norton-reinit -rvm < rvm-log-device/file > < rvm-data-device/file > \ < rvm-data-length > -dump rvmcontentsdumpThis should give us a file rvmcontentsdump that contains all we need to reconstruct the server state in a newly initialized RVM area.
$ rvmutl * i new_rvm_logfile 5M * q $ rdsinit -f new_rvmlogfile new_rvmdatafile 209715200 0x50000000 \ 0xb000000 0x100000 80 32The rdsinit parameters are for a 200MB rvm data segment, I took the numbers from the vice-setup-rvm script.
$ norton-reinit -rvm new_rvmlogfile new_rvmdatafile 209715200 \ -load rvmcontentsdumpIf there are any volumes that give problems, it is possible to add skip < volumeid > to the commandline. But you'll have to do the rvmutl/rdsinit steps again each time you retry norton-reinit.
rvm_log="new_rvmlogfile" rvm_data="new_rvmdatafile" rvm_data_length=209715200The last definition in the configuration file is the one that is used, so you shouldn't have to worry about previous definitions higher up in the file. Alternatively, if you're a long time Coda user, you might still be using the /vice/srv.conf setup. In this case, backup the old file and create a new file containing a single line,
-rvm new_rvmlogfile new_rvmdatafile 209715200
Jan