[ale] Kubuntu 13.04 danger: beware /dev/dm-*

George Allen glallen01 at gmail.com
Tue Apr 30 20:42:31 EDT 2013


So, I just finished recovering from a data-loss causing error in the new ubuntu:

I had one hard drive with 12.10, and a new one with a fresh install of 13.04.
Both used LVM, with slightly different custom setups...

In transferring the files from the old to new drives, via rsync and an
external usb adapter, the transfer suddenly errored out after several
GBs.

I don't have the logs handy to give better notes (specific errors),
but basically:
- sometime late in the rsync the computer decided to write something to swap.
- 13.04 had created the cryptswap device using /dev/dm-3 instead of
/dev/mapper/vg-swap or a UUID (in /etc/crypttab)
- sometime in my modifying the partitions/lvm and adding a usb drive
that also contained lvm volumes, /dev/dm-* were re-numbered

So as soon as the computer touched swap, it corrupted my /dev/vg/home
logical volume

It took me a while to figure out what was going on... then with blkid
and lots of googling I managed to find out by comparing UUIDs for each
device.

To avoid further problems - grep -rE '/dev/(sd.|mapper|disk|dm)' * on
both systems confirmed that '/etc/crypttab' on the 13.04 install was
the only important file that referenced anything by dm-* but that one
file can hose your system if somehow dmsetup renumbers things after
changes.

-George


More information about the Ale mailing list