Choosing Drives to Pool
Check installed drives by running:
sudo fdisk -l
Carefully note down the device names of drives you want to pool.
These are the two drives we’re going to pool:
Creating a Pool
There are two types of simple storage pools we can create. A
striped pool , also called RAID-0 , in which the data is stored in “stripes” across all drives, or a
mirrored pool , also called RAID-1 , in which a complete copy of all data is stored separately on each drive. Striped pools are not fault tolerant whereas mirrored pools can survive the failure of one drive. Striped pools have twice the storage capacity of mirrored pools and have better performance than mirrored pools.
To create a striped pool, we run:
sudo zpool create new-pool /dev/sdb /dev/sdc
To create a mirrored pool, we run:
sudo zpool create new-pool mirror /dev/sdb /dev/sdc
In both examples,
new-pool is the name of the pool.
Sometimes an error like this might pop up:
-f” to the end of the
zpool create command to override it.
mirrored pool is usually recommended as we’d still be able to access our data if a single drive fails. However, this means that we’ll only get the capacity of a single drive. A
striped pool, while giving us the combined storage of all drives, is rarely recommended as we’ll lose all our data if a drive fails. You can also opt for both, or change the designation at a later date if you add more drives to the pool.
The newly created pool is mounted at
/new-pool. You can select a different mount point using the
sudo zpool create -m /usr/share/pool new-pool mirror /dev/sdb /dev/sdc
The newly mounted pool will appear to Ubuntu as any other part of the filesystem.