@skip_backend(
        unsupported={backends.GCE},
        reason="The GCE backend does not let you create two volumes with the "
               "same dataset id. When this test is run with GCE the test "
               "fails to create the extra volume, and we do not test the "
               "functionality this test was designed to test.")
    @require_cluster(2)
    def test_extra_volume(self, cluster):
        api = get_backend_api(cluster.cluster_uuid)

        # Create the dataset
        wait_for_dataset = create_dataset(self, cluster)

        created_volume = []

        # Create an extra volume claiming to belong to that dataset
        def create_extra(dataset):
            # Create a second volume for that dataset
            volume = api.create_volume(dataset.dataset_id,
                                       size=get_default_volume_size())
            created_volume.append(volume)
            return dataset

        wait_for_extra_volume = wait_for_dataset.addCallback(create_extra)

        # Once created, request to move the dataset to node2
        def move_dataset(dataset):
            dataset_moving = cluster.client.move_dataset(
                UUID(cluster.nodes[1].uuid), dataset.dataset_id)

            # Wait for the dataset to be moved; we expect the state to
            # match that of the originally created dataset in all ways
            # other than the location.
            moved_dataset = dataset.set(
                primary=UUID(cluster.nodes[1].uuid))
            dataset_moving.addCallback(
                lambda dataset: cluster.wait_for_dataset(moved_dataset))
            return dataset_moving
        wait_for_move = wait_for_extra_volume.addCallback(move_dataset)

        # Check that the extra volume isn't attached to a node.
        # This indicates that the originally created volume is attached.
        def check_attached(dataset):
            blockdevice_id = created_volume[0].blockdevice_id
            [volume] = [volume for volume in api.list_volumes()
                        if volume.blockdevice_id == blockdevice_id]

            self.assertEqual(volume.attached_to, None)

        return wait_for_move.addCallback(check_attached)

        return wait_for_dataset
If an extra volume is created for a dataset, that volume isn't used.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/acceptance/endtoend/test_dataset.py/DatasetAPITests.test_extra_volume