growfs(8) also fails on a 4k-byte/sector disk. Simple patch for the man page added.
Connected >> OpenBSD/i386 BOOT 3.21 boot> boot kernel/i386/bsd.mp -a booting hd0a:kernel/i386/bsd.mp: -\|/-\|/-9831612\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\! |/-\ |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\+1082924 [72+407248|/-\|/-\|/-\|/-\|/-\|/-\|+400515/-\|/-\|/-\|/-\|/-\|/-\|]=0xb2e020 entry point at 0x200120 [ using 808248 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2014 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.5-current (GENERIC.MP) #54: Sun Apr 20 03:46:09 MDT 2014 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP cpu0: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz ("GenuineIntel" 686-class) 1.80 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,LAHF,PERF real mem = 526807040 (502MB) avail mem = 505761792 (482MB) warning: no entropy supplied by boot loader mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 11/24/08, BIOS32 rev. 0 @ 0xfa080, SMBIOS rev. 2.4 @ 0xf0000 (34 entries) bios0: vendor Phoenix Technologies, LTD version "MS7336 1.14" date 11/24/2008 bios0: Hewlett-Packard HP Compaq dx2300 Microtower acpi0 at bios0: rev 0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SLIC HPET MCFG APIC SSDT SSDT acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) PEX5(S5) HUB0(S5) UAR1(S5) UAR2(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USBE(S3) AC97(S5) AZAL(S5) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 199MHz cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz ("GenuineIntel" 686-class) 1.80 GHz cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,LAHF,PERF ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 20, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 4 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEX0) acpiprt2 at acpi0: bus -1 (PEX1) acpiprt3 at acpi0: bus -1 (PEX2) acpiprt4 at acpi0: bus -1 (PEX3) acpiprt5 at acpi0: bus -1 (PEX4) acpiprt6 at acpi0: bus -1 (PEX5) acpiprt7 at acpi0: bus 2 (HUB0) acpicpu0 at acpi0: FVS, 1800, 1200 MHz acpicpu1 at acpi0: FVS, 1800, 1200 MHz acpibtn0 at acpi0: PWRB bios0: ROM list: 0xc0000/0xb000! 0xcc000/0x1800 pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel 82946GZ Host" rev 0x02 ppb0 at pci0 dev 1 function 0 "Intel 82946GZ PCIE" rev 0x02: apic 4 int 16 pci1 at ppb0 bus 1 vga1 at pci0 dev 2 function 0 "Intel 82946GZ Video" rev 0x02 intagp0 at vga1 agp0 at intagp0: aperture at 0xd0000000, size 0x10000000 inteldrm0 at vga1 drm0 at inteldrm0 inteldrm0: 1280x1024 wsdisplay0 at vga1 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x01: msi azalia0: codecs: Realtek ALC888 audio0 at azalia0 uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 4 int 23 uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 4 int 19 uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 4 int 18 uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 4 int 16 ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 4 int 23 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb1 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xe1 pci2 at ppb1 bus 2 fxp0 at pci2 dev 8 function 0 "Intel 82801GB LAN" rev 0x01, i82562: apic 4 int 20, address xx:xx:xx:xx:xx:xx inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0 ichpcib0 at pci0 dev 31 function 0 "Intel 82801GB LPC" rev 0x01: PM disabled pciide0 at pci0 dev 31 function 2 "Intel 82801GB SATA" rev 0x01: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI pciide0: using apic 4 int 19 for native-PCI interrupt wd0 at pciide0 channel 0 drive 0: <ST3250318AS> wd0: 16-sector PIO, LBA48, 238475MB, 488397168 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6 atapiscsi0 at pciide0 channel 1 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <HL-DT-ST, DVD+-RW GSA-H31L, W618> ATAPI 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 5 ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 4 int 19 iic0 at ichiic0 iic0: addr 0x2f 00=c0 01=07 02=00 03=00 04=07 05=00 06=00 07=00 14=14 15=62 16=03 17=04 words 00=c0ff 01=07ff 02=00ff 03=00ff 04=07ff 05=00ff 06=00ff 07=00ff spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM non-parity PC2-5300CL5 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at ichpcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com0: console com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 wbsio0 at isa0 port 0x4e/2: W83627DHG rev 0x23 lm1 at wbsio0 port 0x290/8: W83627DHG npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 umass0 at uhub0 port 2 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.00/11.22 addr 2 umass0: using SCSI over Bulk-Only scsibus2 at umass0: 2 targets, initiator 0 sd0 at scsibus2 targ 1 lun 0: <Generic-, Compact Flash, 1.00> SCSI0 0/direct removable sd1 at scsibus2 targ 1 lun 1: <Generic-, SM/xD-Picture, 1.00> SCSI0 0/direct removable sd2 at scsibus2 targ 1 lun 2: <Generic-, SD/MMC, 1.00> SCSI0 0/direct removable sd3 at scsibus2 targ 1 lun 3: <Generic-, MS/MS-Pro, 1.00> SCSI0 0/direct removable umass1 at uhub0 port 8 configuration 1 interface 0 "HGST Touro Desk 3.0" rev 2.10/0.00 addr 3 umass1: using SCSI over Bulk-Only scsibus3 at umass1: 2 targets, initiator 0 sd4 at scsibus3 targ 1 lun 0: <HGST, , 0000> SCSI4 0/direct fixed serial.xxxxxxxxxxxxxxxxxxxx sd4: 3815446MB, 4096 bytes/sector, 976754431 sectors vscsi0 at root scsibus4 at vscsi0: 256 targets softraid0 at root scsibus5 at softraid0: 256 targets root device (default wd0a): sd4a swap device (default sd4b): root on sd4a swap on sd4b dump on sd4b # mount /dev/sd4a on / type ffs (local) /dev/sd4k on /home type ffs (local, nodev, nosuid) /dev/sd4d on /tmp type ffs (local, nodev, nosuid) /dev/sd4f on /usr type ffs (local, nodev) /dev/sd4g on /usr/X11R6 type ffs (local, nodev) /dev/sd4h on /usr/local type ffs (local, nodev) /dev/sd4j on /usr/obj type ffs (local, nodev, nosuid) /dev/sd4i on /usr/src type ffs (local, nodev, nosuid) /dev/sd4e on /var type ffs (local, nodev, nosuid) # disklabel sd4 # /dev/rsd4c: type: SCSI disk: SCSI disk label: HGST duid: cac6a3f85ac3a5cf flags: bytes/sector: 4096 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 60800 total sectors: 976754431 boundstart: 262144 boundend: 7602175 drivedata: 0 16 partitions: # size offset fstype [fsize bsize cpg] a: 243296 262144 4.2BSD 4096 32768 1 # / b: 194159 505440 swap # none c: 976754431 0 unused d: 387224 699600 4.2BSD 4096 32768 1 # /tmp e: 599808 1086824 4.2BSD 4096 32768 1 # /var f: 453216 1686632 4.2BSD 4096 32768 1 # /usr g: 262144 2139848 4.2BSD 4096 32768 1 # /usr/X11R6 h: 969928 2401992 4.2BSD 4096 32768 1 # /usr/local i: 351272 3371920 4.2BSD 4096 32768 1 # /usr/src j: 511056 3723192 4.2BSD 4096 32768 1 # /usr/obj k: 2319328 4234248 4.2BSD 4096 32768 1 # /home l: 524288 6553576 4.2BSD 4096 32768 1 # disklabel -E sd4 Label editor (enter '?' for help at any prompt) > m l offset: [6553576] size: [524288] 900000 FS type: [4.2BSD] > p OpenBSD area: 262144-7602175; size: 7340031; free: 148600 # size offset fstype [fsize bsize cpg] a: 243296 262144 4.2BSD 4096 32768 1 # / b: 194159 505440 swap # none c: 976754431 0 unused d: 387224 699600 4.2BSD 4096 32768 1 # /tmp e: 599808 1086824 4.2BSD 4096 32768 1 # /var f: 453216 1686632 4.2BSD 4096 32768 1 # /usr g: 262144 2139848 4.2BSD 4096 32768 1 # /usr/X11R6 h: 969928 2401992 4.2BSD 4096 32768 1 # /usr/local i: 351272 3371920 4.2BSD 4096 32768 1 # /usr/src j: 511056 3723192 4.2BSD 4096 32768 1 # /usr/obj k: 2319328 4234248 4.2BSD 4096 32768 1 # /home l: 900000 6553576 4.2BSD 4096 32768 1 > w > q No label changes. # # fsck -nf /dev/rsd4l ** /dev/rsd4l (NO WRITE) ** File system is already clean ** Last Mounted on /restore ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 9118 files, 249976 used, 270143 free (23 frags, 33765 blocks, 0.0% fragmentation) # # growfs -N /dev/rsd4l new file systemsize is: 900000 frags Warning: 908544 sector(s) cannot be allocated. growfs: 3072.0MB (6291456 sectors) block size 32768, fragment size 4096 using 6 cylinder groups of 512.00MB, 16384 blks, 32768 inodes. with soft updates super-block backups (for fsck -b #) at: 4194368, 5242944 # growfs /dev/rsd4l We strongly recommend you to make a backup before growing the Filesystem Did you backup your data (Yes/No) ? Yes new file systemsize is: 900000 frags growfs: wtfs: write error: 7199999: Invalid argument # Index: src/sbin/growfs/growfs.8 =================================================================== RCS file: /cvs/src/sbin/growfs/growfs.8,v retrieving revision 1.12 diff -u -p -u -r1.12 growfs.8 --- src/sbin/growfs/growfs.8 19 Oct 2013 16:53:13 -0000 1.12 +++ src/sbin/growfs/growfs.8 22 Apr 2014 13:03:25 -0000 @@ -134,3 +134,5 @@ team Filesystems must be checked with .Xr fsck 8 after enlarging. +.Pp +Only devices with 512-byte sectors are supported. Regards, David