Patent ID: 7792882

Claim:
A method for priority-based allocation in a storage pool, comprising: receiving a first request to write a first data item in the storage pool, wherein the storage pool comprises a first hybrid drive comprising a first plurality of metaslabs associated with a first storage type and a second plurality of metaslabs associated with a second storage type, and wherein each of the first and second plurality of metaslabs comprises a contiguous region of data; selecting a first target metaslab from the first and second plurality of metaslabs based on a first plurality of allocation priorities, wherein the first plurality of allocation priorities are determined using a storage and power management policy, a storage characteristic, and a power characteristic associated with the first storage type and the second storage type in the first hybrid drive; allocating a first block to the first target metaslab; writing, after allocating, the first block to the first target metaslab, wherein the first block comprises a first portion of the first data item; powering up a second hybrid drive in the storage pool, wherein the second hybrid drive comprises a third plurality of metaslabs associated with a third storage type and a fourth plurality of metaslabs associated with a fourth storage type, wherein the fourth storage type of the second hybrid drive is initially powered down and is powered up after a threshold value of the third storage type is reached; assigning a second plurality of allocation priorities to each of the third and fourth plurality of metaslabs; adjusting the first plurality of allocation priorities based on storage and power characteristics of the third and fourth storage types of the second hybrid drive to obtain an adjusted first plurality of allocation priorities; selecting a second target metaslab from the first, second, and third, plurality of metaslabs by comparing the adjusted first and second plurality of allocation priorities; allocating a second block to the second target metaslab; and writing the second block to the second target metaslab, wherein the second block comprises a second portion of the first data item.