Re: [PARPORT] ppa and /dev/sdN


grant@torque.net
Thu, 31 Dec 1998 09:45:55 -0500 (EST)


This question is not at all relevant to the linux-parport list - in
fact it is not even a Linux question !

> QUESTION: can we force ppa to allways create the same device , i.e.
> /dev/sda1 ?
...
> Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
> SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1
> GB]
> sda: Write Protect is off
> sda: sda4
>
> but depending on WHICH zip disk I insert in the drive, I might as well
> get "sda: sda1" and this is troublesome for the basic users when they
> use the Kde desktop devices, because /etc/fstab must contains smthg
> like:
> /dev/sda4 /zip_100 msdos rw,user,noauto 1 1
> to allow any user to mount it, but of course it does'nt work when ppa
> creates a /dev/sda1.

The N in /dev/sdaN is determined by the partition structure on the
media. When you Linux fdisk or DOS fdisk or WinNT Disk Administrator or
Iomega's ZipTools or ... You lay out a number of zones on the disk each
of which can contain a separate file system. The original IBM partioning
strategy allowed for 4 partitions on a disk, numbered 1,2,3,4. Since
you may not require so many partitions, you could leave all but one
of those partitions empty.

Now, most people, if they just want a single partition, would make it
partition number one. For obscure reasons (possibly related to Macintosh
compatibility) Iomega chose to partition their pre-formatted media with
partitions 1,2 and 3 empty, and all the blocks of the disk assigned to
partition 4. That's why you sometimes see partition 1 and sometimes 4.
It depends on who partitioned the disk in the first place.

If you don't like the way a specific volume was partitioned, you can
always use fdisk to repartition it. If you are careful, you can even do
it without losing data.

This actually has nothing to do with the ppa driver. You would see the
same effect if you inserted those same disks in an ATAPI ZIP drive - only
they would show up with /dev/hdd1 or /dev/hdd4 or something ...

As it happens, Windows* maps partition names dynamically to drive letters.
You can see similar weird effects on Windows laptops, depending on
whether you have your ZIP drive and/or CD-ROM connected, the drive letters
will get mapped to different things.

There is one Linux issue exposed by this discussion - there ought to be
a mechanism for mounting volumes based on some invariant on the media
(rather than physical addresses). What's required is something like
Solaris' "vold" that would automatically mount media based on the
volume label. Something along these lines will probably appear in the
2.3 kernels.

--------------------------------------------------------------------------
Grant R. Guenther grant@torque.net
--------------------------------------------------------------------------

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Thu 31 Dec 1998 - 09:46:19 EST