CephFS4Linux

Version 1 (Emmanuel Quemener, 21/10/2011 14:17) → Version 2/7 (Emmanuel Quemener, 21/10/2011 14:28)

h1. CephFS for Debian Linux

Sur le maître :

wget -q -O- https://raw.github.com/NewDreamNetwork/ceph/master/keys/release.asc \
| sudo apt-key add -

sudo tee /etc/apt/sources.list.d/ceph.list <<EOF
deb http://ceph.newdream.net/debian/ squeeze main
deb-src http://ceph.newdream.net/debian/ squeeze main
EOF

sudo apt-get update
sudo apt-get install ceph ceph-common

Importation de la clé publique permettant de se connecter sans mot de passe

Passage dans le /etc/ssh/ssh_config : StrictHostKeyChecking no

# Clean process, files, etc
/etc/init.d/ceph -a stop
clush -b -w v20z[37-44] 'umount /srv/osd.$(hostname | sed -e "s/v20z//g")'
clush -b -w v20z[37-44] 'rm -r /srv/*.?? /srv/*.????? /srv/*.??.journal /etc/ceph/*.*'
rm -r /srv/mon.master/ /srv/keyring.mds.master
# Create process
clush -b -w v20z[37-44] 'dd if=/dev/zero of=/dev/sda bs=512 count=65536'
clush -b -w v20z[37-44] 'parted -s -- /dev/sda mklabel msdos'
clush -b -w v20z[37-44] 'parted -s -- /dev/sda mkpart primary 0 -1'
clush -b -w v20z[37-44] 'mkfs.ext3 -m 0 /dev/sda1'
clush -b -w v20z[37-44] 'mkdir /srv/osd.$(hostname | sed -e "s/v20z//g")'
clush -b -w v20z[37-44] 'mount -o noatime,nodiratime,user_xattr /dev/sda1 /srv/osd.$(hostname | sed -e "s/v20z//g")'
cd /etc/ceph
rm ceph.conf ceph.keyring v20z.keyring
mkcephfs -a -c v20z.conf -k v20z.keyring

clush -w v20z[37-44] sudo tee /etc/ceph/ceph.conf < v20z.conf

cp v20z.keyring ceph.keyring
cp v20z.conf ceph.conf
cp v20z.keyring keyring.bin

/etc/init.d/ceph -a restart

cd /etc/ceph
ceph -k v20z.keyring -c v20z.conf health

ceph -k v20z.keyring -c v20z.conf health
2011-10-07 14:29:43.474699 mon <- [health]
2011-10-07 14:29:43.475225 mon5 -> 'HEALTH_WARN 117 pgs peering' (0)

ceph -k v20z.keyring -c v20z.conf health
2011-10-07 14:30:00.726354 mon <- [health]
2011-10-07 14:30:00.726816 mon2 -> 'HEALTH_WARN 4819 pgs peering' (0)

ceph-fuse -o big_writes /media/cephfs/
** WARNING: Ceph is still under development. Any feedback can be directed **
** at ceph-devel@vger.kernel.org or http://ceph.newdream.net/. **
ceph-fuse[20096]: starting ceph client
ceph-fuse[20096]: starting fuse

capsfile
mds = "allow"

osd = "allow rw pool=data"

mon = "allow r"

ceph-authtool --caps capsfile ceph.keyring

ceph-authtool -l ceph.keyring
[client.admin]
key = AQBPV5ZO4FrqORAAAErcaKlrVaAgA8kvqOyxvg==
auid = 18446744073709551615
caps mds = "allow"
caps mon = "allow r"
caps osd = "allow rw pool=data"

ceph-fuse /media/cephfs/

http://ceph.newdream.net/wiki/Installing_on_Debian