[PATCH PART2 v2 7/7] staging: ramster: add how-to for ramster

2013-04-12 Thread Wanpeng Li
Add how-to for ramster.

Acked-by: Dan Magenheimer 
Singed-off-by: Dan Magenheimer 
Signed-off-by: Wanpeng Li 
---
 drivers/staging/zcache/ramster/HOWTO.txt |  257 ++
 1 file changed, 257 insertions(+)
 create mode 100644 drivers/staging/zcache/ramster/HOWTO.txt

diff --git a/drivers/staging/zcache/ramster/HOWTO.txt 
b/drivers/staging/zcache/ramster/HOWTO.txt
new file mode 100644
index 000..a4ee979
--- /dev/null
+++ b/drivers/staging/zcache/ramster/HOWTO.txt
@@ -0,0 +1,257 @@
+Version: 130309
+ Dan Magenheimer 
+
+This is a how-to document for RAMster.  It applies to the March 9, 2013
+version of RAMster, re-merged with the new zcache codebase, built and tested
+on the 3.9 tree and submitted for the staging tree for 3.9.
+
+Note that this document was created from notes taken earlier.  I would
+appreciate any feedback from anyone who follows the process as described
+to confirm that it works and to clarify any possible misunderstandings,
+or to report problems.
+
+A. PRELIMINARY
+
+1) Install two or more Linux systems that are known to work when upgraded
+   to a recent upstream Linux kernel version (e.g. v3.9).  I used Oracle
+   Linux 6 ("OL6") on two Dell Optiplex 790s.  Note that it should be possible
+   to use ocfs2 as a filesystem on your systems but this hasn't been
+   tested thoroughly, so if you do use ocfs2 and run into problems, please
+   report them.  Up to eight nodes should work, but not much testing has
+   been done with more than three nodes.
+
+On each system:
+
+2) Configure, build and install then boot Linux (e.g. 3.9), just to ensure it
+   can be done with an unmodified upstream kernel.  Confirm you booted
+   the upstream kernel with "uname -a".
+
+3) Install ramster-tools.  The src.rpm and an OL6 rpm are available
+   in this directory.  I'm not very good at userspace stuff and
+   would welcome any help in turning ramster-tools into more
+   distributable rpms/debs for a wider range of distros.
+
+B. BUILDING RAMSTER INTO THE KERNEL
+
+Do the following on each system:
+
+1) Ensure you have the new codebase for drivers/staging/zcache in your source.
+
+2) Change your .config to have:
+
+   CONFIG_CLEANCACHE=y
+   CONFIG_FRONTSWAP=y
+   CONFIG_STAGING=y
+   CONFIG_ZCACHE=y
+   CONFIG_RAMSTER=y
+
+   You may have to reconfigure your kernel multiple times to ensure
+   all of these are set properly.  I use:
+
+   # yes "" | make oldconfig
+
+   and then manually check the .config file to ensure my selections
+   have "taken".
+
+   Do not bother to build the kernel until you are certain all of
+   the above config selections will stick for the build.
+
+3) Build this kernel and "make install" so that you have a new kernel
+   in /etc/grub.conf
+
+4) Add "ramster" to the kernel boot line in /etc/grub.conf.
+
+5) Reboot and check dmesg to ensure there are some messages from ramster
+   and that "ramster_enabled=1" appears.
+
+   # dmesg | grep ramster
+
+   You should also see a lot of files in:
+
+   # ls /sys/kernel/debug/zcache
+   # ls /sys/kernel/debug/ramster
+
+   and a few files in:
+
+   # ls /sys/kernel/mm/ramster
+
+   RAMster now will act as a single-system zcache but doesn't yet
+   know anything about the cluster so can't do anything remotely.
+
+C. BUILDING THE RAMSTER CLUSTER
+
+This is the error prone part unless you are a clustering expert.  We need
+to describe the cluster in /etc/ramster.conf file and the init scripts
+that parse it are extremely picky about the syntax.
+
+1) Create the /etc/ramster.conf file and ensure it is identical
+   on both systems.  There is a good amount of similar documentation
+   for ocfs2 /etc/cluster.conf that can be googled for this, but I use:
+
+   cluster:
+   name = ramster
+   node_count = 2
+   node:
+   name = system1
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r1
+   ip_port = 
+   node:
+   name = system2
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r2
+   ip_port = 
+
+   You must ensure that the "name" field in the file exactly matches
+   the output of "hostname" on each system.  The following assumes
+   you use "ramster" as the name of your cluster.
+
+2) Enable the ramster service and configure it:
+
+   # chkconfig --add ramster
+   # service ramster configure
+
+   Set "load on boot" to "y", cluster to start is "ramster" (or whatever
+   name you chose in ramster.conf), heartbeat dead threshold as "500",
+   network idle timeout as "100".  Leave the others as default.
+
+4) Reboot.  After reboot, try:
+
+   # service ramster status
+
+   You should see "Checking ramster cluster ramster: Online".  If you do
+   not, something is wrong and RAMster will not work.  Note that you
+   should also see that the driver for "configfs" is 

[PATCH PART2 v2 7/7] staging: ramster: add how-to for ramster

2013-04-12 Thread Wanpeng Li
Add how-to for ramster.

Acked-by: Dan Magenheimer dan.magenhei...@oracle.com
Singed-off-by: Dan Magenheimer dan.magenhei...@oracle.com
Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com
---
 drivers/staging/zcache/ramster/HOWTO.txt |  257 ++
 1 file changed, 257 insertions(+)
 create mode 100644 drivers/staging/zcache/ramster/HOWTO.txt

diff --git a/drivers/staging/zcache/ramster/HOWTO.txt 
b/drivers/staging/zcache/ramster/HOWTO.txt
new file mode 100644
index 000..a4ee979
--- /dev/null
+++ b/drivers/staging/zcache/ramster/HOWTO.txt
@@ -0,0 +1,257 @@
+Version: 130309
+ Dan Magenheimer dan.magenhei...@oracle.com
+
+This is a how-to document for RAMster.  It applies to the March 9, 2013
+version of RAMster, re-merged with the new zcache codebase, built and tested
+on the 3.9 tree and submitted for the staging tree for 3.9.
+
+Note that this document was created from notes taken earlier.  I would
+appreciate any feedback from anyone who follows the process as described
+to confirm that it works and to clarify any possible misunderstandings,
+or to report problems.
+
+A. PRELIMINARY
+
+1) Install two or more Linux systems that are known to work when upgraded
+   to a recent upstream Linux kernel version (e.g. v3.9).  I used Oracle
+   Linux 6 (OL6) on two Dell Optiplex 790s.  Note that it should be possible
+   to use ocfs2 as a filesystem on your systems but this hasn't been
+   tested thoroughly, so if you do use ocfs2 and run into problems, please
+   report them.  Up to eight nodes should work, but not much testing has
+   been done with more than three nodes.
+
+On each system:
+
+2) Configure, build and install then boot Linux (e.g. 3.9), just to ensure it
+   can be done with an unmodified upstream kernel.  Confirm you booted
+   the upstream kernel with uname -a.
+
+3) Install ramster-tools.  The src.rpm and an OL6 rpm are available
+   in this directory.  I'm not very good at userspace stuff and
+   would welcome any help in turning ramster-tools into more
+   distributable rpms/debs for a wider range of distros.
+
+B. BUILDING RAMSTER INTO THE KERNEL
+
+Do the following on each system:
+
+1) Ensure you have the new codebase for drivers/staging/zcache in your source.
+
+2) Change your .config to have:
+
+   CONFIG_CLEANCACHE=y
+   CONFIG_FRONTSWAP=y
+   CONFIG_STAGING=y
+   CONFIG_ZCACHE=y
+   CONFIG_RAMSTER=y
+
+   You may have to reconfigure your kernel multiple times to ensure
+   all of these are set properly.  I use:
+
+   # yes  | make oldconfig
+
+   and then manually check the .config file to ensure my selections
+   have taken.
+
+   Do not bother to build the kernel until you are certain all of
+   the above config selections will stick for the build.
+
+3) Build this kernel and make install so that you have a new kernel
+   in /etc/grub.conf
+
+4) Add ramster to the kernel boot line in /etc/grub.conf.
+
+5) Reboot and check dmesg to ensure there are some messages from ramster
+   and that ramster_enabled=1 appears.
+
+   # dmesg | grep ramster
+
+   You should also see a lot of files in:
+
+   # ls /sys/kernel/debug/zcache
+   # ls /sys/kernel/debug/ramster
+
+   and a few files in:
+
+   # ls /sys/kernel/mm/ramster
+
+   RAMster now will act as a single-system zcache but doesn't yet
+   know anything about the cluster so can't do anything remotely.
+
+C. BUILDING THE RAMSTER CLUSTER
+
+This is the error prone part unless you are a clustering expert.  We need
+to describe the cluster in /etc/ramster.conf file and the init scripts
+that parse it are extremely picky about the syntax.
+
+1) Create the /etc/ramster.conf file and ensure it is identical
+   on both systems.  There is a good amount of similar documentation
+   for ocfs2 /etc/cluster.conf that can be googled for this, but I use:
+
+   cluster:
+   name = ramster
+   node_count = 2
+   node:
+   name = system1
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r1
+   ip_port = 
+   node:
+   name = system2
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r2
+   ip_port = 
+
+   You must ensure that the name field in the file exactly matches
+   the output of hostname on each system.  The following assumes
+   you use ramster as the name of your cluster.
+
+2) Enable the ramster service and configure it:
+
+   # chkconfig --add ramster
+   # service ramster configure
+
+   Set load on boot to y, cluster to start is ramster (or whatever
+   name you chose in ramster.conf), heartbeat dead threshold as 500,
+   network idle timeout as 100.  Leave the others as default.
+
+4) Reboot.  After reboot, try:
+
+   # service ramster status
+
+   You should see Checking ramster cluster ramster: Online.  If you do
+   not, something is wrong and RAMster will not work.  

