-
Notifications
You must be signed in to change notification settings - Fork 11
Activate and Deactivate
An mpool is activated at the time it is created, which is to say that it is made online and accessible by a client application. However, there are times when it may be necessary or desirable to deactivate an mpool, rendering it offline.
For example, an mpool must be deactivated to grow a volume used for one of its media classes. Deactivating an mpool frees up any kernel resources it consumes, so it may be desirable to deactivate mpools that are not in use.
The following examples demonstrate deactivating and then activating mpools. These examples continue working with the mpools created in prior examples.
The mpool deactivate
command deactivates a specified mpool.
$ sudo mpool deactivate mp2
$ sudo mpool list
MPOOL TOTAL USED AVAIL CAPACITY LABEL HEALTH
mp1 1.00t 1.16g 972g 0.12% raw optimal
mp2 0.00 0.00 0.00 0.00% - offline
The mpool scan
command optionally deactivates all mpools.
$ sudo mpool scan --deactivate
$ sudo mpool list
MPOOL TOTAL USED AVAIL CAPACITY LABEL HEALTH
mp2 0.00 0.00 0.00 0.00% - offline
mp1 0.00 0.00 0.00 0.00% - offline
No detailed information is available for deactivated mpools.
The mpool activate
command activates a specified mpool, rendering it
online and accessible by a client application.
$ sudo mpool activate mp1
$ sudo mpool list
MPOOL TOTAL USED AVAIL CAPACITY LABEL HEALTH
mp1 1.00t 1.16g 972g 0.12% raw optimal
mp2 0.00 0.00 0.00 0.00% - offline
Detailed information is again available for mpool mp1
now that it
is activated.
The mpool scan
command optionally activates all mpools.
$ sudo mpool scan --activate
$ sudo mpool list
MPOOL TOTAL USED AVAIL CAPACITY LABEL HEALTH
mp1 1.00t 1.16g 972g 0.12% raw optimal
mp2 1.20t 632m 1.13t 0.05% raw optimal
When mpool is installed on a system, a systemd
mpool.service
unit
file is installed which executes mpool scan --activate
at boot.
Get Started
Configure mpools
Get Help
Develop mpool Applications
Explore mpool Internals