All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [SPDK] lvol_store restored even if base raid not created for single-base raid
@ 2018-11-06  9:25 
  0 siblings, 0 replies; 3+ messages in thread
From:  @ 2018-11-06  9:25 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]


Hello 
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 raid which is in your case maps directly to the first sectors of lower level device, so it 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  examine 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 <wuzhouhui14(a)mails.ucas.ac.cn>:
>
>Hi,
>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?
>
>Thanks.
>_______________________________________________
>SPDK mailing list
>SPDK(a)lists.01.org
>https://lists.01.org/mailman/listinfo/spdk


-- 
Маров Алексей

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [SPDK] lvol_store restored even if base raid not created for single-base raid
@ 2019-09-28  2:06 wuzhouhui
  0 siblings, 0 replies; 3+ messages in thread
From: wuzhouhui @ 2019-09-28  2:06 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

Hi,
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?

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [SPDK] lvol_store restored even if base raid not created for single-base raid
@ 2018-11-06 11:50 Pelplinski, Piotr
  0 siblings, 0 replies; 3+ messages in thread
From: Pelplinski, Piotr @ 2018-11-06 11:50 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 3127 bytes --]

Hi,
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 bit:
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 this device
	#  2. Raid0 is created, examine_disk finds lvolstore on this device and claims Raid0
               #  3. Lvostore is loaded


-- 
Best Regards,
Piotr Pelpliński


> -----Original Message-----
> From: SPDK [mailto:spdk-bounces(a)lists.01.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
> 
> 
> Hello
> 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 raid
> which is in your case maps directly to the first sectors of lower level device, so it
> 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  examine
> 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
> <wuzhouhui14(a)mails.ucas.ac.cn>:
> >
> >Hi,
> >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?
> >
> >Thanks.
> >_______________________________________________
> >SPDK mailing list
> >SPDK(a)lists.01.org
> >https://lists.01.org/mailman/listinfo/spdk
> 
> 
> --
> Маров Алексей
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-28  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06  9:25 [SPDK] lvol_store restored even if base raid not created for single-base raid 
2018-11-06 11:50 Pelplinski, Piotr
2019-09-28  2:06 wuzhouhui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.