Создание большого диска на FreeBSD
LSI card:
gpart create -s GPT /dev/mfid0
gpart add -t freebsd-ufs /dev/mfid0
Форматировать UFS:
newfs /dev/mfid0p1
Можно отформатировать ZFS с точкой монтирования /base:
gpart modify -i 1 -t freebsd-zfs mfid0
zpool create base mfid0p1
Но можно в ЗФС загонять диск целиком, предварительно удалив все разделы.
Удалить раздел p1:
gpart delete -i 1 /dev/mfid0
gpart destroy /dev/mfid0
и после этого загнать диск в ZFS:
zpool create our_mount_point mfid0
3Ware card:
1) compile tws driver:
unzip them.
cd to fresly unpacked source code folder
Then copy the *.c and *.h files to /sys/dev/tws
Copy the Makefile to /sys/modules/tws
Build the tws.ko module:
cd /sys/modules/tws
make
The tws.ko module is created in /sys/modules/tws
2) Load driver:
kldload /sys/modules/tws/tws.ko
3) For autoload driver during system boot:
3a. copy tws.ko into the boot folder and add it to loader:
cp /sys/modules/tws/tws.ko /boot/kernel/tws.ko''
3b. add the line tws_load=“YES”
to the file /boot/loader.conf
echo 'tws_load="YES"' >> /boot/loader.conf
4) device /dev/tws0 does not works, so try to use da0 device instead:
gpart create -s GPT /dev/da0
gpart add -t freebsd-ufs /dev/da0
newfs /dev/da0p1
5) To install CLI management software, see page 37 of manual UsrGuide_Addendum_9750_10.1codeset.pdf:
a. download package (using lynx or links):
lynx http://www.lsi.ru.com/DistributionSystem/User/AssetMgr.aspx?asset=55136
b. unzip it
c. make file execuabe
Advanced ZFS tricks
RAIDZ и FreeNAS-9/FreeBSD
If we want to create raidz volume on freenas from disks of different sizes, we need to:
create any pool (or some of pools) with desired zraid name for one of them (for example, ZFS) of any type (for example, RAID0), containing all available drives using Volume manager (this will create default mount point for this pool, swap partitions on every disk, gpt partition map on every drive, and gpt partitions for use in raidz);
destroy this pool via command line using command
zpool destroy ZFS
the partitions /dev/gptid/69217d70-7632-11e3-b2c9-001517e60f0a and other in folder /dev/gptid will be automatically saved.
Create raidz (or raidz2) using the following command:
zpool create -f -m /mnt/ZFS ZFS raidz gptid/69217d70-7632-11e3-b2c9-001517e60f0a gptid/699bb0cc-7632-11e3-b2c9-001517e60f0a gptid/6a00ba6a-7632-11e3-b2c9-001517e60f0a
where:
-f - force flag, which is needed in case of our drives has different size;
-m /mnt/ZFS - is the mount point, which had been created on step 1;
ZFS - pool name;
raidz (or raidz2) - redundancy scheme for zpool;
gptid/UUID - gpt uuids for partitions created on step 1