Can't write to new logical volume created with --virtualsize

Bug #1067293 reported by Richard C
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

$ lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04
$ apt-cache policy lvm2
lvm2:
  Installed: (none)
  Candidate: 2.02.66-4ubuntu7.1
  Version table:
     2.02.66-4ubuntu7.1 0
        500 http://ftp.iinet.net.au/pub/ubuntu/ precise-updates/main amd64 Packages
     2.02.66-4ubuntu7 0
        500 http://ftp.iinet.net.au/pub/ubuntu/ precise/main amd64 Packages

The behaviour I see with --virtualsize (note) errors following mkfs. The same errors can be seen using cp, dd, or other programs that write to the new logical volume device.

someUser@vmhost02:~$ sudo lvcreate --virtualsize 10000m -L 4Mi -n ceph01-root vg-vmhost02
  Logical volume "ceph01-root" created
someUser@vmhost02:~$ sudo lvdisplay /dev/vg-vmhost02/ceph01-root
  --- Logical volume ---
  LV Name /dev/vg-vmhost02/ceph01-root
  VG Name vg-vmhost02
  LV UUID Or7wyp-ajck-POWF-d3ZR-fOY2-LLLP-jPe3zI
  LV Write Access read/write
  LV snapshot status active destination for /dev/vg-vmhost02/ceph01-root_vorigin
  LV Status available
  # open 0
  LV Size 9.77 GiB
  Current LE 2500
  COW-table size 4.00 MiB
  COW-table LE 1
  Allocated to snapshot 0.20%
  Snapshot chunk size 4.00 KiB
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:13

someUser@vmhost02:~$ sudo mkfs -t ext4 /dev/vg-vmhost02/ceph01-root
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
640848 inodes, 2560000 blocks
128000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2621440000
79 block groups
32768 blocks per group, 32768 fragments per group
8112 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

someUser@vmhost02:~$ sudo lvdisplay /dev/vg-vmhost02/ceph01-root
  /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error
  --- Logical volume ---
  LV Name /dev/vg-vmhost02/ceph01-root
  VG Name vg-vmhost02
  LV UUID Or7wyp-ajck-POWF-d3ZR-fOY2-LLLP-jPe3zI
  LV Write Access read/write
  LV snapshot status INACTIVE destination for /dev/vg-vmhost02/ceph01-root_vorigin
  LV Status available
  # open 0
  LV Size 9.77 GiB
  Current LE 2500
  COW-table size 4.00 MiB
  COW-table LE 1
  Snapshot chunk size 4.00 KiB
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:13

someUser@vmhost02:~$ sudo lvcreate --virtualsize 10000m -L 4Mi -n ceph01-root vg-vmhost02
  Logical volume "ceph01-root" created
someUser@vmhost02:~$ sudo lvdisplay /dev/vg-vmhost02/ceph01-root
  --- Logical volume ---
  LV Name /dev/vg-vmhost02/ceph01-root
  VG Name vg-vmhost02
  LV UUID Or7wyp-ajck-POWF-d3ZR-fOY2-LLLP-jPe3zI
  LV Write Access read/write
  LV snapshot status active destination for /dev/vg-vmhost02/ceph01-root_vorigin
  LV Status available
  # open 0
  LV Size 9.77 GiB
  Current LE 2500
  COW-table size 4.00 MiB
  COW-table LE 1
  Allocated to snapshot 0.20%
  Snapshot chunk size 4.00 KiB
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:13

someUser@vmhost02:~$ sudo mkfs -t ext4 /dev/vg-vmhost02/ceph01-root
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
640848 inodes, 2560000 blocks
128000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2621440000
79 block groups
32768 blocks per group, 32768 fragments per group
8112 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

someUser@vmhost02:~$ sudo lvdisplay /dev/vg-vmhost02/ceph01-root
  /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error
  --- Logical volume ---
  LV Name /dev/vg-vmhost02/ceph01-root
  VG Name vg-vmhost02
  LV UUID Or7wyp-ajck-POWF-d3ZR-fOY2-LLLP-jPe3zI
  LV Write Access read/write
  LV snapshot status INACTIVE destination for /dev/vg-vmhost02/ceph01-root_vorigin
  LV Status available
  # open 0
  LV Size 9.77 GiB
  Current LE 2500
  COW-table size 4.00 MiB
  COW-table LE 1
  Snapshot chunk size 4.00 KiB
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:13

someUser@vmhost02:~$ sudo lvremove /dev/vg-vmhost02/ceph01-root
  /dev/dm-13: read failed after 0 of 4096 at 0: Input/output error
Do you really want to remove active logical volume ceph01-root? [y/n]: y
  Logical volume "ceph01-root" successfully removed

The expected behaviour is shown below, with a logical volume, where the whole capacity is allocated at creation.

someUser@vmhost02:~$ sudo lvcreate -L 10000m -n ceph01-root vg-vmhost02
  Logical volume "ceph01-root" created
someUser@vmhost02:~$ sudo mkfs -t ext4 /dev/vg-vmhost02/ceph01-root
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
640848 inodes, 2560000 blocks
128000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2621440000
79 block groups
32768 blocks per group, 32768 fragments per group
8112 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

someUser@vmhost02:~$ sudo lvdisplay /dev/vg-vmhost02/ceph01-root
  --- Logical volume ---
  LV Name /dev/vg-vmhost02/ceph01-root
  VG Name vg-vmhost02
  LV UUID Uafjh9-PDHT-rTzq-bfmL-petB-RaNW-IqZkYm
  LV Write Access read/write
  LV Status available
  # open 0
  LV Size 9.77 GiB
  Current LE 2500
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:13

Tags: lts lvm precise
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lvm2 (Ubuntu):
status: New → Confirmed
Richard C (richard-c)
tags: added: precise
tags: added: lvm
Richard C (richard-c)
tags: added: lts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.