├── .gitignore ├── images ├── gui1.png ├── gui2.png ├── gui3.png └── gui4.png ├── service ├── gui │ ├── gui.sh │ └── Dockerfile ├── client │ ├── mount.sh │ └── Dockerfile ├── metalogger │ ├── metalogger.sh │ └── Dockerfile ├── master │ ├── master.sh │ └── Dockerfile └── chunkserver │ ├── Dockerfile │ └── chunkserver.sh ├── .github └── workflows │ └── docker-publish.yml ├── docker-compose.yml ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | data 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /images/gui1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moosefs/moosefs-docker-cluster/HEAD/images/gui1.png -------------------------------------------------------------------------------- /images/gui2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moosefs/moosefs-docker-cluster/HEAD/images/gui2.png -------------------------------------------------------------------------------- /images/gui3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moosefs/moosefs-docker-cluster/HEAD/images/gui3.png -------------------------------------------------------------------------------- /images/gui4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moosefs/moosefs-docker-cluster/HEAD/images/gui4.png -------------------------------------------------------------------------------- /service/gui/gui.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CMD="mfsgui -f" 4 | 5 | mkdir -p /etc/mfs 6 | echo "GUISERV_LISTEN_PORT = 9425" > /etc/mfs/mfsgui.cfg 7 | 8 | #Add GUI port if set 9 | if [ ! -z ${GUI_PORT+X} ]; 10 | then 11 | echo "GUISERV_LISTEN_PORT = $GUI_PORT" > /etc/mfs/mfsgui.cfg 12 | fi 13 | 14 | exec $CMD 15 | -------------------------------------------------------------------------------- /service/client/mount.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CMD="mfsmount /mnt/moosefs -f" 4 | 5 | #Add host if set 6 | if [ ! -z ${MASTER_HOST+X} ]; 7 | then 8 | CMD="$CMD -H $MASTER_HOST" 9 | fi 10 | 11 | #Add port if set 12 | if [ ! -z ${MASTER_PORT+X} ]; 13 | then 14 | CMD="$CMD -P $MASTER_PORT" 15 | fi 16 | 17 | exec $CMD 18 | -------------------------------------------------------------------------------- /service/metalogger/metalogger.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Set default MooseFS enviroment to PRODUCTION 4 | MFS_ENV="${MFS_ENV:-PROD}" 5 | 6 | # Set a correct owner 7 | chown -R mfs:mfs /var/lib/mfs 8 | 9 | # Overwrite mfsmetalogger.cfg if passed in 10 | # this will base64 decode MFS_METALOGGER_CONFIG variable text 11 | # substitute any env variables in decoded text 12 | # save text into /etc/mfs/mfsmetalogger.cfg 13 | if [ ! -z ${MFS_METALOGGER_CONFIG+X} ]; 14 | then 15 | echo $MFS_METALOGGER_CONFIG | base64 -d | envsubst > /etc/mfs/mfsmetalogger.cfg 16 | fi 17 | 18 | # Run 19 | exec mfsmetalogger -f 20 | -------------------------------------------------------------------------------- /service/client/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build MooseFS client from source on Debian Trixie (13) container 2 | 3 | ARG MFS_TAG="v4.58.3" 4 | 5 | FROM moosefs/mfsbuilder:trixie AS mfsbuilder 6 | WORKDIR /moosefs 7 | ARG MFS_TAG 8 | RUN git clone --depth 1 --branch ${MFS_TAG} https://github.com/moosefs/moosefs.git /moosefs 9 | RUN set -eux; \ 10 | autoreconf -f -i; \ 11 | ./configure --prefix=/usr --mandir=/share/man --sysconfdir=/etc \ 12 | --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs \ 13 | --disable-mfsbdev --disable-mfsmaster --disable-mfschunkserver \ 14 | --disable-mfsmetalogger --disable-mfsnetdump --disable-mfsgui --disable-mfscli; \ 15 | make DESTDIR=/tmp/mfs install 16 | 17 | #Build moosefs-client container 18 | FROM debian:trixie 19 | COPY --from=mfsbuilder /tmp/mfs/etc /etc 20 | COPY --from=mfsbuilder /tmp/mfs/usr /usr 21 | 22 | # Container preparation 23 | ADD mount.sh /usr/sbin/mount.sh 24 | RUN set -eux; \ 25 | apt-get update; \ 26 | apt-get install libfuse3-4 fuse3 -y; \ 27 | ln -s /usr/bin/mfsmount /usr/sbin/mfsmount; \ 28 | chown root:root /usr/sbin/mount.sh; \ 29 | chmod 700 /usr/sbin/mount.sh; \ 30 | mkdir -p /mnt/moosefs 31 | 32 | CMD ["mount.sh"] 33 | -------------------------------------------------------------------------------- /service/gui/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build MooseFS GUI server from source on Debian Trixie (13) container 2 | 3 | ARG MFS_TAG="v4.58.3" 4 | 5 | FROM moosefs/mfsbuilder:trixie AS mfsbuilder 6 | WORKDIR /moosefs 7 | ARG MFS_TAG 8 | RUN git clone --depth 1 --branch ${MFS_TAG} https://github.com/moosefs/moosefs.git /moosefs 9 | RUN set -eux; \ 10 | autoreconf -f -i; \ 11 | ./configure --prefix=/usr --mandir=/share/man --sysconfdir=/etc --localstatedir=/var/lib \ 12 | --with-default-user=mfs --with-default-group=mfs --disable-mfsbdev --disable-mfsmount \ 13 | --disable-mfsmaster --disable-mfsmetalogger --disable-mfsnetdump --disable-mfschunkserver; \ 14 | make DESTDIR=/tmp/mfs install 15 | 16 | #Build moosefs-gui container 17 | FROM python:3.13-trixie 18 | COPY --from=mfsbuilder /tmp/mfs/usr /usr 19 | COPY --from=mfsbuilder /tmp/mfs/var /var 20 | 21 | # Expose GUI port 22 | EXPOSE 9425 23 | 24 | # Container preparation 25 | ADD gui.sh /usr/sbin/gui.sh 26 | RUN set -eux; \ 27 | useradd -r -d /var/lib/mfs -s /usr/sbin/nologin mfs; \ 28 | chown -R mfs:mfs /usr/share/mfscgi; \ 29 | chown -R mfs:mfs /var/lib/mfs; \ 30 | chown root:root /usr/sbin/gui.sh; \ 31 | chmod 700 /usr/sbin/gui.sh 32 | 33 | CMD ["gui.sh"] 34 | -------------------------------------------------------------------------------- /service/master/master.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Set default MooseFS enviroment to PRODUCTION 4 | MFS_ENV="${MFS_ENV:-PROD}" 5 | 6 | #Set correct owner 7 | chown -R mfs:mfs /var/lib/mfs 8 | 9 | # Overwrite mfsmaster.cfg if passed in 10 | # this will base64 decode MFS_MASTER_CONFIG variable text 11 | # substitute any env variables in decoded text 12 | # save text into /etc/mfs/mfsmaster.cfg 13 | if [ ! -z ${MFS_MASTER_CONFIG+X} ]; 14 | then 15 | echo $MFS_MASTER_CONFIG | base64 -d | envsubst > /etc/mfs/mfsmaster.cfg 16 | fi 17 | 18 | # We have to be sure that we have metadata files 19 | if [ -f /var/lib/mfs/metadata.mfs ]; 20 | then 21 | exec mfsmaster -f 22 | else 23 | if [[ -f /var/lib/mfs/metadata.mfs.back.1 && -f /var/lib/mfs/changelog.0.mfs ]]; 24 | then 25 | echo "Can't find metadata.mfs file" 26 | echo "Let's try to restore it" 27 | exec mfsmaster -a -f 28 | else 29 | if [ "$MFS_ENV" == "TEST" ]; 30 | then 31 | echo "MFSM NEW" > /var/lib/mfs/metadata.mfs 32 | exec mfsmaster -f 33 | else 34 | echo "No /var/lib/mfs/metadata.mfs file!" 35 | echo "EXITING - THIS IS A PRODUCTION ENVIRONMENT!" 36 | exit 1 37 | fi 38 | fi 39 | fi 40 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Build nad publish Docker images 2 | 3 | on: 4 | push: 5 | branches: ["master"] 6 | 7 | env: 8 | MOOSEFS_VERSION: 4.58.3 9 | 10 | jobs: 11 | build-and-push: 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | service: 16 | - master 17 | - metalogger 18 | - chunkserver 19 | - client 20 | - gui 21 | steps: 22 | - name: Checkout 23 | uses: actions/checkout@v4 24 | 25 | - name: Set up QEMU 26 | uses: docker/setup-qemu-action@v3 27 | 28 | - name: Set up Docker Buildx 29 | uses: docker/setup-buildx-action@v3 30 | 31 | - name: Login to Docker Hub 32 | uses: docker/login-action@v3 33 | with: 34 | username: ${{ secrets.DOCKERHUB_USERNAME }} 35 | password: ${{ secrets.DOCKERHUB_TOKEN }} 36 | 37 | - name: Build and push 38 | uses: docker/build-push-action@v5 39 | with: 40 | context: ./service/${{ matrix.service }} 41 | platforms: linux/amd64,linux/arm64,linux/arm/v7 42 | push: true 43 | tags: | 44 | moosefs/${{ matrix.service }}:${{ env.MOOSEFS_VERSION }} 45 | moosefs/${{ matrix.service }}:latest 46 | -------------------------------------------------------------------------------- /service/metalogger/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build MooseFS master server from source on Debian Trixie (13) container 2 | 3 | ARG MFS_TAG="v4.58.3" 4 | 5 | FROM moosefs/mfsbuilder:trixie AS mfsbuilder 6 | WORKDIR /moosefs 7 | ARG MFS_TAG 8 | RUN git clone --depth 1 --branch ${MFS_TAG} https://github.com/moosefs/moosefs.git /moosefs 9 | RUN set -eux; \ 10 | autoreconf -f -i; \ 11 | ./configure --prefix=/usr --mandir=/share/man --sysconfdir=/etc \ 12 | --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs \ 13 | --disable-mfsbdev --disable-mfsmount --disable-mfschunkserver \ 14 | --disable-mfsmaster --disable-mfsnetdump --disable-mfsgui --disable-mfscli; \ 15 | make DESTDIR=/tmp/mfs install 16 | 17 | # Build moosefs-metalogger container 18 | FROM debian:trixie 19 | COPY --from=mfsbuilder /tmp/mfs/etc /etc 20 | COPY --from=mfsbuilder /tmp/mfs/usr /usr 21 | COPY --from=mfsbuilder /tmp/mfs/var /var 22 | 23 | # Container preparation 24 | ADD metalogger.sh /usr/sbin/metalogger.sh 25 | RUN set -eux; \ 26 | useradd -r -d /var/lib/mfs -s /usr/sbin/nologin mfs; \ 27 | cp /etc/mfs/mfsmetalogger.cfg.sample /etc/mfs/mfsmetalogger.cfg; \ 28 | chown root:root /usr/sbin/metalogger.sh; \ 29 | chmod 700 /usr/sbin/metalogger.sh 30 | 31 | CMD ["metalogger.sh"] 32 | -------------------------------------------------------------------------------- /service/chunkserver/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build MooseFS chunnkserver from source on Debian Trixie (13) container 2 | 3 | ARG MFS_TAG="v4.58.3" 4 | 5 | FROM moosefs/mfsbuilder:trixie AS mfsbuilder 6 | WORKDIR /moosefs 7 | ARG MFS_TAG 8 | RUN git clone --depth 1 --branch ${MFS_TAG} https://github.com/moosefs/moosefs.git /moosefs 9 | RUN set -eux; \ 10 | autoreconf -f -i; \ 11 | ./configure --prefix=/usr --mandir=/share/man --sysconfdir=/etc \ 12 | --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs \ 13 | --disable-mfsbdev --disable-mfsmount --disable-mfsmaster \ 14 | --disable-mfsmetalogger --disable-mfsnetdump --disable-mfsgui --disable-mfscli; \ 15 | make DESTDIR=/tmp/mfs install 16 | 17 | #Build moosefs-chunkserver container 18 | FROM debian:trixie 19 | COPY --from=mfsbuilder /tmp/mfs/etc /etc 20 | COPY --from=mfsbuilder /tmp/mfs/usr /usr 21 | COPY --from=mfsbuilder /tmp/mfs/var /var 22 | 23 | # Expose chunkserver port 24 | EXPOSE 9422 25 | 26 | # Container preparation 27 | ADD chunkserver.sh /usr/sbin/chunkserver.sh 28 | RUN set -eux; \ 29 | useradd -r -d /var/lib/mfs -s /usr/sbin/nologin mfs; \ 30 | chown root:root /usr/sbin/chunkserver.sh; \ 31 | chmod 700 /usr/sbin/chunkserver.sh; \ 32 | mkdir -p /mnt/hdd0 33 | 34 | CMD ["chunkserver.sh"] 35 | -------------------------------------------------------------------------------- /service/master/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build MooseFS master server from source on Debian Trixie (13) container 2 | 3 | ARG MFS_TAG="v4.58.3" 4 | 5 | FROM moosefs/mfsbuilder:trixie AS mfsbuilder 6 | WORKDIR /moosefs 7 | ARG MFS_TAG 8 | RUN git clone --depth 1 --branch ${MFS_TAG} https://github.com/moosefs/moosefs.git /moosefs 9 | RUN set -eux; \ 10 | autoreconf -f -i; \ 11 | ./configure --prefix=/usr --mandir=/share/man --sysconfdir=/etc \ 12 | --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs \ 13 | --disable-mfsbdev --disable-mfsmount --disable-mfschunkserver \ 14 | --disable-mfsmetalogger --disable-mfsnetdump --disable-mfsgui --disable-mfscli; \ 15 | make DESTDIR=/tmp/mfs install 16 | 17 | #Build moosefs-master container 18 | FROM debian:trixie 19 | COPY --from=mfsbuilder /tmp/mfs/etc /etc 20 | COPY --from=mfsbuilder /tmp/mfs/usr /usr 21 | COPY --from=mfsbuilder /tmp/mfs/var /var 22 | 23 | # Expose master ports 24 | EXPOSE 9419 9420 9421 25 | 26 | # Container preparation 27 | ADD master.sh /usr/sbin/master.sh 28 | RUN set -eux; \ 29 | useradd -r -d /var/lib/mfs -s /usr/sbin/nologin mfs; \ 30 | cp /etc/mfs/mfsexports.cfg.sample /etc/mfs/mfsexports.cfg; \ 31 | chown root:root /usr/sbin/master.sh; \ 32 | chmod 700 /usr/sbin/master.sh 33 | 34 | CMD ["master.sh"] 35 | -------------------------------------------------------------------------------- /service/chunkserver/chunkserver.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | mkdir -p /mnt/hdd0 4 | # Set correct owner 5 | chown -R mfs:mfs /mnt/hdd0 /var/lib/mfs 6 | 7 | # Overwrite mfschunkserver.cfg if passed in 8 | # this will base64 decode MFS_CHUNKSERVER_CONFIG variable text 9 | # substitute any env variables in decoded text 10 | # save text into /etc/mfs/mfschunkserver.cfg 11 | if [ ! -z ${MFS_CHUNKSERVER_CONFIG+X} ]; 12 | then 13 | echo $MFS_CHUNKSERVER_CONFIG | base64 -d | envsubst > /etc/mfs/mfschunkserver.cfg 14 | fi 15 | 16 | # Overwrite mfshdd.cfg if passed in 17 | # this will base64 decode MFS_HDD_CONFIG variable text 18 | # substitute any env variables in decoded text 19 | # save text into /etc/mfs/mfshdd.cfg 20 | if [ ! -z ${MFS_HDD_CONFIG+X} ]; 21 | then 22 | echo $MFS_HDD_CONFIG | base64 -d | envsubst > /etc/mfs/mfshdd.cfg 23 | else 24 | #Add size to hdd if defined 25 | if [ -z ${SIZE+X} ]; 26 | then 27 | echo "/mnt/hdd0 =" > /etc/mfs/mfshdd.cfg 28 | else 29 | echo "/mnt/hdd0 =${SIZE}GiB" > /etc/mfs/mfshdd.cfg 30 | fi 31 | fi 32 | 33 | # Add label if defined 34 | if [ ! -z ${LABELS+X} ]; 35 | then 36 | echo "LABELS=$LABELS" >> /etc/mfs/mfschunkserver.cfg 37 | fi 38 | 39 | if [ ! -z ${MASTER_HOST+X} ]; 40 | then 41 | echo "MASTER_HOST=$MASTER_HOST" >> /etc/mfs/mfschunkserver.cfg 42 | fi 43 | if [ ! -z ${CSSERV_LISTEN_PORT+X} ]; 44 | then 45 | echo "CSSERV_LISTEN_PORT=$CSSERV_LISTEN_PORT" >> /etc/mfs/mfschunkserver.cfg 46 | fi 47 | if [ ! -z ${DATA_PATH+X} ]; 48 | then 49 | echo "DATA_PATH=$DATA_PATH" >> /etc/mfs/mfschunkserver.cfg 50 | fi 51 | 52 | exec mfschunkserver -f 53 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | mfsmaster: 3 | image: moosefs/master 4 | container_name: "mfsmaster" 5 | networks: 6 | moosefsnet: 7 | ipv4_address: "172.20.0.2" 8 | ports: 9 | - "9419:9419" 10 | - "9420:9420" 11 | - "9421:9421" 12 | volumes: 13 | - ./data/master/meta:/var/lib/mfs 14 | hostname: mfsmaster 15 | environment: 16 | - MFS_ENV=TEST 17 | # In the TEST environment, if metadata.mfs file or other metadata files 18 | # like metdata.mfs.back and changelog.0.mfs are missing, the script will 19 | # create an EMPTY metadata file! 20 | # When MFS_ENV=PROD metdata.mfs file will not be created! 21 | 22 | mfsgui: 23 | image: moosefs/gui 24 | container_name: "mfsgui" 25 | networks: 26 | moosefsnet: 27 | ipv4_address: "172.20.0.3" 28 | ports: 29 | - "9425:9425" 30 | depends_on: 31 | - mfsmaster 32 | 33 | mfsmetalogger: 34 | image: moosefs/metalogger 35 | container_name: "mfsmetalogger" 36 | networks: 37 | moosefsnet: 38 | ipv4_address: "172.20.0.4" 39 | volumes: 40 | - ./data/metalogger/meta:/var/lib/mfs 41 | environment: 42 | - MFS_ENV=TEST 43 | # In the TEST environment, if metadata.mfs file or other metadata files 44 | # like metdata.mfs.back and changelog.0.mfs are missing, the script will 45 | # create an EMPTY metadata file! 46 | # When MFS_ENV=PROD metdata.mfs file will not be created! 47 | depends_on: 48 | - mfsmaster 49 | 50 | mfschunkserver1: 51 | image: moosefs/chunkserver 52 | container_name: "mfschunkserver1" 53 | environment: 54 | - LABELS=M 55 | #- SIZE=100 56 | links: 57 | - mfsmaster 58 | networks: 59 | moosefsnet: 60 | ipv4_address: "172.20.0.11" 61 | volumes: 62 | - ./data/cs1/hdd0:/mnt/hdd0 63 | - ./data/cs1/meta:/var/lib/mfs 64 | depends_on: 65 | - mfsmaster 66 | 67 | mfschunkserver2: 68 | image: moosefs/chunkserver 69 | container_name: "mfschunkserver2" 70 | environment: 71 | - LABELS=M,B 72 | #- SIZE=100 73 | links: 74 | - mfsmaster 75 | networks: 76 | moosefsnet: 77 | ipv4_address: "172.20.0.12" 78 | volumes: 79 | - ./data/cs2/hdd0:/mnt/hdd0 80 | - ./data/cs2/meta:/var/lib/mfs 81 | depends_on: 82 | - mfsmaster 83 | 84 | mfschunkserver3: 85 | image: moosefs/chunkserver 86 | container_name: "mfschunkserver3" 87 | environment: 88 | - LABELS=M,B 89 | #- SIZE=100 90 | links: 91 | - mfsmaster 92 | networks: 93 | moosefsnet: 94 | ipv4_address: "172.20.0.13" 95 | volumes: 96 | - ./data/cs3/hdd0:/mnt/hdd0 97 | - ./data/cs3/meta:/var/lib/mfs 98 | depends_on: 99 | - mfsmaster 100 | 101 | mfschunkserver4: 102 | image: moosefs/chunkserver 103 | container_name: "mfschunkserver4" 104 | environment: 105 | - LABELS=B 106 | #- SIZE=100 107 | links: 108 | - mfsmaster 109 | networks: 110 | moosefsnet: 111 | ipv4_address: "172.20.0.14" 112 | volumes: 113 | - ./data/cs4/hdd0:/mnt/hdd0 114 | - ./data/cs4/meta:/var/lib/mfs 115 | depends_on: 116 | - mfsmaster 117 | 118 | mfsclient1: 119 | image: moosefs/client 120 | container_name: "mfsclient1" 121 | cap_add: 122 | - SYS_ADMIN 123 | devices: 124 | - /dev/fuse:/dev/fuse 125 | security_opt: 126 | - apparmor:unconfined 127 | stdin_open: true 128 | tty: true 129 | links: 130 | - mfsmaster 131 | networks: 132 | moosefsnet: 133 | ipv4_address: "172.20.0.101" 134 | depends_on: 135 | - mfsmaster 136 | - mfschunkserver1 137 | - mfschunkserver2 138 | - mfschunkserver3 139 | - mfschunkserver4 140 | 141 | mfsclient2: 142 | image: moosefs/client 143 | container_name: "mfsclient2" 144 | cap_add: 145 | - SYS_ADMIN 146 | devices: 147 | - /dev/fuse:/dev/fuse 148 | security_opt: 149 | - apparmor:unconfined 150 | stdin_open: true 151 | tty: true 152 | links: 153 | - mfsmaster 154 | networks: 155 | moosefsnet: 156 | ipv4_address: "172.20.0.102" 157 | depends_on: 158 | - mfsmaster 159 | - mfschunkserver1 160 | - mfschunkserver2 161 | - mfschunkserver3 162 | - mfschunkserver4 163 | 164 | networks: 165 | moosefsnet: 166 | driver: bridge 167 | ipam: 168 | config: 169 | - subnet: 172.20.0.0/16 170 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MooseFS Docker Cluster 2 | 3 | This is an example configuration of a multi-node MooseFS cluster based on the Debian 13 (Trixie) Docker image. The system includes a master server, a GUI monitoring server, four chunk servers and two clients. Once successfully deployed, you will have a fully functional MooseFS cluster that you can take full advantage of, discovering its amazing features. 4 | 5 | # Updates 6 | 7 | - Use version 4.58.3 of MooseFS. 8 | - Added moosefs-gui container. MooseFS version 4.57.7 introduced new mfsgui server application. Mfscgi and mfscgiserv packages are no longer available. 9 | - New mfsgui application allows prometheus metrics to be collected. For example: [http://localhost:9425/metrics](http://localhost:9425/metrics) 10 | - The use of the MooseFS repository in containers has been discontinued. Binary files are compiled from source. This approach will make it easier to run the cluster on different CPU architectures. 11 | - All MooseFS processes are now correctly handling signals. 12 | - Metadata and data are now persistent and mounted as volumes. 13 | - TEST and PROD moosefs master metadata behavior defined by `MFS_ENV` variable. 14 | - Specify storage size per chunk server (env: `SIZE`) default not defined. Depends on your local storage free space. 15 | - Specify label per chunk server (env: `LABEL`, default: *empty*). 16 | - Switched to *debian:buster* as a base image. 17 | - Example with 4 chunk servers (labels: M, MB, MB, B). 18 | 19 | # Cluster configurations 20 | 21 | **File docker-compose.yml** 22 | 23 | - Master Server: `172.20.0.2` 24 | - GUI Monitoring Interface: [http://localhost:9425](http://localhost:9425), on Linux also [http://172.20.0.3:9425](http://172.20.0.3:9425) 25 | - Metalogger: `172.20.0.4` 26 | - Chunkserver 1: `172.20.0.11`, labels: `M` 27 | - Chunkserver 2: `172.20.0.12`, labels: `M, B` 28 | - Chunkserver 3: `172.20.0.13`, labels: `M, B` 29 | - Chunkserver 4: `172.20.0.14`, labels: `B` 30 | - Client1: `172.168.20.0.101` 31 | - Client2: `172.168.20.0.102` 32 | 33 | # Setup 34 | 35 | > Docker compose plugin is required! 36 | 37 | Clone MooseFS docker cluster repository: 38 | 39 | ``` 40 | git clone https://github.com/moosefs/moosefs-docker-cluster 41 | cd moosefs-docker-cluster 42 | ``` 43 | 44 | Run MooseFS cluster: 45 | ``` 46 | docker compose up 47 | ``` 48 | 49 | You can also run `docker compose` in detached mode. All running Docker nodes will run in the background, so Docker console output will be invisible. 50 | ``` 51 | docker compose up -d 52 | ``` 53 | 54 | You can check if instances are running: 55 | ``` 56 | docker ps 57 | ``` 58 | 59 | You should have 1 Master Server, 1 Metalogger, 4 Chunkservers and 2 Clients running. The expected output should be similar to the following: 60 | ``` 61 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 62 | f104d5b2f737 moosefs-docker-cluster-mfsclient2 "mount.sh" 3 minutes ago Up 3 seconds mfsclient2 63 | 74de405a4baa moosefs-docker-cluster-mfsclient1 "mount.sh" 3 minutes ago Up 3 seconds mfsclient1 64 | 4d8637367bbd moosefs-docker-cluster-mfschunkserver3 "chunkserver.sh" 3 minutes ago Up 3 seconds 9422/tcp mfschunkserver3 65 | 8bbe27c0a913 moosefs-docker-cluster-mfschunkserver4 "chunkserver.sh" 3 minutes ago Up 3 seconds 9422/tcp mfschunkserver4 66 | bdceb9669fae moosefs-docker-cluster-mfschunkserver2 "chunkserver.sh" 3 minutes ago Up 3 seconds 9422/tcp mfschunkserver2 67 | 15de9aef85ec moosefs-docker-cluster-mfschunkserver1 "chunkserver.sh" 3 minutes ago Up 3 seconds 9422/tcp mfschunkserver1 68 | 11465da54cb9 moosefs-docker-cluster-mfsmetalogger "metalogger.sh" 3 minutes ago Up 3 seconds mfsmetalogger 69 | 3f7c572225c4 moosefs-docker-cluster-mfsgui "gui.sh" 3 minutes ago Up 3 seconds 0.0.0.0:9425->9425/tcp mfsgui 70 | afd43c5c460f moosefs-docker-cluster-mfsmaster "master.sh" 3 minutes ago Up 4 seconds 0.0.0.0:9419-9421->9419-9421/tcp mfsmaster 71 | ``` 72 | 73 | # Attach / detach to / from container 74 | 75 | For example, if you like to **attach** to the client node execute this command: 76 | ``` 77 | docker exec -it mfsclient1 bash 78 | ``` 79 | 80 | To **detach** from container, just press `Ctrl + D` keys combination. 81 | 82 | # MooseFS Client 83 | 84 | MooseFS filesystem is mounted at `/mnt/moosefs`. If everything is ok you should see this ASCII art: 85 | ``` 86 | cat /mnt/moosefs/.mooseart 87 | \_\ /_/ 88 | \_\_ _/_/ 89 | \--/ 90 | /OO\_--____ 91 | (__) ) 92 | ``\ __ | 93 | ||-' `|| 94 | || || 95 | "" "" 96 | ``` 97 | 98 | # MooseFS CGI Monitoring Interface 99 | 100 | The MooseFS CGI Monitoring Interface is available here: [http://localhost:9425](http://localhost:9425). 101 | 102 | Also on Linux, CGI Server container is available at the IP address: [http://172.20.0.3:9425](http://172.20.0.3:9425) (be aware of a local `172.20.0.x` network). 103 | 104 | ![MooseFS GUI status - dark](https://github.com/moosefs/moosefs-docker-cluster/raw/master/images/gui1.png) 105 | 106 | ![MooseFS GUI status - light](https://github.com/moosefs/moosefs-docker-cluster/raw/master/images/gui2.png) 107 | 108 | ![MooseFS GUI resources - dark](https://github.com/moosefs/moosefs-docker-cluster/raw/master/images/gui3.png) 109 | 110 | ![MooseFS GUI resources - light](https://github.com/moosefs/moosefs-docker-cluster/raw/master/images/gui4.png) 111 | 112 | # Persistence 113 | 114 | Your MooseFS Docker cluster is persistent. It means all files you created in the `/mnt/moosefs` folder will remain there even after turning containers off. 115 | All data and metadata files are stored in the host `./data` directory. 116 | 117 | # Pass config as env variable 118 | 119 | There might be situations where you would want to setup a config file on the container start. 120 | For that scenario you can pass the config file as a base64 encoded text. For example lets say 121 | you want to setup your chunk servers to connect to master in k8s cluster where IP's are dynamically assigned 122 | to pods. You have you master yaml definition set up as: 123 | ``` 124 | apiVersion: apps/v1 125 | kind: Deployment 126 | metadata: 127 | name: moosefs-master 128 | namespace: storage 129 | spec: 130 | replicas: 1 131 | selector: 132 | matchLabels: 133 | app: moosefs-master 134 | template: 135 | metadata: 136 | labels: 137 | app: moosefs-master 138 | spec: 139 | nodeSelector: 140 | "beta.kubernetes.io/os": linux 141 | containers: 142 | - name: moosefs-master 143 | image: moosefs/master:latest 144 | resources: 145 | requests: 146 | cpu: 100m 147 | memory: 128Mi 148 | limits: 149 | cpu: 250m 150 | memory: 256Mi 151 | ports: 152 | - containerPort: 9419 153 | - containerPort: 9420 154 | - containerPort: 9421 155 | volumeMounts: 156 | - name: moosefs-master-mfs 157 | mountPath: /var/lib/mfs 158 | volumes: 159 | - name: moosefs-master-mfs 160 | azureDisk: 161 | kind: Managed 162 | diskName: MooseMasterMfs 163 | diskURI: /subscriptions//resourceGroups//providers/Microsoft.Compute/disks/MooseMasterMfs 164 | --- 165 | apiVersion: v1 166 | kind: Service 167 | metadata: 168 | name: moosefs-master 169 | namespace: storage 170 | spec: 171 | type: NodePort 172 | ports: 173 | - port: 9419 174 | targetPort: 9419 175 | name: listen-metalogger 176 | - port: 9420 177 | targetPort: 9420 178 | name: listen 179 | - port: 9421 180 | targetPort: 9421 181 | name: listen-client 182 | selector: 183 | app: moosefs-master 184 | ``` 185 | 186 | This will reserve an IP in the cluster where the ports will be reached. 187 | 188 | In order for your chunkservers to automatically connect to this IP you would need to have your `mfschunkserver.cfg` defined as: 189 | ``` 190 | MASTER_HOST = $MOOSEFS_MASTER_SERVICE_HOST 191 | CSSERV_LISTEN_PORT = $MOOSEFS_CHUNKSERVER_SERVICE_PORT 192 | DATA_PATH = /mnt/hdd0/mfs 193 | ``` 194 | `MOOSEFS_MASTER_SERVICE_HOST` variable is set by k8s cluster and contains IP where the master service is accessible by. `MOOSEFS_CHUNKSERVER_SERVICE_PORT` this is the port on which we will expose our chunk server. 195 | 196 | Base64 encoded config data is: 197 | ``` 198 | TUFTVEVSX0hPU1QgPSAkTU9PU0VGU19NQVNURVJfU0VSVklDRV9IT1NUCkNTU0VSVl9MSVNURU5fUE9SVCA9ICRNT09TRUZTX0NIVU5LU0VSVkVSX1NFUlZJQ0VfUE9SVApEQVRBX1BBVEggPSAvbW50L2hkZDAvbWZzCg== 199 | ``` 200 | 201 | Now we can spin up chunkserver(s) with: 202 | ``` 203 | apiVersion: apps/v1 204 | kind: Deployment 205 | metadata: 206 | name: moosefs-chunkserver-1 207 | namespace: storage 208 | spec: 209 | replicas: 1 210 | selector: 211 | matchLabels: 212 | app: moosefs-chunkserver-1 213 | template: 214 | metadata: 215 | labels: 216 | app: moosefs-chunkserver-1 217 | spec: 218 | nodeSelector: 219 | "beta.kubernetes.io/os": linux 220 | containers: 221 | - name: moosefs-chunkserver-1 222 | env: 223 | - name: MFS_CHUNKSERVER_CONFIG 224 | value: TUFTVEVSX0hPU1QgPSAkTU9PU0VGU19NQVNURVJfU0VSVklDRV9IT1NUCkNTU0VSVl9MSVNURU5fUE9SVCA9ICRNT09TRUZTX0NIVU5LU0VSVkVSX1NFUlZJQ0VfUE9SVApEQVRBX1BBVEggPSAvbW50L2hkZDAvbWZzCg== 225 | - name: SIZE 226 | value: 16 227 | image: moosefs/chunkserver:latest 228 | ports: 229 | - containerPort: 9422 230 | volumeMounts: 231 | - name: moosefs-chunkserver-data-1 232 | mountPath: /mnt/hdd0 233 | volumes: 234 | - name: moosefs-chunkserver-data-1 235 | azureDisk: 236 | kind: Managed 237 | diskName: MfsHangfireData1 238 | diskURI: /subscriptions//resourceGroups//providers/Microsoft.Compute/disks/MfsHangfireData1 239 | --- 240 | apiVersion: v1 241 | kind: Service 242 | metadata: 243 | name: moosefs-chunkserver-1 244 | namespace: storage 245 | spec: 246 | type: NodePort 247 | ports: 248 | - port: 9422 249 | targetPort: 9422 250 | selector: 251 | app: moosefs-chunkserver-1 252 | ``` 253 | Repeat this for other chunk servers modifying your base64 string accordingly. If you leave all the chunkservers on default port `9422` you can use same base64 encoded string `TUFTVEVSX0hPU1QgPSAkTU9PU0VGU19NQVNURVJfU0VSVklDRV9IT1NUCkRBVEFfUEFUSCA9IC9tbnQvaGRkMC9tZnMK` which will only set correct `MASTER_HOST` and `DATA_PATH` 254 | 255 | # Docker Hub 256 | 257 | | Image name | Image size | Pulls | Stars | Build | 258 | |:-----|:-----|:-----|:-----|:-----| 259 | | [moosefs/master](https://hub.docker.com/r/moosefs/master/) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/moosefs/master?sort=date) | [![master](https://img.shields.io/docker/pulls/moosefs/master)](https://hub.docker.com/r/moosefs/master/) | ![master](https://img.shields.io/docker/stars/moosefs/master) | ![master](https://img.shields.io/docker/cloud/build/moosefs/master) | 260 | | [moosefs/chunkserver](https://hub.docker.com/r/moosefs/chunkserver/) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/moosefs/chunkserver?sort=date) | [![chunkserver](https://img.shields.io/docker/pulls/moosefs/chunkserver)](https://hub.docker.com/r/moosefs/chunkserver/) | ![chunkserver](https://img.shields.io/docker/stars/moosefs/chunkserver) | ![chunkserver](https://img.shields.io/docker/cloud/build/moosefs/chunkserver) | 261 | | [moosefs/client](https://hub.docker.com/r/moosefs/client/) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/moosefs/client?sort=date) | [![client](https://img.shields.io/docker/pulls/moosefs/client)](https://hub.docker.com/r/moosefs/client/) | ![client](https://img.shields.io/docker/stars/moosefs/client) | ![client](https://img.shields.io/docker/cloud/build/moosefs/client) | 262 | | [moosefs/metalogger](https://hub.docker.com/r/moosefs/metalogger/) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/moosefs/metalogger?sort=date) | [![metalogger](https://img.shields.io/docker/pulls/moosefs/metalogger)](https://hub.docker.com/r/moosefs/cgi/) | ![metalogger](https://img.shields.io/docker/stars/moosefs/metalogger) | ![metalogger](https://img.shields.io/docker/cloud/build/moosefs/metalogger) | 263 | | [moosefs/cgi](https://hub.docker.com/r/moosefs/cgi/) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/moosefs/cgi?sort=date) | [![cgi](https://img.shields.io/docker/pulls/moosefs/cgi)](https://hub.docker.com/r/moosefs/cgi/) | ![cgi](https://img.shields.io/docker/stars/moosefs/cgi) | ![cgi](https://img.shields.io/docker/cloud/build/moosefs/cgi) | 264 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU General Public License, version 2 (GPL-2.0) 2 | 3 | The GNU General Public License (GPL-2.0) 4 | 5 | Version 2, June 1991 6 | 7 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 8 | 9 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 10 | 11 | Everyone is permitted to copy and distribute verbatim copies 12 | 13 | of this license document, but changing it is not allowed. 14 | 15 | Preamble 16 | 17 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. 18 | 19 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. 20 | 21 | To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. 22 | 23 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. 24 | 25 | We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. 26 | 27 | Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. 28 | 29 | Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 30 | 31 | The precise terms and conditions for copying, distribution and modification follow. 32 | 33 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 34 | 35 | 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". 36 | 37 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 38 | 39 | 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 40 | 41 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 42 | 43 | 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 44 | 45 | a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 46 | 47 | b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 48 | 49 | c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) 50 | 51 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 52 | 53 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. 54 | 55 | In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 56 | 57 | 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: 58 | 59 | a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 60 | 61 | b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 62 | 63 | c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) 64 | 65 | The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 66 | 67 | If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 68 | 69 | 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 70 | 71 | 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 72 | 73 | 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 74 | 75 | 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. 76 | 77 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. 78 | 79 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 80 | 81 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 82 | 83 | 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 84 | 85 | 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 86 | 87 | Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 88 | 89 | 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 90 | 91 | NO WARRANTY 92 | 93 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 94 | 95 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 96 | 97 | END OF TERMS AND CONDITIONS 98 | --------------------------------------------------------------------------------