From: Bhasker C V <bhasker@unixindia.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Lvm think provisioning query
Date: Wed, 27 Apr 2016 14:33:05 +0200 [thread overview]
Message-ID: <CAPLCSGBydm62eZuqACSfuX9Y7cHPC-GbnHzTRLBsp1hFHvRLbw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3038 bytes --]
Hi,
I am starting with investigating about the lvm thin provisioning
(repeat post from
https://lists.debian.org/debian-user/2016/04/msg00852.html )
(apologies for html mail)
I have done the following
1.Create a PV
vdb 252:16 0 10G 0 disk
├─vdb1 252:17 0 100M 0 part
└─vdb2 252:18 0 9.9G 0 part
root@vmm-deb:~# pvcreate /dev/vdb1
Physical volume "/dev/vdb1" successfully created.
root@vmm-deb:~# pvs
PV VG Fmt Attr PSize PFree
/dev/vdb1 lvm2 --- 100.00m 100.00m
2. create a VG
root@vmm-deb:~# vgcreate virtp /dev/vdb1
Volume group "virtp" successfully created
root@vmm-deb:~# vgs
VG #PV #LV #SN Attr VSize VFree
virtp 1 0 0 wz--n- 96.00m 96.00m
3. create a lv pool and a over-provisioned volume inside it
root@vmm-deb:~# lvcreate -n virtpool -T virtp/virtpool -L40M
Logical volume "virtpool" created.
root@vmm-deb:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log
Cpy%Sync Convert
virtpool virtp twi-a-tz-- 40.00m 0.00 0.88
root@vmm-deb:~# lvcreate -V1G -T virtp/virtpool -n vol01
WARNING: Sum of all thin volume sizes (1.00 GiB) exceeds the size of thin
pool virtp/virtpool and the size of whole volume group (96.00 MiB)!
For thin pool auto extension activation/thin_pool_autoextend_threshold
should be below 100.
Logical volume "vol01" created.
root@vmm-deb:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log
Cpy%Sync Convert
virtpool virtp twi-aotz-- 40.00m 0.00 0.98
vol01 virtp Vwi-a-tz-- 1.00g virtpool 0.00
---------- Now the operations
# dd if=/dev/urandom of=./fil status=progress
90532864 bytes (91 MB, 86 MiB) copied, 6.00005 s, 15.1 MB/s^C
188706+0 records in
188705+0 records out
96616960 bytes (97 MB, 92 MiB) copied, 6.42704 s, 15.0 MB/s
# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/virtp-vol01 976M 95M 815M 11% /tmp/x
# sync
# cd ..
root@vmm-deb:/tmp# umount x
root@vmm-deb:/tmp# fsck.ext4 -f -C0 /dev/virtp/vol01
e2fsck 1.43-WIP (15-Mar-2016)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/virtp/vol01: 12/65536 files (8.3% non-contiguous), 36544/262144 blocks
<mount>
# du -hs fil
93M fil
# dd if=./fil of=/dev/null status=progress
188705+0 records in
188705+0 records out
96616960 bytes (97 MB, 92 MiB) copied, 0.149194 s, 648 MB/s
# vgs
VG #PV #LV #SN Attr VSize VFree
virtp 1 2 0 wz--n- 96.00m 48.00m
Definetly the file is occupying 90+MB.
What i expect is that the pool is 40M and the file must NOT exceed 40M.
Where does the file get 93M space ?
I know the VG is 96M but the pool created was max 40M (also VG still says
48M free). Is the file exceeding the boundaries ?
or am I doing anything wrong ?
[-- Attachment #2: Type: text/html, Size: 3705 bytes --]
next reply other threads:[~2016-04-27 12:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 12:33 Bhasker C V [this message]
2016-04-27 14:33 ` [linux-lvm] Lvm think provisioning query Zdenek Kabelac
2016-04-28 14:36 ` Bhasker C V
2016-04-29 8:13 ` Zdenek Kabelac
2016-05-03 6:59 ` Bhasker C V
2016-05-03 9:54 ` Zdenek Kabelac
2016-05-03 12:21 ` Bhasker C V
2016-05-03 14:49 ` Zdenek Kabelac
2016-05-03 15:51 ` Xen
2016-05-03 16:27 ` Zdenek Kabelac
2016-05-03 17:07 ` Gionatan Danti
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=CAPLCSGBydm62eZuqACSfuX9Y7cHPC-GbnHzTRLBsp1hFHvRLbw@mail.gmail.com \
--to=bhasker@unixindia.com \
--cc=linux-lvm@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).