Bad magic number in super-block

Theodore Tso tytso at
Wed Oct 3 14:52:18 UTC 2007

On Wed, Oct 03, 2007 at 07:01:08AM -0400, Bryan Kadzban wrote:
> In any case, the sdX device names are no longer necessarily stable.
> That's why udev now creates the /dev/disk/by-* trees of symlinks, whose
> names are supposed to be stable.  (I'd recommend by-id myself, but it
> depends on how your disks are set up.)

The recommended way of dealing with this is to putting something like
this in your /etc/fstab:

UUID=57299143-64a5-45f3-8c3d-9b68e38247bd / ext3 defaults,errors=remount-ro 0 1


LABEL=root / ext3 defaults,errors=remount-ro 0 1

Mount and fsck will automatically find the appropriate device, and
this will work even if udev changes in the future.  This approach also
will work on much older systems, including ones that are pre-udev.
(i.e, RHEL4, etc.)

Note that you can get yourself in trouble with either approach if you
have multiple filesystems with the same label or partition.  With
UUID's, that shouldn't ever happen unless you provision systems via
partition images or use dd to copy filesystems around.  If you do
this, a *really* good idea is to use the command:

      tune2fs -U random /dev/sdXX

... after you copy a filesystem image, and then use dumpe2fs -h to
determine the new UUID.  That way, each filesystem will have its own
unique filesystem.  This is especially important if you have a large
cluster of machines which access their root filesystem across a SAN
network to some large enterprise storage array.  It is a really,
really good idea to keep each filesystem image separate with its own
universally unique ID.

						- Ted

More information about the Ext3-users mailing list