home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25177 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  4.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!wariat!kf8nh
  2. From: kf8nh@kf8nh.wariat.org (Brandon S. Allbery)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: a universal set of fs commands?
  5. Keywords: fs
  6. Message-ID: <uTysXB6w165w@kf8nh.wariat.org>
  7. Date: Fri, 22 Jan 93 18:52:17 EST
  8. References: <gleasokr.727662027@rintintin.Colorado.EDU>
  9. Distribution: world
  10. Organization: Brandon S. Allbery's Personal System
  11. Lines: 81
  12.  
  13. gleasokr@rintintin.Colorado.EDU (Kris Gleason) writes:
  14. > kf8nh@kf8nh.wariat.org (Brandon S. Allbery) writes:
  15. > >And the partition ID is a valuable clue as to what the correct filesystem
  16. > >type is if certain kinds of superblock corruption occur that leave auto-
  17. > >detection schemes confused.
  18. > Ok... you convinced me (pretty quickly) that the partition table is the one
  19. > place that any os should be able to figure out just what type of partition
  20. > is there.  However, what type of filesystem is a floppy disk??  I think
  21.  
  22. I didn't say it was the only viable way or the only way that should be used.
  23. Just that it shouldn't be ignored outright, just because some OSes have
  24. buggy partition recognizers.  Bugs should be fixed, not hacked around by
  25. working software.
  26.  
  27. > made in determining the fs type.  Of course, you say that msdos has no 
  28. > magic number.  This is no problem for mkfs and fsck right now since there
  29. > is no such beast for a dos fs (are these in the works somewhere, I wonder?).
  30. > But, even without a magic number that the linux kernel uses, I would assume
  31. > that it is possible to detect a filesystem as being a msdos fs.  Correct
  32.  
  33. Sort of.  I've noticed the Linux msdos fs type will attempt to read random
  34. data as an MS-DOS filesystem, report invalid parameters, and fail.  Which
  35. may be the only way to handle MS-DOS; I don't know.
  36.  
  37. > reports on might not be compatible with the Linux magic numbering convention.
  38. > At any rate, I don't think that depending on the partition table alone is
  39. > safe enough for a fsck command if it is to be automated.
  40.  
  41. Again, I never said it should be the only criterion.  I was responding to
  42. folks who said it explicitly should *not* be considered at all.
  43.  
  44. I plan to use several methods, including (for existing filesystems)
  45. /etc/fstab, partition types, magic numbers where they exist, etc.  The
  46. per-fstype executable that checks this has the job of deciding what the
  47. criteria are and doing the check, which allows the use of magic numbers in
  48. "nonstandard" locations, non-magic-number schemes like the msdos filesystem,
  49. etc.
  50.  
  51. > >(2) I have a good reason why this shouldn't be done except as a default if
  52. > >    they don't specify a size.  It's called disk striping, which I'm putting
  53. > >    into my gdisk driver.
  54. > I meant for autodetection to be a default that could easily be overridden.
  55. > For simple tasks like mkfs'ing a floppy, this would be convenient, especially
  56. > with all of the possible formats of floppy disks.
  57.  
  58. Okay.  I like this myself, as long as it's possible to specify a size.  Disk
  59. striping is a nice way to put those spare 20MB drives to use that you have
  60. left over from your XT days :-)
  61.  
  62. > I like it.  The only real problems that I see are the problems with the
  63. > partition table being incorrect; it might be a good idea to look at this
  64. > id with skepticism rathen than as absolute fact when developing code, and
  65. > offer a suitable alternate id-check for systems that are not quite right
  66. > (maybe an option for fixing in fsck?  or is it bad to touch the partition 
  67. > table without a reboot?)  Also, the most work these commands get on my
  68. > system is with floppies.  So, whatever scheme is used, I think a system for
  69. > detecting floppy fs-types would be important.
  70.  
  71. Again, partition ID is not the only criterion it will use.  And in any case
  72. mkfs will be saying something like
  73.  
  74.   mkfs: partition data for /dev/hda1 suggests minix filesystem of 32766 blocks
  75.   if this is incorrect, interrupt within 10 seconds then use "-t fstype"
  76.  
  77. (Which also gives you 10 seconds to realize you typed "/dev/hda1" instead of
  78. "/dev/hda2" and stop short of trashing your root partition :-)
  79.  
  80. I've been thinking about this issue for most of the day, but I need to set
  81. some things down in an organized fashion before I can try to give any real
  82. details.  (I think I was a bit over-ambitious in suggesting I'd have a
  83. prototype done this weekend.  Besides, this gives me time to get my 330MB
  84. SCSI hard drive in so I'll have room to play with this stuff, not to mention
  85. being able to *test* mkfs after writing it.  :-)
  86.  
  87. ++Brandon
  88.  
  89. --
  90. He's BAAAACK! Brandon S. Allbery                       kf8nh@kf8nh.wariat.org
  91. Help stamp out OSF/Motif in our lifetime!
  92.