Re: mounting unpartitioned drives

Albert D. Cahalan (acahalan@cs.uml.edu)
Wed, 18 Feb 1998 16:00:16 -0500 (EST)


>>> By errors I mean those kernel messages "hdc: read_intr: status=0x59 ...".
>>> But also attempts to determine the partitions when I'm _explicitly_
>>> mounting /dev/hdc are looking strange. This is probably a bug of
>>> "mount".
>>
>> No, the partition analysis will _always_ happen - it is done in the
>> driver when it detects changed media. You'll have to live with that
>> bit of ugliness if you want to use the media in that way.
>
>> It might be worthwhile opening a debate about some method for telling
>> a driver not to both with a partition scan. A boot option or /proc
>> interface might do the trick:
>
> Uh??
> If the drive is removable (else why should you get "Media Changed")
> You MUST do a partition scan.

I don't see why. If a partition is asked for, you must do a partition
scan. If nobody asks for a partition, why even spin up the drive?
There isn't any need to cache the info, since mounting filesystems
is not an activity that occurs every second during normal operation.
The partition table can be checked whenever /dev/?d?? is opened or
mounted. Use of /dev/?d? doesn't count.

> The requested partition is usually different on the new media
> and might not exist at all.

No partition was requested, so there is no need to even find out.

> I know removable media is usually formatted as a single partition
> (You can even make a filesystem on the raw device), but checking
> what's actually on the media is (IMHO) an absolute "must".

That can be done at mount time. Re-reading partition tables after
fsck becomes a NOP.

> You can have a "quiet" option if You care, anything else seems just too
> dangerous (i do not think there's any chance the first sector of a
> sensible filesystem can have the "aa55" signature at the end; *only* if
> this signature is absent I would allow raw partition mounting).

Nope, the aa55 signature must be there for some broken BIOSs.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu