Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

13.3. Creating a Storage Pool

13.3.1. Mirrored Pool

# zpool create tank mirror c0t0d0 c0t0d1
freebsd# zpool create tank mirror ad1 ad3
freebsd# zpool status tank
  pool: tank
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            ad1     ONLINE       0     0     0
            ad3     ONLINE       0     0     0

errors: No known data errors

			

13.3.2. RAID-Z Pool

freebsd# zpool create zfs raidz ad1 ad3
freebsd# zpool status zfs
  pool: zfs
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        zfs         ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            ad1     ONLINE       0     0     0
            ad3     ONLINE       0     0     0

errors: No known data errors
			

13.3.3. Querying Pool Status

You can see that your pool was successfully created by using the zpool list command:

freebsd# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
zfs   3.97G   234K  3.97G     0%  ONLINE  -
			

13.3.4. Destroying Pools

Pools are destroyed by using the zpool destroy command. This command destroys the pool even if it contains mounted datasets.

# zpool destroy tank
			

Destroying a Pool With Faulted Devices

# zpool destroy tank
cannot destroy 'tank': pool is faulted
use '-f' to force destruction anyway
# zpool destroy -f tank