Bug 243413 - stable/11: newfs: can't read recovery area: read error from block device: Invalid argument
Summary: stable/11: newfs: can't read recovery area: read error from block device: Inv...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.3-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Eugene Grosbein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-17 12:23 UTC by Eugene Grosbein
Modified: 2020-01-20 08:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2020-01-17 12:23:21 UTC
The problem fixed in https://svnweb.freebsd.org/base?view=revision&revision=323157 was never merged to stable/11 and today I've faced with inability of newfs to work on GELI volumes with 8K sector size:

# diskinfo -v /dev/da1.eli.journal
/dev/da1.eli.journal
        8192            # sectorsize
        1998251433984   # mediasize in bytes (1.8T)
        243927177       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        No              # TRIM/UNMAP support
        Unknown         # Rotation rate in RPM

# newfs -b 65536 -J /dev/da1.eli.journal
/dev/da1.eli.journal: 1905681.1MB (3902834832 sectors) block size 65536, fragment size 8192
        using 759 cylinder groups of 2512.19MB, 40195 blks, 161024 inodes.
super-block backups (for fsck_ffs -b #) at:
 256, 5145216, 10290176, 15435136, 20580096, 25725056, 30870016, 36014976, 41159936, 46304896,
[skip]
 3848430336, 3853575296, 3858720256, 3863865216, 3869010176, 3874155136, 3879300096, 3884445056,
 3889590016, 3894734976, 3899879936
newfs: can't read recovery area: read error from block device: Invalid argument


Please consider merging r323157 to stable/11 before 11.4-RELEASE.
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2020-01-17 17:28:54 UTC
Forgot to note that I used command "svn diff -c323157" to prepare patch-file and it applied to stable/11 sources cleanly.

Then I've rebuilt /sbin/newfs binary and problem's gone.
Comment 2 Kirk McKusick freebsd_committer freebsd_triage 2020-01-20 03:15:31 UTC
I have no objection to your doing an MFC of 323157 to stable-11.
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-01-20 08:29:48 UTC
A commit references this bug:

Author: eugen
Date: Mon Jan 20 08:28:55 UTC 2020
New revision: 356905
URL: https://svnweb.freebsd.org/changeset/base/356905

Log:
  MFC r323157 by 323157: fix recovery information with sector sizes up to 64K.

  Original commit log:

    The new fsck recovery information to enable it to find backup
    superblocks created in revision 322297 only works on disks
    with sector sizes up to 4K. This update allows the recovery
    information to be created by newfs and used by fsck on disks
    with sector sizes up to 64K. Note that FFS currently limits
    filesystem to be mounted from disks with up to 8K sectors.
    Expanding this limitation will be the subject of another
    commit.

  For example, this allows newfs to work on GELI volumes with 8K sectors.

  PR:		243413
  Approved by:	mckusick
  Relnotes:	Yes

Changes:
_U  stable/11/
  stable/11/sbin/fsck_ffs/setup.c
  stable/11/sbin/newfs/mkfs.c
  stable/11/sys/ufs/ffs/fs.h