fsck cannot determine fstype automatically

Peter Steele psteele at maxiscale.com
Thu Mar 4 04:33:18 UTC 2010


We use gpart to create GPT style partitions. For example:

# gpart show ad4
=>       34  490234685  ad4  GPT  (234G)
         34         16    1  freebsd-boot  (8.0K)
         50   67108864    2  freebsd-swap  (32G)
   67108914   67108864    3  freebsd-swap  (32G)
  134217778   10485760    4  freebsd-ufs  (5.0G)
  144703538   25165824    5  freebsd-ufs  (12G)
  169869362   11719060    6  freebsd  (5.6G)
  181588422  200620089    7  freebsd-ufs  (96G)
  382208511  108026208    8  freebsd-ufs  (52G)

In this case, partitions 3, 4, and 5 are mirrored with equivalent partitions on another drive and these appear to be working fine. Partitions 7 and 8 are strictly data partitions and not mirrored. When I try to run fsck against them, I get this:

# fsck /dev/ad4p4      
fsck: Could not determine filesystem type

I have to specify the file system type explicitly:

# fsck -t ufs /dev/ad4p7
** /dev/ad4p7 (NO WRITE)
** Last Mounted on /v0
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
39 files, 553 used, 48573784 free (24 frags, 6071720 blocks, 0.0% fragmentation)

Why do I have to specify the fstype explicitly? I have a similar system configured with fdisk/bsdlabel and the fsck command doesn't have any problems with determining the fstype. Is there something we need to do to allow the fstype of GPT partitions to be automatically determined by fsck?



More information about the freebsd-questions mailing list