linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Yu, Mingli" <Mingli.Yu@windriver.com>
To: "linux-lvm@redhat.com" <linux-lvm@redhat.com>
Subject: [linux-lvm] The lvm partiton size is not accurate
Date: Wed, 18 May 2022 10:35:57 +0000	[thread overview]
Message-ID: <CO1PR11MB5009B1F51212981FB8292E99F1D19@CO1PR11MB5009.namprd11.prod.outlook.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3141 bytes --]

Hi Experts,

When use lvcreate to claim 72M partition, but it turns out to be 69M, more details as below, any hints?


root@intel-x86-64:~# tmp_dir=`mktemp -d /tmp/XXXXXX`
root@intel-x86-64:~# dd if=/dev/zero of=${tmp_dir}/p0 bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 2.75714 s, 38.0 MB/s
root@intel-x86-64:~# losetup /dev/loop0 ${tmp_dir}/p0
loop0: detected capacity change from 0 to 204800
root@intel-x86-64:~# vgcreate vg_test1 /dev/loop0
  Physical volume "/dev/loop0" successfully created.
  Volume group "vg_test1" successfully created
root@intel-x86-64:~# lvcreate -L 72 -n lv_test1 vg_test1
blk_update_request: operation not supported error, dev loop0, sector 2048 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 00
  Logical volume "lv_test1" created.
root@intel-x86-64:~# lvscan
  ACTIVE            '/dev/vg_test1/lv_test1' [72.00 MiB] inherit
root@intel-x86-64:~# mke2fs -I 128 /dev/vg_test1/lv_test1
mke2fs 1.46.5 (30-Dec-2021)
128-byte inodes cannot handle dates beyond 2038 and are deprecated
Discarding device blocks: done
Creating filesystem with 73728 1k blocks and 18432 inodes
Filesystem UUID: 0308c2e2-6f97-4472-9fb9-0d20ae0851b6
Superblock backups stored on blocks:
8193, 24577, 40961, 57345

Allocating group tables: done
blk_update_request: operation not supported error, dev loop0, sector 149376 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg0
Writing inode tables: blk_update_request: operation not supported error, dev loop0, sector 2570 op 0x9:(WRITE_ZEROES) fla0
blk_update_request: operation not supported error, dev loop0, sector 18954 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0
blk_update_request: operation not supported error, dev loop0, sector 34822 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0
blk_update_request: operation not supported error, dev loop0, sector 51722 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0
blk_update_request: operation not supported error, dev loop0, sector 67590 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0
blk_update_request: operation not supported error, dev loop0, sector 84490 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg 0
blk_update_request: operation not supported error, dev loop0, sector 100358 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg0
blk_update_request: operation not supported error, dev loop0, sector 117258 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg0
blk_update_request: operation not supported error, dev loop0, sector 133126 op 0x9:(WRITE_ZEROES) flags 0x800800 phys_seg0
done
Writing superblocks and filesystem accounting information: done

root@intel-x86-64:~# mkdir -p ${tmp_dir}/lv1
root@intel-x86-64:~# mount /dev/vg_test1/lv_test1 ${tmp_dir}/lv1
EXT4-fs (dm-0): mounting ext2 file system using the ext4 subsystem
EXT4-fs (dm-0): mounted filesystem without journal. Opts: (null). Quota mode: none.
ext2 filesystem being mounted at /tmp/inBS27/lv1 supports timestamps until 2038 (0x7fffffff)
root@intel-x86-64:~# df -h | grep ${tmp_dir}/lv1
/dev/mapper/vg_test1-lv_test1   69M   14K   65M   1% /tmp/inBS27/lv1
root@intel-x86-64:~#



[-- Attachment #1.2: Type: text/html, Size: 5365 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

             reply	other threads:[~2022-05-20  7:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 10:35 Yu, Mingli [this message]
2022-05-20 15:16 ` [linux-lvm] The lvm partiton size is not accurate Zdenek Kabelac

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=CO1PR11MB5009B1F51212981FB8292E99F1D19@CO1PR11MB5009.namprd11.prod.outlook.com \
    --to=mingli.yu@windriver.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).