From: "Pelplinski, Piotr" <piotr.pelplinski(a)intel.com>
Sent Time: 2018-11-06 19:50:48 (Tuesday)
To: "Storage Performance Development Kit" <spdk(a)lists.01.org>
Subject: [CASS SPAM]Re: [SPDK] lvol_store restored even if base raid not created for
There are two types of examine callback in spdk.
- *examine_config* has priority and claims devices based on spdk configuration.
- *examine_disk* is called only if device is not claimed by examine_config and analyzes
data on disk.
Let's add one step in scenario you are describing:
0. construct_nvme_bdev -b Nvme0
1. construct_raid_bdev -n Raid0 -b Nvme0
2. construct_lvol_store Raid0
3. restart spdk app
It is possible to restore same configuration, but we need to shuffle those steps a little
4. construct_raid_bdev -n Raid0 -b Nvme0
# Although Nvme0 is not yet present, but configuration about Raid0 is already in SPDK
and will loaded when all base devices are present.
5. construct_nvme_bdev -b Nvme0
# 1. Nvme0 is created, examine_config is called on this bdev and raid module claims
# 2. Raid0 is created, examine_disk finds lvolstore on this device and claims Raid0
# 3. Lvostore is loaded
> -----Original Message-----
> From: SPDK [mailto:firstname.lastname@example.org] On Behalf Of ????? ???????
> Sent: Tuesday, November 6, 2018 10:25 AM
> To: Storage Performance Development Kit <spdk(a)lists.01.org>
> Subject: Re: [SPDK] lvol_store restored even if base raid not created for single-
> base raid
> I think this is due to the fact that raid bdev in spdk currently do not have
> persistent metadata. There is a trello ticket for that though. Since there are no
> raid md, lvol just store it's md in the very first sectors (32kb, not sure) of
> which is in your case maps directly to the first sectors of lower level device, so
> could read it even if there is no raid below.
> > What I want is the
> > lvol_store will not restored untill base bdev (raid_bdev, in this
> > example) is constructed. Is it possible?
> I don't think it is possible without raid persistent md. Basically because
> callback happens automatically when spdk goes through bdev initialization. And
> in examine callback of lvol it always read md from device (an find it there).
> Best regards
> Aleksei Marov
> >Вторник, 6 ноября 2018, 10:17 +03:00 от wuzhouhui
> >Assume that:
> > 1. construct raid_bdev on a single nvme_bdev
> > 2. construct lvol_store on the raid_bdev
> > 3. restart spdk app
> >After spdk app started and nvme_bdev constructed, the lvol_store will
> >restored even if raid_bdev not constructed. In other words, the
> >single-base raid_bdev just like a passthru_bdev. What I want is the
> >lvol_store will not restored untill base bdev (raid_bdev, in this
> >example) is constructed. Is it possible?
> >SPDK mailing list
> Маров Алексей
> SPDK mailing list
SPDK mailing list