ファイルサーバのHDDが死にかけたので再セットアップ。
lvmでパーティションきりきり。
で、ファイルシステム作成。
# mkfs.ext3 /dev/fileserver/fssystem # mkswap /dev/fileserver/fsswap # mkfs.ext4 /dev/fileserver/file
ベースシステムのセットアップ。
# mount /dev/fileserver/fssystem /mnt/temp # debootstrap --arch=amd64 lenny /mnt/temp http://ftp.jp.debian.org/debian
いろいろと書き換え
fstabの設定 # cd temp # vi etc/fstab # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/xvda1 none swap sw 0 0 /dev/xvda2 / ext3 errors=remount-ro 0 1 /dev/xvda3 /fileserver ext4 defaults 0 0 ホスト名の設定 # vi etc/hostname files hostsの設定 # vi etc/hosts 127.0.0.1 localhost 192.168.1.x files.waterblue.net files nicの設定 # vi etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.x network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 ネームサーバの設定 # vi etc/resolv.conf nameserver 192.168.1.x aptの設定 # vi etc/apt/sources.list deb http://security.debian.org/ lenny/updates main contrib non-free deb http://ftp.jp.debian.org/debian lenny main contrib non-free シリアルコンソールの設定 hvc0を使うようにしてttyは起動しない # vi etc/inittab 1:2345:respawn:/sbin/getty 38400 hvc0 #1:2345:respawn:/sbin/getty 38400 tty1 #2:23:respawn:/sbin/getty 38400 tty2 #3:23:respawn:/sbin/getty 38400 tty3 #4:23:respawn:/sbin/getty 38400 tty4 #5:23:respawn:/sbin/getty 38400 tty5 #6:23:respawn:/sbin/getty 38400 tty6 # vi etc/securetty hvc0 hvc0の作成 # cd dev # mknod hvc0 c 229 0
xenのDomU用設定ファイルを作る。
# # Configuration file for the Xen instance file, created # by xen-tools 3.9 on Sun Oct 11 14:47:01 2009. # # # Kernel + memory size # kernel = '/boot/vmlinuz-2.6.32-5-xen-amd64' ramdisk = '/boot/initrd.img-2.6.32-2-xen-amd64' memory = '512' # # Disk device(s). # root = '/dev/xvda2 ro' disk = [ 'phy:/dev/fileserver/fsswap,xvda1,w', 'phy:/dev/fileserver/fssystem,xvda2,w', 'phy:/dev/fileserver/file,xvda3,w', ] # # Hostname # name = 'file' # # Networking # vif = [ 'ip=192.168.1.x,mac=xx:xx:xx:xx:xx:xx' ] # # Behaviour # on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart'
あとは/mnt/tempをアンマウントしてxm create file -cで起動してコンソールログインしてお好きに。
ちなみに、ext4ファイルシステムはカーネル2.6.26だと
# tune2fs -E test_fs /dev/fileserver/file
やってからext4devじゃないとマウントできなかった。
2.6.32だとext4じゃないとマウントできなかった。
NICはIntelのものを使っており、Intelのギガビットイーサネットコントローラなんだからジャンボフレーム対応しているだろうと思って調べてみた。
Jumbo Frames
------------
The driver supports Jumbo Frames for all adapters except 82542-based
adapters. Jumbo Frames support is enabled by changing the MTU to a value
larger than the default of 1500. Use the ifconfig command to increase the
MTU size. For example:
ifconfig ethx mtu 9000 up
The maximum MTU setting for Jumbo Frames is 16110. This value coincides
with the maximum Jumbo Frames size of 16128.
NOTE: For native VLANs with Jumbo Frames, you must set the MTU before
adding the VLANID. Setting Jumbo Frames (MTU > 1500) on an adapter
already configured for VLANs will halt all traffic on that adapter.
ということで対応しているらしい。
で、ひかりoneで貸し出されているルータがAterm BL190HWってやつで、こっちは9KBまでのジャンボフレームに対応しているらしい。
ということで設定。
まず、ルータにブラウザでアクセス。
人によって違うだろうけどまあたしかデフォルトは192.168.0.1だったような。
でまあログインして、詳細設定>その他の設定から、ジャンボフレーム透過機能にチェックいれて保存。
これでルータ側はOK。
次はNICの設定。
# ifconfig eth0 mtu 9000
とりあえずこれで通常に接続できることを確認して
# vi /etc/network/interfaces
mtuの値を書き換えauto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
mtu 9000みたいな。
linuxのジャンボフレームの設定簡単ですね。
Windowsの場合はデバイスマネージャで使っているNIC選択して、ジャンボフレームのオプションを有効にすればいい。
場合によっては設定できなかったりするがその辺はNICとドライバ次第。

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 