http://pastebin.com/raw/YPGG6usG is the reproduction script.
In virtualbox it actually passes. Maybe this really is a problem with
the disk driver for vmware?
** Description changed:
I've been trying this on several platforms -
16.04 physical host
16.04 VMware
17.04 vmware
The script pasted below creates a virtual disk, writes a partition
table, creates an fs and some thin pools, then verifies that writes
happened as expected.
On 16.04 physical host it seems to be working (though I do need to
manually dmremove the devices as seen in cleanup(), else a second run
fails).
On the VMware hosted vms, the mkfs.ext4 fails to find nbd0p1: "The file
/dev/nbd0p1 does not exist and no size was specified."
- (I've had other - corruption - issues which are what I was trying to track
down with this test script, but it's possible, not certain, that those all boil
down to having to manually dmremove the devices)
- ---
+ (I've had other - corruption - issues which are what I was trying to
+ track down with this test script, but it's possible, not certain, that
+ those all boil down to having to manually dmremove the devices)
+
+ #### reproduction script:
+
+ #!/bin/bash -exu
+
+ modprobe nbd
+ rm -f nbd.img
+
+ cleanup() {
+ if [ $failed -eq 1 ]; then
+ echo "XXXXXXX"
+ lvscan
+ echo "XXXXXX"
+ vgchange -an nbd || true
+ qemu-nbd -d /dev/nbd0
+ dmsetup remove nbd-ThinDataLV || true
+ dmsetup remove nbd-ThinDataLV_tmeta || true
+ dmsetup remove nbd-ThinDataLV_tdata || true
+ fi
+ }
+
+ truncate -s 30G nbd.img
+
+ sfdisk nbd.img << EOF
+ , 2G;
+ ,,8e;
+ EOF
+
+ vg=nbd
+ thinsize=20G
+
+ sync
+
+ echo "Connecting empty file"
+
+ qemu-nbd -f raw -c /dev/nbd0 nbd.img
+
+ failed=1
+ trap cleanup EXIT
+
+ echo "Creating partition 1"
+ mkfs.ext4 /dev/nbd0p1
+ mount /dev/nbd0p1 /mnt
+ touch /mnt/helloworld
+ umount /mnt
+
+ echo "Creating LVM partitions"
+ pvscan --cache
+ pvcreate -ff /dev/nbd0p2
+ vgcreate nbd /dev/nbd0p2
+
+ lvcreate -n ThinDataLV -L "${thinsize}" "${vg}"
+ lvcreate -n MetaDataLV -L 1G "${vg}"
+ lvconvert -y --type thin-pool --poolmetadata "${vg}/MetaDataLV"
"${vg}/ThinDataLV"
+
+ sleep 5
+ sync
+ sleep 5
+
+ echo "Disconnecting first"
+ cleanup
+
+ # now verify
+
+ echo "Reconnecting to verify"
+ qemu-nbd -f raw -c /dev/nbd0 nbd.img
+
+ echo "Mounting,"
+ mount /dev/nbd0p1 /mnt
+ echo "Checking whether helloworld file is there"
+ test -f /mnt/helloworld
+ echo "unmounting,"
+ umount /mnt
+ echo "disconnecting,"
+
+ cleanup
+
+ echo "Done"
+ failed=0
+
+ echo PASS
+
+
+ ---
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
AudioDevicesInUse:
- USER PID ACCESS COMMAND
- /dev/snd/controlC0: serge 1399 F.... pulseaudio
+ USER PID ACCESS COMMAND
+ /dev/snd/controlC0: serge 1399 F.... pulseaudio
CurrentDesktop: XFCE
DistroRelease: Ubuntu 17.04
InstallationDate: Installed on 2017-09-15 (41 days ago)
InstallationMedia: Xubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
IwConfig:
- lxcbr0 no wireless extensions.
-
- ens33 no wireless extensions.
-
- lo no wireless extensions.
+ lxcbr0 no wireless extensions.
+
+ ens33 no wireless extensions.
+
+ lo no wireless extensions.
MachineType: VMware, Inc. VMware Virtual Platform
Package: linux (not installed)
ProcFB: 0 svgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.10.0-37-generic
root=UUID=c33e6872-2e16-4b10-8d42-9dfacd6a132b ro find_preseed=/preseed.cfg
auto noprompt priority=critical locale=en_US quiet
ProcVersionSignature: Ubuntu 4.10.0-37.41-generic 4.10.17
RelatedPackageVersions:
- linux-restricted-modules-4.10.0-37-generic N/A
- linux-backports-modules-4.10.0-37-generic N/A
- linux-firmware 1.164.1
+ linux-restricted-modules-4.10.0-37-generic N/A
+ linux-backports-modules-4.10.0-37-generic N/A
+ linux-firmware 1.164.1
RfKill:
- 1: hci0: Bluetooth
- Soft blocked: no
- Hard blocked: no
+ 1: hci0: Bluetooth
+ Soft blocked: no
+ Hard blocked: no
Tags: zesty
Uname: Linux 4.10.0-37-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 05/19/2017
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias:
dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd05/19/2017:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1728109
Title:
nbd ( + lvm thin pool?) fragile
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1728109/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs