วันอาทิตย์ที่ 15 มิถุนายน พ.ศ. 2551

FreeBSD Config Raid 0

Creating a stripe of unformatted ATA disks

  1. Load the geom_stripe module:

    # kldload geom_stripe 
  2. Ensure that a suitable mount point exists. If this volume will become a root partition, then temporarily use another mount point such as /mnt:

    # mkdir /mnt 
  3. Determine the device names for the disks which will be striped, and create the new stripe device. For example, to stripe two unused and unpartitioned ATA disks, for example /dev/ad2 and /dev/ad3:

    dmesg | grep -e "ad[0-9]:"
    # gstripe label -v st0 /dev/ad0x /dev/ad0x
  4. Write a standard label, also known as a partition table, on the new volume and install the default bootstrap code:

    # bsdlabel -wB /dev/stripe/st0 
  5. This process should have created two other devices in the /dev/stripe directory in addition to the st0 device. Those include st0a and st0c. At this point a file system may be created on the st0a device with the newfs utility:

    # newfs -U /dev/stripe/st0a 

    Many numbers will glide across the screen, and after a few seconds, the process will be complete. The volume has been created and is ready to be mounted.

To manually mount the created disk stripe:

# mount /dev/stripe/st0a /mnt 

To mount this striped file system automatically during the boot process, place the volume information in /etc/fstab file:

# echo "/dev/stripe/st0a /mnt ufs rw 2 2" \
>> /etc/fstab

The geom_stripe module must also be automatically loaded during system initialization, by adding a line to /boot/loader.conf:

# echo 'geom_stripe_load="YES"' >> /boot/loader.conf

from: http://www.freebsdwiki.net/index.php/RAID0,_Software,_How_to_setup

ไม่มีความคิดเห็น: