Создание большого диска на FreeBSD

Остальное взято тут: http://citkit.ru/articles/464/

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:

  1. Download source code (codeset image or zip file from LSI), for example for 3Ware 9750 series ftp://tsupport:tsupport@ftp0.lsil.com/private/3Ware/kbarticledrivers/FreeBSD-8.1_drivers_and_source_9750_10.2codeset.zip
  2. unzip them.
  3. untar source (tws.tgz) according http://md-storage-data.com/DistributionSystem/User/AssetMgr.aspx?asset=54478 (file UsrGuide_Addendum_9750_10.1codeset.pdf)
  4. cd to fresly unpacked source code folder
  5. Then copy the *.c and *.h files to /sys/dev/tws
  6. Copy the Makefile to /sys/modules/tws
  7. Build the tws.ko module:
cd /sys/modules/tws

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


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


    • -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

volumes/bsd_huge_vol.txt · Last modified: 2014/10/07 21:40 by rybario
About this template
CC Attribution-Share Alike 4.0 International
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5