2008年3月22日 星期六
2008年1月16日 星期三
合併網卡-Debian and ubuntu with a 2.6 kernel
Setup Bonding Ethernet on Debian and ubuntu with a 2.6 kernel
To use Bonding Ethernet for High-Availability (fail-over) on
Debian (Woody, Sarge,etch or Sid with a 2.4.x kernel) and ubuntu you need to:
install package ifenslave-2.6.To install this package follow this command
#apt-get install ifenslave-2.6
make sure the real NICs kernel modules are loaded automatically
edit /etc/network/interfaces to look like this:
iface bond0 inet static
address 10.31.1.5
netmask 255.255.255.0
network 10.31.1.0
gateway 10.31.1.254
up /sbin/ifenslave bond0 eth0
up /sbin/ifenslave bond0 eth1
comment or borrow the lines referring to your real NICs in the same file
add the following lines to your /etc/modprobe.d/arch/i386:
alias bond0 bonding
options bonding mode=1 miimon=100 downdelay=200 updelay=200
To use Bonding Ethernet for High-Availability (fail-over) on
Debian (Woody, Sarge,etch or Sid with a 2.4.x kernel) and ubuntu you need to:
install package ifenslave-2.6.To install this package follow this command
#apt-get install ifenslave-2.6
make sure the real NICs kernel modules are loaded automatically
edit /etc/network/interfaces to look like this:
iface bond0 inet static
address 10.31.1.5
netmask 255.255.255.0
network 10.31.1.0
gateway 10.31.1.254
up /sbin/ifenslave bond0 eth0
up /sbin/ifenslave bond0 eth1
comment or borrow the lines referring to your real NICs in the same file
add the following lines to your /etc/modprobe.d/arch/i386:
alias bond0 bonding
options bonding mode=1 miimon=100 downdelay=200 updelay=200
2008年1月15日 星期二
OpenGFS description
http://linux.softpedia.com/get/System/Filesystems/OpenGFS-1471.shtml
OpenGFS is a clustered filesystem. It's usefulness is thought to be mostly in SAN's, but goes well beyond that. It can be used with iSCSI, HyperSCSI, and even firewire.
OpenGFS is undergoing many changes at the moment, we appreciate any help in testing the current development branch. For those less adventurous souls we have our current stable branch (0.2.1).
Here are some key features of "OpenGFS":
Multiple clients per server
· We don't have to worry about two reads or writes overlapping on the server as the server opens the block file in syncronous mode, and network receives are keep apart with mutexes. Everything else must be handled by higherlevel layers, e.g. the OpenGFS filesystem.
Transparent reconnection.
· The loss of a server does not mean that programs using the device file immediatily get errors. Activity on the device pauses, and remains paused until gnbd gets reconnected to a server, and re-issuse any unfulfilled requests.
Other proccesses Suspending IO.
· Simply, some other process can come and state that the device should stop talking (or trying to talk) to the server. Think `Entering cluster tansition'
Notification of change of server.
· Just change the ip and port of where the device looks for a server.
Resumption of service.
· Connect to the server again, and re-issue any requests that haven't gotten replies yet.
Currently gnbd has a kernel thread and a TCP socket for each opened block device. If either of these fail, the device is still opened. This is to allow modification of some parameters via ioctl.
There is a short and simple userland program to set the ip and port. Done with those ioctls.
Server ip and port can also be specified at module load. This uses the config option durring insmod. More details in the main.c file.
OpenGFS is a clustered filesystem. It's usefulness is thought to be mostly in SAN's, but goes well beyond that. It can be used with iSCSI, HyperSCSI, and even firewire.
OpenGFS is undergoing many changes at the moment, we appreciate any help in testing the current development branch. For those less adventurous souls we have our current stable branch (0.2.1).
Here are some key features of "OpenGFS":
Multiple clients per server
· We don't have to worry about two reads or writes overlapping on the server as the server opens the block file in syncronous mode, and network receives are keep apart with mutexes. Everything else must be handled by higherlevel layers, e.g. the OpenGFS filesystem.
Transparent reconnection.
· The loss of a server does not mean that programs using the device file immediatily get errors. Activity on the device pauses, and remains paused until gnbd gets reconnected to a server, and re-issuse any unfulfilled requests.
Other proccesses Suspending IO.
· Simply, some other process can come and state that the device should stop talking (or trying to talk) to the server. Think `Entering cluster tansition'
Notification of change of server.
· Just change the ip and port of where the device looks for a server.
Resumption of service.
· Connect to the server again, and re-issue any requests that haven't gotten replies yet.
Currently gnbd has a kernel thread and a TCP socket for each opened block device. If either of these fail, the device is still opened. This is to allow modification of some parameters via ioctl.
There is a short and simple userland program to set the ip and port. Done with those ioctls.
Server ip and port can also be specified at module load. This uses the config option durring insmod. More details in the main.c file.
FreeBSD UFS/ZFS Snapshot
http://people.freebsd.org/~rse/snapshot/
Additionally, with the help of md(4) and mdconfig(8) you can mount UFS snapshots as read-only filesystems, too. For illustration purposes, look at this sample session where a snapshot of /var is created on UFS:
# echo "before" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /var/tmp/foo.txt
# test -d /var/.snap mkdir /var/.snap
# mount -u -o snapshot /var/.snap/test /var
# ls -l /var/.snap/test
-r-------- 1 root operator 2147483784 Sep 3 16:19 /var/.snap/test
# echo "after" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# mdconfig -a -t vnode -f /var/.snap/test -u 1
# mount -o ro /dev/md1 /mnt
# ls -l /mnt/tmp/foo.txt /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /mnt/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# cat /mnt/tmp/foo.txt /var/tmp/foo.txt
before
after
# umount /mnt
# mdconfig -d -u 1
# rm -f /var/.snap/test
The same session with /var on ZFS could look like this:
# echo "before" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /var/tmp/foo.txt
# zfs snapshot `zfs list -H -o name /var`@test
# ls -ld /var/.zfs/snapshot/test
drwxr-xr-x 23 root operator 23 Sep 3 16:19 /var/.zfs/snapshot/test
# echo "after" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# ls -l /var/.zfs/snapshot/test/tmp/foo.txt /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /mnt/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# cat /var/.zfs/snapshot/test/tmp/foo.txt /var/tmp/foo.txt
before
after
# zfs destroy `zfs list -H -o name /var`@test
Additionally, with the help of md(4) and mdconfig(8) you can mount UFS snapshots as read-only filesystems, too. For illustration purposes, look at this sample session where a snapshot of /var is created on UFS:
# echo "before" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /var/tmp/foo.txt
# test -d /var/.snap mkdir /var/.snap
# mount -u -o snapshot /var/.snap/test /var
# ls -l /var/.snap/test
-r-------- 1 root operator 2147483784 Sep 3 16:19 /var/.snap/test
# echo "after" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# mdconfig -a -t vnode -f /var/.snap/test -u 1
# mount -o ro /dev/md1 /mnt
# ls -l /mnt/tmp/foo.txt /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /mnt/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# cat /mnt/tmp/foo.txt /var/tmp/foo.txt
before
after
# umount /mnt
# mdconfig -d -u 1
# rm -f /var/.snap/test
The same session with /var on ZFS could look like this:
# echo "before" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /var/tmp/foo.txt
# zfs snapshot `zfs list -H -o name /var`@test
# ls -ld /var/.zfs/snapshot/test
drwxr-xr-x 23 root operator 23 Sep 3 16:19 /var/.zfs/snapshot/test
# echo "after" >/var/tmp/foo.txt
# ls -l /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# ls -l /var/.zfs/snapshot/test/tmp/foo.txt /var/tmp/foo.txt
-rw-r--r-- 1 root wheel 7 Sep 3 16:19 /mnt/tmp/foo.txt
-rw-r--r-- 1 root wheel 6 Sep 3 16:20 /var/tmp/foo.txt
# cat /var/.zfs/snapshot/test/tmp/foo.txt /var/tmp/foo.txt
before
after
# zfs destroy `zfs list -H -o name /var`@test
2008年1月14日 星期一
FREENAS 學習備忘
UnisonGUI for WindowsXP v. 0.2.1.26
http://www.freenaskb.info/kb/?View=entry&EntryID=211
freenas iscsi
http://www.freenaskb.info/kb/?View=entry&EntryID=204
FreeNAS Setup and User guide
http://www.freenas.org/index.php?option=com_openwiki&Itemid=30&id=sug:en#services
http://www.freenaskb.info/kb/?View=entry&EntryID=211
freenas iscsi
http://www.freenaskb.info/kb/?View=entry&EntryID=204
FreeNAS Setup and User guide
http://www.freenas.org/index.php?option=com_openwiki&Itemid=30&id=sug:en#services
訂閱:
文章 (Atom)