8 October 2007

bug in partimage on ubuntu with lvm installed

Filed under: bugs, ubuntu — bookweevil @ 12:10 pm

Hm … when I run partimage interactively, I get the message “/dev/dm inode doesn’t exists [sic]”.

It appears that partimage’s method of detecting partitions (namely, reading /proc/partitions) is not compatible with Ubuntu’s way of doing things. This page seems to be the best description I’ve found of the problem:

From: Franck Ladurelle <ladurelf@…>

Subject: Re: LVM support in Partimage

Newsgroups: gmane.comp.sysutils.partimage.user

Date: 2005-06-06 08:00:05 GMT (2 years, 17 weeks, 4 days, 5 hours and 31 minutes ago)

| Hello partimage folks!
| From a first point of view, I think, implementing LVM support should
| be a minor issue, because a Logical Volume is “just another
| blockdevice” (isn`t it?). From my (limited) point of view, it should
| primary just be a matter of “detecting” those logical volumes within
| partimage and specifying those device paths. Am I right here?

Yes. Partimage already work with LVM/RAID but only in command line. If
you have a filesystem on /dev/md0, the GUI won’t show it but you can
backup/restore your data with

“partimage save/restore /dev/md0 /whereever/you/want/your/image”

| Can someone tell, how (which part of the code) partimage detects
| devices/partitions?

Partimage extracts this from /proc/partitions like with an “awk ‘{print
/dev/“$4}'”. The matter with LVM is that you have a dm-X entry without
the corresponding /dev/dm-X file. You have to link to /dev/mapper which
should be easy but I never took time to do this.

| BTW: In cvs – is “partimage-cvs-newtree” the “stable” branch and
| “partimage-cvs-004” the “unstable” one ?

This changed a few days ago. Repositories are now “partimage-0.6” for

partimage 0.6.x (stable) and “partimage-cvs-004” for 0.7.x (unstable).

| Probably, the project could use some code/ideas from lvmdiskscan and
| lvscan for implementing LVM support ?

Once your LVM is up and working, this is not needed.

| Furthermore, i recognized, that the stable release had no problems to
| find partitions on my hp smart array (/dev/cciss/c0d0px) – the latest
| downloadable static release (0.7.1) i found for download doesn`t
| recognize them anymore (unfortunately I couldn`t compile 0.7.2
| successfully). Did the device/partition detection code change over
| the time?

I can’t remember when I did this but now partimage 0.7.x will use parted
libraries to handle device/partitions.

Have a nice day!


So the possible fixes are:

  • Upgrade to a 0.7 version of partimage (available from Sourceforge, seems to be an unstable version still). Franck’s post above suggests that he thinks the problem was fixed as of 2005 … but this still hasn’t found it’s way into the stable version.
  • Don’t use the GUI – only the command line. If you specify a partition device on the command line, the problem doesn’t arise. E.g.:

partimage -b –nodesc –finish 3 save /dev/sda1 sda1.partimage

  • Use mknod as a quick fix to create a /dev/dm node that will keep partimage happy, as described here:

mknod -m 644 /dev/dm b 240 0

  • Add this quick fix mknod command to /etc/rc.local so that’s always performed on startup.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: