The lvm partiton size is not accurate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:~#


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

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux