From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0050714297410692094==" MIME-Version: 1.0 From: Harris, James R Subject: Re: [SPDK] The size of lvol_bdev is smaller than expected Date: Fri, 27 Jul 2018 16:10:32 +0000 Message-ID: In-Reply-To: 3c4bbefe.36e6a.164db3174a6.Coremail.wuzhouhui14@mails.ucas.ac.cn List-ID: To: spdk@lists.01.org --===============0050714297410692094== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Zhouhui, Yes =E2=80=93 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" 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. = > -----=E5=8E=9F=E5=A7=8B=E9=82=AE=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: "Liu, Changpeng" > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2018-07-27 16:57:47 (=E6=98=9F= =E6=9C=9F=E4=BA=94) > =E6=94=B6=E4=BB=B6=E4=BA=BA: "Storage Performance Development Kit" > =E6=8A=84=E9=80=81: = > =E4=B8=BB=E9=A2=98: 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 P45= 00. > = > { > "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 wuzhou= hui > > 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 = --===============0050714297410692094==--