Opened 16 years ago

Closed 15 years ago

#59 closed defect (wontfix)

losetup sucks

Reported by: price Owned by: price
Priority: trivial Milestone: Version 2.0
Component: autoinstallers Version:
Keywords: Cc:

Description

Currently sipb-xen-lvcopy (part of the cloning autoinstaller), in order to mount filesystems located in partitions inside the LVs that are our disk images, uses losetup -o to make loopback devices that mirror the LV devices with an offset.

Unfortunately losetup seems to be impossible to use reliably -- the resulting devices are taken from a small fixed namespace, and there's no way to grab one atomically. (Rather, there is a way called losetup -f, but you can either find out a free name or bind to it -- not both!) The current code uses a lock so that different invocations of sipb-xen-lvcopy won't collide, but we have to cross our fingers that no other program touches /dev/loop32 through /dev/loop59, the arbitrary range I chose.

It'd be good to fix this, but it's probably hopeless and probably won't bite us anyway. Unless I'm missing something and it's easy.

Change History (2)

comment:1 Changed 16 years ago by price

  • Milestone set to Version 2.0

comment:2 Changed 15 years ago by broder

  • Resolution set to wontfix
  • Status changed from new to closed

We don't losetup anymore. kpartx ftw

Note: See TracTickets for help on using tickets.