[PATCH PART2 v2 7/7] staging: ramster: add how-to for ramster

2013-04-11 Thread Wanpeng Li
Add how-to for ramster.

Acked-by: Dan Magenheimer 
Singed-off-by: Dan Magenheimer 
Signed-off-by: Wanpeng Li 
---
 drivers/staging/zcache/ramster/HOWTO.txt |  257 ++
 1 file changed, 257 insertions(+)
 create mode 100644 drivers/staging/zcache/ramster/HOWTO.txt

diff --git a/drivers/staging/zcache/ramster/HOWTO.txt 
b/drivers/staging/zcache/ramster/HOWTO.txt
new file mode 100644
index 000..a4ee979
--- /dev/null
+++ b/drivers/staging/zcache/ramster/HOWTO.txt
@@ -0,0 +1,257 @@
+Version: 130309
+ Dan Magenheimer 
+
+This is a how-to document for RAMster.  It applies to the March 9, 2013
+version of RAMster, re-merged with the new zcache codebase, built and tested
+on the 3.9 tree and submitted for the staging tree for 3.9.
+
+Note that this document was created from notes taken earlier.  I would
+appreciate any feedback from anyone who follows the process as described
+to confirm that it works and to clarify any possible misunderstandings,
+or to report problems.
+
+A. PRELIMINARY
+
+1) Install two or more Linux systems that are known to work when upgraded
+   to a recent upstream Linux kernel version (e.g. v3.9).  I used Oracle
+   Linux 6 ("OL6") on two Dell Optiplex 790s.  Note that it should be possible
+   to use ocfs2 as a filesystem on your systems but this hasn't been
+   tested thoroughly, so if you do use ocfs2 and run into problems, please
+   report them.  Up to eight nodes should work, but not much testing has
+   been done with more than three nodes.
+
+On each system:
+
+2) Configure, build and install then boot Linux (e.g. 3.9), just to ensure it
+   can be done with an unmodified upstream kernel.  Confirm you booted
+   the upstream kernel with "uname -a".
+
+3) Install ramster-tools.  The src.rpm and an OL6 rpm are available
+   in this directory.  I'm not very good at userspace stuff and
+   would welcome any help in turning ramster-tools into more
+   distributable rpms/debs for a wider range of distros.
+
+B. BUILDING RAMSTER INTO THE KERNEL
+
+Do the following on each system:
+
+1) Ensure you have the new codebase for drivers/staging/zcache in your source.
+
+2) Change your .config to have:
+
+   CONFIG_CLEANCACHE=y
+   CONFIG_FRONTSWAP=y
+   CONFIG_STAGING=y
+   CONFIG_ZCACHE=y
+   CONFIG_RAMSTER=y
+
+   You may have to reconfigure your kernel multiple times to ensure
+   all of these are set properly.  I use:
+
+   # yes "" | make oldconfig
+
+   and then manually check the .config file to ensure my selections
+   have "taken".
+
+   Do not bother to build the kernel until you are certain all of
+   the above config selections will stick for the build.
+
+3) Build this kernel and "make install" so that you have a new kernel
+   in /etc/grub.conf
+
+4) Add "ramster" to the kernel boot line in /etc/grub.conf.
+
+5) Reboot and check dmesg to ensure there are some messages from ramster
+   and that "ramster_enabled=1" appears.
+
+   # dmesg | grep ramster
+
+   You should also see a lot of files in:
+
+   # ls /sys/kernel/debug/zcache
+   # ls /sys/kernel/debug/ramster
+
+   and a few files in:
+
+   # ls /sys/kernel/mm/ramster
+
+   RAMster now will act as a single-system zcache but doesn't yet
+   know anything about the cluster so can't do anything remotely.
+
+C. BUILDING THE RAMSTER CLUSTER
+
+This is the error prone part unless you are a clustering expert.  We need
+to describe the cluster in /etc/ramster.conf file and the init scripts
+that parse it are extremely picky about the syntax.
+
+1) Create the /etc/ramster.conf file and ensure it is identical
+   on both systems.  There is a good amount of similar documentation
+   for ocfs2 /etc/cluster.conf that can be googled for this, but I use:
+
+   cluster:
+   name = ramster
+   node_count = 2
+   node:
+   name = system1
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r1
+   ip_port = 
+   node:
+   name = system2
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r2
+   ip_port = 
+
+   You must ensure that the "name" field in the file exactly matches
+   the output of "hostname" on each system.  The following assumes
+   you use "ramster" as the name of your cluster.
+
+2) Enable the ramster service and configure it:
+
+   # chkconfig --add ramster
+   # service ramster configure
+
+   Set "load on boot" to "y", cluster to start is "ramster" (or whatever
+   name you chose in ramster.conf), heartbeat dead threshold as "500",
+   network idle timeout as "100".  Leave the others as default.
+
+4) Reboot.  After reboot, try:
+
+   # service ramster status
+
+   You should see "Checking ramster cluster ramster: Online".  If you do
+   not, something is wrong and RAMster will not work.  Note that you
+   should also see that the driver for "configfs" is 

