Ako nainštalovať seznamFS pod debian etch

31.05.2008 | 23:14 | Konfigurácia | Tomáš Srnka
varovanie.: cely navod je NEDOPISANY!
Navod ako nainstalovat seznamfs pod debian.etch:

1. instalacia seznamfs balickov
0. nainštalujeme debian etch (i386 alebo amd64), pripojime na net a zaktualizujeme (aptitude update && aptitude dist-upgrade)
1. seznamfs vyzaduje novsie FUSE, ako je dostupne, takze treba nahodit backports:
  a, pridame kluc: wget -O - http://backports.org/debian/archive.key | apt-key add -
  b, nainstalujeme potrebne balicky: aptitude -t etch-backports install fuse-utils libfuse2
2. nainstalujeme baliky, ktore nie su standardne v debiane(ak mate amd64, tak si za i386 dosadte amd64):
  a, wget http://switch.dl.sourceforge.net/sourceforge/cfgparser/libcfgparser0_1.0.2_i386.deb
  b, wget http://dfn.dl.sourceforge.net/sourceforge/dbglog/libdbglog_1.5.0_i386.deb
  c, dpkg -i libcfgparser0_1.0.2_i386.deb
  d, dpkg -i libdbglog_1.5.0_i386.deb
3. stiahneme a nainstalujeme seznamfs
  a, wget http://surfnet.dl.sourceforge.net/sourceforge/seznamfs/seznamfs_0.2.1_i386.deb
  b, dpkg -i seznamfs_0.2.1_i386.deb

Dalej uz postupuje, kazdy sam zatial... vecer/zajtra dopisem ako nakonfigurovat master a nody


1.1 Automaticky skript, co nainstaluje seznamfs
Kedze za poslednych par dni som NODE0 preinstaloval hodne krat, prestalo ma to bavit, takze tu je skript, co to zautomatizuje:
#!/bin/sh
PLATFORMA=`uname -a | awk '$12=="x86_64"{ print"amd64"} $12=="i686"{ print"i386"}'`
wget -O - http://backports.org/debian/archive.key | apt-key add -
echo "deb http://www.backports.org/debian etch-backports main contrib non-free" >> /etc/apt/sources.list
aptitude update
yes | aptitude -t etch-backports install fuse-utils libfuse2
wget http://switch.dl.sourceforge.net/sourceforge/cfgparser/libcfgparser0_1.0.2_$PLATFORMA.deb
wget http://dfn.dl.sourceforge.net/sourceforge/dbglog/libdbglog_1.5.0_$PLATFORMA.deb
dpkg -i libdbglog_1.5.0_$PLATFORMA.deb
dpkg -i libcfgparser0_1.0.2_$PLATFORMA.deb
wget http://surfnet.dl.sourceforge.net/sourceforge/seznamfs/seznamfs_0.2.1_$PLATFORMA.deb
dpkg -i seznamfs_0.2.1_$PLATFORMA.deb
rm libdbglog_1.5.0_$PLATFORMA.deb
rm libcfgparser0_1.0.2_$PLATFORMA.deb
rm seznamfs_0.2.1_$PLATFORMA.deb



--------------------------------


2. Konfiguracia FUSE a SeznamFS na Master serveri
default config je ulozeny v /etc/seznamfs/seznamfs.conf. Skopirujeme si konfig do naseho:
cp -Rv /etc/seznamfs/seznamfs.conf /etc/seznamfs/master.conf
a upravime ho, aby vyzeral takto:
#
# SeznamFS configuration file
#

# ============================================================================
# Section [main]
# ============================================================================
# Storage : Where to store local files
# LogFile : Log filename
# LogMask : Log mask
# ReadOnly : Whether filesystem should be read-only (on/off)
# ============================================================================

[main]
Storage = /var/lib/seznamfs/storage
LogFile = /var/log/seznamfs/seznamfs.log
LogMask = I3W2E1F1
ReadOnly = off


# ============================================================================
# Section [binlog]
# ============================================================================
# ServerId : Server ID, servers must have unique IDs
# Filename : Binlog filename (will be suffixed with log number)
# Filesize : Binlog file size (+/-) in megabytes
# KeepFiles : Count of binlog files to keep (0 = keep all)
# ============================================================================

[binlog]
ServerId = 1
Filename = /var/log/seznamfs/log.bin
Filesize = 10
KeepFiles = 0


# ============================================================================
# Section [master]
# ============================================================================
# BindAddress : Address to bind, all = *
# BindPort : Port to bind
# StatusFile : Master status filename
# ThreadCount : Maximal count of clients (slaves + other utilities)
# Should be at least count of clients + 1
# AllowAddresses : Comma-separated list of allowed IP addresses
# ============================================================================

[master]
BindAddress = *
BindPort = 15000
ThreadCount = 8
StatusFile = /var/log/seznamfs/seznamfs-master.status
AllowAddresses = 127.0.0.1,IP_NODU_1,IP_NODU_2,...,...,IP_NODU_N

3. Konfiguracia NODE
Skopirujeme konfig, tak ako pri masteri:
cp -Rv /etc/seznamfs/seznamfs.conf.dpkg-new /etc/seznamfs/slave.conf
a upravime ho, aby vyzeral:
#
# SeznamFS configuration file
#

# ============================================================================
# Section [main]
# ============================================================================
# Storage : Where to store local files
# LogFile : Log filename
# LogMask : Log mask
# ReadOnly : Whether filesystem should be read-only (on/off)
# ============================================================================

[main]
Storage = /var/lib/seznamfs/storage
LogFile = /var/log/seznamfs/seznamfs.log
LogMask = I3W2E1F1
ReadOnly = off


# ============================================================================
# Section [binlog]
# ============================================================================
# ServerId : Server ID, servers must have unique IDs
# Filename : Binlog filename (will be suffixed with log number)
# Filesize : Binlog file size (+/-) in megabytes
# KeepFiles : Count of binlog files to keep (0 = keep all)
# ============================================================================

[binlog]
ServerId = 1
Filename = /var/log/seznamfs/log.bin
Filesize = 10
KeepFiles = 0


# ============================================================================
# Section [slave]
# ============================================================================
# StatusFile : Slave status filename
# MasterHost : Address or hostname of master server
# MasterPort : Port which master server listens on
# MaxKilobytesPerSecond : Maximal size of data replicated per second
# ============================================================================

[slave]
MasterHost = IP_MASTERU
MasterPort = 15000
StatusFile = /var/log/seznamfs/seznamfs-slave.status
MaxKilobytesPerSecond = 0



varovanie.: cely navod je NEDOPISANY!