2009年3月26日星期四

openfiler的安装

想知道openfiler是什么,请Google。

之前在一台DELL PowerEdge 2950上安装了openfiler做实验,只尝试了基本的安装,没有深入研究配置。这台机器的磁盘配置是2个500G的SAS,可配置成RAID0或者RAID1。

近日,在一台新的2950上安装openfiler,想作为实际应用。用openfiler 2.3启动机器,在复制文件之前都没有问题,安装系统正确地识别出了硬盘。但是在复制文件时出错,居然是“out of disk space”。天哪,那个服务器可是6个750G的SAS硬盘。

在安装过程中发现,系统发现的虚拟驱动器不是通常我认为的1个(因为是做RAID5,我以为是把6个硬盘都弄到一个虚拟驱动器了),进入PERC 6/i的配置程序删除两个虚拟驱动器,并新建一个虚拟驱动器,将所有的磁盘加入。

开始安装系统,使用自动分区,/boot和swap使用默认大小,/在自动分区后改成4096MB足够了。(一定要改,剩下的空间不要分配,在安装完openfiler之后用于添加volume) 系统安装正常,重启后,从浏览器进入 https://IP:446,默认用户名openfiler,密码password。接下来在Volumes标签页中选择Block Devices,将剩余未分配的空间生成Physical Volume。发现无论如何,剩下的3.4TB的空间都无法分配,最多只能创建1.4TB的Volume。

在openfiler社区中找到这篇文章(https://forums.openfiler.com/viewtopic.php?id=3169):

The short of it:
MSDOS - Bootable, must be less than 2TB
GPT - Not bootable, support for > 2TB
The longer explanation and what to do about it:
What this means is that if you've got a single volume on your system that is > 2TB, or you plan to later expand your array past 2TB, then you cannot boot from it.  The solution is to open up your RAID controller BIOS and do one of the following:
1. If your controller does not have an "OS Volume" option and does not support multiple arrays across a given disk: a. boot from something else and use all your drives for data storage, or b. pick two drives and stick them in RAID 1 for your OS and then take the rest of your drives and put them in a RAID level of your choice for your data.
2. If your controller supports an "OS Volume" (I know 3Ware has this, others probably do as well): Create a single array of all your disks and then specify an "OS Volume" of 4-8GB.
3. If your controller does not support an "OS Volume" but can create multiple arrays on a set of disks: Create a small RAID 1 array of 4-8GB across ALL your disks for the OS and then use the remainder of the space in a RAID level of your choice for your data volumes.
The end result should be that you've got a small volume (probably /dev/sda) for your OS and then a large volume (probably /dev/sdb) for your data.
When installing, allow the installer to initialize the OS volume (/dev/sda) but NOT the data volume (/dev/sdb).  If you allow the initialization of the data volume then it will receive an MSDOS table and will act oddly when trying to create a > 2TB PV on it later (this can be fixed if you've already passed this point, though it will require the wipe of your data volume).

于是,再次进入PERC 6/i的配置程序重新创建虚拟驱动器,其中一个虚拟驱动器使用所有磁盘,RAID5,大小设置为6GB;另一个虚拟驱动器也使用所有磁盘,RAID5,使用所有剩余空间。重新安装系统,将系统安装在/dev/sda上。重新启动系统。

参照文章(https://forums.openfiler.com/viewtopic.php?id=3174),SSH登录到openfiler机器:

fdisk does not work with gpt partition tables (use parted) and I've got no idea why you're trying to create a file system directly on the disk (OpenFiler uses LVM).
1. Type "parted /dev/sdb" (assuming your raid volume is sdb)
2. Type "print"
3. If the output says "Disk label type: msdos" then type "mklabel gpt"
4. Type "quit"
From there you should be able to create a PV in the web interface to use the entire volume.

参照上面的4步完成GPT。

使用浏览器登录进入openfiler管理界面,这时可以在Volumes标签页中将所有的剩余空间创建为一个Physical Volume。 之后,再添加Volume Group。然后在Physical Volume中为特定的用途添加不同类型的Volume。

没有评论:

发表评论