[Bug 611717] Re: parted fails to remove partitions from lvm disk

Hadmut Danisch hadmut at danisch.de
Sat Jun 16 13:45:41 UTC 2012


Bug still exists in general, but seems to have changed. Do something
like

lvcreate -L 40M -n dummy vg1

parted /dev/vg1/dummy
mklabel msdos     
mkpart primary 1 2
mkpart primary 2 3
quit

parted /dev/vg1/dummy
rm 1
quit

and you will get several error messages. However, the commands are
executed, although the confirmation requests make it impossible to run
them from a shell script.

regards

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to parted in Ubuntu.
https://bugs.launchpad.net/bugs/611717

Title:
  parted fails to remove partitions from lvm disk

Status in “parted” package in Ubuntu:
  Incomplete

Bug description:
  Binary package hint: parted

  Hi,

  sometimes it is necessary to use an LVM logical volume not just like a
  single partition (e.g. to carry a file system), but to mimic a
  complete hard disk (e.g. to be used as a virtual hard disk for
  emulators like kvm).

  using parted to create disk labels, partitions etc. on an LV works as
  expected. But then, parted denies to remove a partition and claims it
  is in use and mounted, although it isn't. As far as I could figure out
  with strace parted reads the device mapper table to check, whether a
  partition is used. Since LVM logical volumes always appear on the
  dmsetup list (in contrast to regular hard disks which only appear if
  really in use), parted always erroneously assumes that the
  disk/partition is in use and denies to remove it.

  regards
  Hadmut

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/611717/+subscriptions




More information about the foundations-bugs mailing list