Re: Of removable devices

From: Theodore Y. Ts'o (tytso@MIT.EDU)
Date: Fri Feb 25 2000 - 20:50:05 EST


   Date: Fri, 25 Feb 2000 19:44:31 +0000 (GMT)
   From: Riley Williams <rhw@MemAlpha.CX>

   Let's be accurate: both fat and ext2 CAN use serial numbers. However,
   neither is forced to, and certainly with fat partitions, there are
   plenty that don't have any serial numbers in place - any formatted
   prior to MSDOS 6.00 and never reformatted, for example.

> But there is no knowledge of such things in the block device or
> VFS layers, and old ext2 filesystems won't necessarily have a
> uuid.

   SCT is probably far more au fait with ext2 tools than I am...

Actually, if you're a version of e2fsprogs newer than 1.05 (and if
you're using anything that old, you've got other really serious problems
problems), e2fsck will automatically generate and assign a UUID to a
filesystem that doesn't have one.

So we can pretty much count on all ext2 filesystems have a UUID. The
only time it won't be unique is if someone copies a filesystem using
dd. This admittedly does happen with floppies from time to time, but
there's not much we can do to prevent that.

> The potential for things going wrong is awesome.

   Personally, I believe they are so high that anything that can't give a
   rock solid guarantee that it has correctly identified the disk that
   was removed shouldn't even be considered.

Well, if the UUID is different from what filesystem was mounted
previously, that's a guarantee that we *should* do soemthing. Yes,
there is some chance of type II errors, but it's not like there's any
chance of a type I error. That means that it really can be a useful
test.

                                        - Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:14 EST