[PATCH PART2 v2 7/7] staging: ramster: add how-to for ramster

2013-04-11 Thread Wanpeng Li
Add how-to for ramster.

Acked-by: Dan Magenheimer dan.magenhei...@oracle.com
Singed-off-by: Dan Magenheimer dan.magenhei...@oracle.com
Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com
---
 drivers/staging/zcache/ramster/HOWTO.txt |  257 ++
 1 file changed, 257 insertions(+)
 create mode 100644 drivers/staging/zcache/ramster/HOWTO.txt

diff --git a/drivers/staging/zcache/ramster/HOWTO.txt 
b/drivers/staging/zcache/ramster/HOWTO.txt
new file mode 100644
index 000..a4ee979
--- /dev/null
+++ b/drivers/staging/zcache/ramster/HOWTO.txt
@@ -0,0 +1,257 @@
+Version: 130309
+ Dan Magenheimer dan.magenhei...@oracle.com
+
+This is a how-to document for RAMster.  It applies to the March 9, 2013
+version of RAMster, re-merged with the new zcache codebase, built and tested
+on the 3.9 tree and submitted for the staging tree for 3.9.
+
+Note that this document was created from notes taken earlier.  I would
+appreciate any feedback from anyone who follows the process as described
+to confirm that it works and to clarify any possible misunderstandings,
+or to report problems.
+
+A. PRELIMINARY
+
+1) Install two or more Linux systems that are known to work when upgraded
+   to a recent upstream Linux kernel version (e.g. v3.9).  I used Oracle
+   Linux 6 (OL6) on two Dell Optiplex 790s.  Note that it should be possible
+   to use ocfs2 as a filesystem on your systems but this hasn't been
+   tested thoroughly, so if you do use ocfs2 and run into problems, please
+   report them.  Up to eight nodes should work, but not much testing has
+   been done with more than three nodes.
+
+On each system:
+
+2) Configure, build and install then boot Linux (e.g. 3.9), just to ensure it
+   can be done with an unmodified upstream kernel.  Confirm you booted
+   the upstream kernel with uname -a.
+
+3) Install ramster-tools.  The src.rpm and an OL6 rpm are available
+   in this directory.  I'm not very good at userspace stuff and
+   would welcome any help in turning ramster-tools into more
+   distributable rpms/debs for a wider range of distros.
+
+B. BUILDING RAMSTER INTO THE KERNEL
+
+Do the following on each system:
+
+1) Ensure you have the new codebase for drivers/staging/zcache in your source.
+
+2) Change your .config to have:
+
+   CONFIG_CLEANCACHE=y
+   CONFIG_FRONTSWAP=y
+   CONFIG_STAGING=y
+   CONFIG_ZCACHE=y
+   CONFIG_RAMSTER=y
+
+   You may have to reconfigure your kernel multiple times to ensure
+   all of these are set properly.  I use:
+
+   # yes  | make oldconfig
+
+   and then manually check the .config file to ensure my selections
+   have taken.
+
+   Do not bother to build the kernel until you are certain all of
+   the above config selections will stick for the build.
+
+3) Build this kernel and make install so that you have a new kernel
+   in /etc/grub.conf
+
+4) Add ramster to the kernel boot line in /etc/grub.conf.
+
+5) Reboot and check dmesg to ensure there are some messages from ramster
+   and that ramster_enabled=1 appears.
+
+   # dmesg | grep ramster
+
+   You should also see a lot of files in:
+
+   # ls /sys/kernel/debug/zcache
+   # ls /sys/kernel/debug/ramster
+
+   and a few files in:
+
+   # ls /sys/kernel/mm/ramster
+
+   RAMster now will act as a single-system zcache but doesn't yet
+   know anything about the cluster so can't do anything remotely.
+
+C. BUILDING THE RAMSTER CLUSTER
+
+This is the error prone part unless you are a clustering expert.  We need
+to describe the cluster in /etc/ramster.conf file and the init scripts
+that parse it are extremely picky about the syntax.
+
+1) Create the /etc/ramster.conf file and ensure it is identical
+   on both systems.  There is a good amount of similar documentation
+   for ocfs2 /etc/cluster.conf that can be googled for this, but I use:
+
+   cluster:
+   name = ramster
+   node_count = 2
+   node:
+   name = system1
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r1
+   ip_port = 
+   node:
+   name = system2
+   cluster = ramster
+   number = 0
+   ip_address = my.ip.ad.r2
+   ip_port = 
+
+   You must ensure that the name field in the file exactly matches
+   the output of hostname on each system.  The following assumes
+   you use ramster as the name of your cluster.
+
+2) Enable the ramster service and configure it:
+
+   # chkconfig --add ramster
+   # service ramster configure
+
+   Set load on boot to y, cluster to start is ramster (or whatever
+   name you chose in ramster.conf), heartbeat dead threshold as 500,
+   network idle timeout as 100.  Leave the others as default.
+
+4) Reboot.  After reboot, try:
+
+   # service ramster status
+
+   You should see Checking ramster cluster ramster: Online.  If you do
+   not, something is wrong and RAMster will not work.