Lab example cluster of 2x ZFS server nodes ubuntu and ubuntu2 with ZFS distributed via Gluster in RAID1 fashion.
I saw som strange sized files on the glusterfs client when powering down one of the server nodes deliberately.
Installing GlusterFS
# apt-get install libibverbs1
# wget -nd http://download.gluster.com/pub/gluster/glusterfs/3.0/3.0.8/Ubuntu/glusterfs_3.0.8-1_amd64.deb
# dpkg -i glusterfs_3.0.8-1_amd64.deb
Make sure both server/client nodes have the same /etc/host info
root@ubuntu:~# cat /etc/hosts
127.0.0.1 localhost
192.168.1.120 ubuntu
192.168.1.149 ubuntu2
node ubunu
# zpool create tank sdb
node ubunu2
# zpool create tank sdb
node ubuntu
# zfs create tank/neo
node ubuntu2
# zfs create tank/trinity
# glusterfs-volgen -n myvol --raid=1 ubuntu:/tank/neo ubuntu2:/tank/trinity
Copy config files created by volgen
# cp ubuntu-myvol-export.vol /etc/glusterfs/glusterfsd.vol
# scp ubuntu2-myvol-export.vol ubuntu2:/etc/glusterfs/glusterfsd.vol
Start up Gluster
root@ubuntu:~# /etc/init.d/glusterfsd start
* Starting glusterfs server glusterfsd
...done.
root@ubuntu2:~# /etc/init.d/glusterfsd start
* Starting glusterfs server glusterfsd
...done.
# mount -t glusterfs myvol-tcp.vol /mnt/glusterfs/
# echo morpheus > /mnt/glusterfs/test.file
Thanks LLNL & GlusterFS developers
Showing posts with label zfs. Show all posts
Showing posts with label zfs. Show all posts
Saturday, June 4, 2011
Installing ZFS in Ubuntu 10.04
This a one row install of ZFS in Ubuntu(tested on 10.04)
# apt-get -y install build-essential gawk alien fakeroot linux-headers-$(uname -r) zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1EE8660B && echo deb http://ppa.launchpad.net/dajhorn/zfs/ubuntu $(uname -r) main > /etc/apt/sources.list.d/zfs.list && apt-get update && apt-get -y install zfsThursday, May 26, 2011
Ubuntu ZFS backup server with dedup
----- Ubuntu 10.04 Backup Server ZFS install -----
Get ZFS on Linux from Lawrence Livermore National Laboratory thanks! :)
Get ZFS on Linux from Lawrence Livermore National Laboratory thanks! :)
# apt-get install build-essential gawk alien fakeroot linux-headers-$(uname -r) zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi
# echo "deb http://ppa.launchpad.net/dajhorn/zfs/ubuntu lucid main" > /etc/apt/sources.list.d/zfs.list
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0D18601A1EE8660B
# apt-get update && apt-get install zfs spl
----- Backup Server ZFS setup -----
# zpool create backup raidz1 sdc sdf sdg sdh spare sdi
# zfs create backup/admin-mac-mini
# zfs set dedup=on backup
------ Backup Server /etc/rsyncd.conf ------
numeric ids = true
read only = false
secrets file = /etc/rsyncd.secrets
uid = root
[admin-mac-mini]
# Owner: Christian Nygaard
path = /backup/admin-mac-mini
log file = /backup/admin-mac-mini/backup.log
auth users = admin-mac-mini
post-xfer exec = /usr/local/bin/zfs-snapshot $RSYNC_MODULE_PATH
---- Backup Server /etc/rsyncd.secrets ----
admin-mac-mini:secretpassword
---- Backup Server /usr/local/bin/zfs-snapshot ----
#!/bin/bash
#
# Usage: /usr/local/bin/zfs-snapshot /backup/zfsfilesystem
#
ZFSVOL=`echo $1 | sed -e 's+^/++g'`
zfs snapshot $ZFSVOL@`date "+%F_%R"`
----- Backup client backup -----
RSYNC_PASSWORD=secretpassword rsync -a --delete /Users/chris admin-mac-mini@backup.example.org::admin-mac-mini
----- Backup client restore -----
rsync admin-mac-mini@backup.example.org::admin-mac-mini /Users/chris/restore
----- Backup Server list backups ----
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
backup/admin-mac-mini@2011-05-26_13:16 0 - 91.4G -
backup/admin-mac-mini@2011-05-26_13:31 43.4K - 91.4G -
Subscribe to:
Posts (Atom)