Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: Harris, James R <james.r.harris at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] The size of lvol_bdev is smaller than expected
Date: Fri, 27 Jul 2018 16:10:32 +0000	[thread overview]
Message-ID: <D3BACCDB-616F-45DD-9D6E-B4DA7715EE5F@intel.com> (raw)
In-Reply-To: 3c4bbefe.36e6a.164db3174a6.Coremail.wuzhouhui14@mails.ucas.ac.cn

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

Hi Zhouhui,

Yes – this issue existed on v18.04 but has been fixed on master and the fixes will be in the upcoming v18.07 release.

-Jim


On 7/27/18, 3:03 AM, "SPDK on behalf of wuzhouhui" <spdk-bounces(a)lists.01.org on behalf of wuzhouhui14(a)mails.ucas.ac.cn> wrote:

    Fine, I tried latest SPDK in branch master and the issue don't occured.
    Maybe you can reproduce this issue in v18.04.1
    
    Thanks.
    
    > -----原始邮件-----
    > 发件人: "Liu, Changpeng" <changpeng.liu(a)intel.com>
    > 发送时间: 2018-07-27 16:57:47 (星期五)
    > 收件人: "Storage Performance Development Kit" <spdk(a)lists.01.org>
    > 抄送: 
    > 主题: Re: [SPDK] The size of lvol_bdev is smaller than expected
    > 
    > Hi Zhouhui,
    > 
    > I tried your parameters and the code looks good to me.
    > 
    > Please see attached results from my test server. I also used 4TiB P4500.
    > 
    >   {
    >     "num_blocks": 975799296,
    >     "uuid": "fa72086a-8f74-45f1-ab0d-8a4d805ba0ea",
    >     "aliases": [
    >       "lvs_0/lbd_0"
    >     ],
    >     "claimed": false,
    >     "driver_specific": {
    >       "lvol": {
    >         "base_bdev": "Nvme0n1",
    >         "clone": false,
    >         "snapshot": false,
    >         "lvol_store_uuid": "37c1d411-a1f0-4483-b14d-a7bdea264a28",
    >         "thin_provision": false
    >       }
    >     },
    >     "supported_io_types": {
    >       "reset": true,
    >       "nvme_admin": false,
    >       "unmap": true,
    >       "read": true,
    >       "write_zeroes": true,
    >       "write": true,
    >       "flush": false,
    >       "nvme_io": false
    >     },
    >     "qos_ios_per_sec": 0,
    >     "block_size": 4096,
    >     "product_name": "Logical Volume",
    >     "name": "fa72086a-8f74-45f1-ab0d-8a4d805ba0ea"
    > }
    > 
    > > -----Original Message-----
    > > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of wuzhouhui
    > > Sent: Friday, July 27, 2018 4:07 PM
    > > To: spdk(a)lists.01.org
    > > Subject: [SPDK] The size of lvol_bdev is smaller than expected
    > > 
    > > I using all clusters of lvol_store to create a single lvol_bdev,
    > > but the size is smaller than expected. The expected size should
    > > be 3.7 TB, but 1.7 TB in reality. Following is my procedure:
    > > 1. Start vhost app:
    > >     ./app/vhost -m 0x3 -S /var/tmp
    > > 2. Create nvme_bdev:
    > >     ./rpc.py construct_nvme_bdev -b nvme0 -t pcie -a "0000:31:00.0"
    > > The 0000:31:00.0 is the Intel SSD DC P4500, 3.7 TB in total.
    > > 3. Create lvol_store:
    > >     ./rpc.py construct_lvol_store nvme0n1 lvs0
    > > After created, the total free cluster is 952929:
    > >     ./rpc.py get_lvol_stores
    > > [
    > >   {
    > >     "uuid": "88d3072e-a0e6-4020-9bdd-cd0fd300ec23",
    > >     "base_bdev": "nvme0n1",
    > >     "free_clusters": 952929,
    > >     "cluster_size": 4194304,
    > >     "total_data_clusters": 952929,
    > >     "block_size": 4096,
    > >     "name": "lvs0"
    > >   }
    > > ]
    > > 4. I use all free clusters of lvs0 to create a single lvol_bdev:
    > >     ./rpc.py construct_lvol_bdev -l lvs0 lv0 3811716
    > > The value "3811716" is comming from "952929 * 4"
    > > 5. Check the size of lvs0/lv0:
    > >     ./rpc.py get_bdevs
    > > Accoring to the lvs0/lv0's "num_blocks" and "block_size", the size of
    > > lvs0/lv0 is 1.7 TB, not 3.7 TB.
    > > 6. After I delete lvs0/lv0:
    > >     ./rpc.py destroy_lvol_bdev lvs0/lv0
    > > There is still some clusters not freed, but there is no other lvol_bdevs
    > > exists:
    > >     ./rpc.py get_lvol_stores
    > > [
    > >   {
    > >     "uuid": "88d3072e-a0e6-4020-9bdd-cd0fd300ec23",
    > >     "base_bdev": "nvme0n1",
    > >     "free_clusters": 428641,
    > >     "cluster_size": 4194304,
    > >     "total_data_clusters": 952929,
    > >     "block_size": 4096,
    > >     "name": "lvs0"
    > >   }
    > > ]
    > > 
    > > SPDK version: 18.04.1
    > > OS: CentSO 7.4
    > > SSD: Intel SSD DC P4500
    > > 
    > > Is this a bug?
    > > _______________________________________________
    > > 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
    _______________________________________________
    SPDK mailing list
    SPDK(a)lists.01.org
    https://lists.01.org/mailman/listinfo/spdk
    


             reply	other threads:[~2018-07-27 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 16:10 Harris, James R [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-09-28  2:06 [SPDK] The size of lvol_bdev is smaller than expected wuzhouhui
2019-09-28  2:06 wuzhouhui
2018-07-27  8:57 Liu, Changpeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D3BACCDB-616F-45DD-9D6E-B4DA7715EE5F@intel.com \
    --to=spdk@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox