cannot mount a newly formatted HAMMER2 volume ... mount: invalid argument

nacho Lariguet lariguet at gmail.com
Mon Aug 10 22:44:03 PDT 2020


I already coded an installation script from scratch which wipes out the drive and formats everything as needed given some parameters. So far so good. Everything is working as expected. But when I attempted to start copying the system files as advised in the manual installation on the handbook, and closely following what the installer script is doing (being previously run the way I expect to install my system with this script), I hit an issue while mounting the already formatted ROOT partition on the BSD slice; ie: da0s1 in my case.

mkdir '/mnt/tempROOT/'; ### a temporary mount point to install the files to be discarded afterward

mount_hammer2 '/dev/serno/CVCV2034019Y180EGN.s1d' '/mnt/tempROOT/';
mount: Invalid argument

dmesg; ### last relevant entries only (full dmesg output at the end of this mail)

...
hammer2_mount: '/dev/serno/CVCV2034019Y180EGN.s1d at ROOT'
hammer2_mount: dev="/dev/serno/CVCV2034019Y180EGN.s1d" label="ROOT" rdonly=0
hammer2: using volume header #0
hammer2 mount "/dev/serno/CVCV2034019Y180EGN.s1d":  no recovery needed
hammer2_mount: PFS label not found
HAMMER2: VOLDATA DUMP
HAMMER2: INITIATE SPANs
HAMMER2: CONN WAS TERMINATED
hammer2_unmount(A): devvp /dev/serno/CVCV2034019Y180EGN.s1d rbdirty 0 ronly=0
hammer2_unmount(B): devvp /dev/serno/CVCV2034019Y180EGN.s1d rbdirty 0
v-chain 0xfffff804f4aa04c0.255 0000000000000000/0 mir=0000000000000010
      [00002000] (?) refs=1
f-chain 0xfffff804f4aa0680.254 0000000000000000/0 mir=0000000000000010
      [00000000] (?) refs=0

And obviously '/dev/serno/CVCV2034019Y180EGN.s1d' was already successfully formated using:

newfs_hammer2 -L 'system' '/dev/serno/CVCV2034019Y180EGN.s1d';

... with no issues reported at all. Nothing of what I'm seeing in the dmesg outputs tells me anything useful given my (lack of) knowledge right now.

The installer scripts formats ROOT with the -f switch (it really formats all HAMMER2 volumes with -f) but the man page for newfs_hammer2 states that it should be used when the volume size is <= 10 GB which in my case applies to /boot and /build.

The installer (as shown in its log) is doing:

,-<<< Executing `/sbin/mount_hammer2 /dev/serno/CVCV2034019Y180EGN.s1d /mnt/'
`->>> Exit status: 0

I am using another mountpoint but I can't see why it could make any difference.

Am I doing anything wrong ?

PS: by the way: the target drive in question is:
da0: <SATA INTEL SSDSC2CW18 400i> Fixed Direct Access SCSI-4 device 
da0: Serial Number CVCV2034019Y180EGN
da0: 150.000MB/s transfers
... which dragonFly sets/uses @ 150 MB/s but the drive is SATA @ 6 Gbps ... any clues ?

Following is everything I expect it could be of some help (I don't know yet what command could report the status or some info on unmounted partitions on any given slice; eg: da0s1 containing 4 partitions with their own file-systems in my case):

gpt show da0;

      start       size  index  contents
          0          1      -  PMBR
          1          1      -  Pri GPT header
          2         32      -  Pri GPT table
         34       2014      -  Unused
       2048     262144      0  GPT part - EFI System
     264192  351387648      1  GPT part - DragonFly Label64
  351651840         15      -  Unused
  351651855         32      -  Sec GPT table
  351651887          1      -  Sec GPT header

disklabel64 da0s1;

# /dev/da0s1:
#
# Calculated informational fields for the slice:
#
# boot space:    1044480 bytes
# data space:  175691776 blocks	# 171574.00 MB (179908378624 bytes)
#
# NOTE: The partition data base and stop are physically
#       aligned instead of slice-relative aligned.
#
# All byte equivalent offsets must be aligned.
#
diskid: 85fce7fc-db7c-11ea-a60f-012324e2aca4
label: BSD
boot2 data base:      0x000000001000
partitions data base: 0x000000100000
partitions data stop: 0x0029e3700000
backup label:         0x0029e37ff000
total size:           0x0029e3800000	# 171576.00 MB
alignment: 4096
display block size: 1024	# for partition display and edit only

16 partitions:
#          size     offset    fstype   fsuuid
  a:    1048576          0    4.2BSD	#    1024.000MB
  d:   33554432    1048576   HAMMER2	#   32768.000MB
  e:  134217728   34603008   HAMMER2	#  131072.000MB
  f:    6871040  168820736   HAMMER2	#    6710.000MB
  a-stor_uuid: 8604709f-db7c-11ea-a60f-012324e2aca4
  d-stor_uuid: 860470ac-db7c-11ea-a60f-012324e2aca4
  e-stor_uuid: 860470b3-db7c-11ea-a60f-012324e2aca4
  f-stor_uuid: 860470b8-db7c-11ea-a60f-012324e2aca4

mount; ### /dev/da9s2/ is a temporary USB key on FAT32 which I am using to move the installation script to the liveCD /ROOT/ directory and to take out installation logs while developing it

/dev/part-by-label/DragonFly_v5.9.0.706.g783aa.a on / (ufs, noatime, local)
devfs on /dev (devfs, nosymfollow, local)
tmpfs on /tmp (tmpfs, local)
tmpfs on /var/tmp (tmpfs, local)
tmpfs on /var/run (tmpfs, local)
tmpfs on /usr/obj (tmpfs, local)
procfs on /proc (procfs, local)
tmpfs on /var/run/shm (tmpfs, local)
/dev/da9s2 on /mnt/usb (msdos, local)

ll /mnt/;

total 10
drwxr-xr-x  2 root  wheel   512 Aug 11 02:47 tempROOT/
drwxr-xr-x  1 root  wheel  8192 Jan  1  1980 usb/

dmesg; ### full output; immediately after mount reports fail

Copyright (c) 2003-2020 The DragonFly Project.
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
DragonFly v5.9.0.706.g783aa-DEVELOPMENT #0: Mon Aug 10 10:29:25 UTC 2020
    root at pkgbox64.dragonflybsd.org:/usr/obj/usr/src/sys/X86_64_GENERIC
acpi_hpet: frequency 14318180
Using cputimer HPET for TSC calibration
Timer latency (in TSC ticks): 15119 min=1810 max=1312094
TSC invariant clock: 2794753641 Hz
CPU: AMD PRO A10-8770E R7, 10 COMPUTE CORES 4C+6G    (2794.75-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x660f51  Stepping = 1
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x76d8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,AVX,F16C,RDRND>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x2fabbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId,TBM,PCX_CORE,PCX_NB,SPM,DBE,PTSC,MWAITX>
  Structured Extended Features=0x1a9<GSFSBASE,BMI1,AVX2,SMEP,BMI2>
  Thermal and PM Features=0x4<ARAT>
  MONITOR/MWAIT Features=0x2<INTBRK>
CPU Special Features Installed: SMEP
real memory  = 25178517504 (24012 MB)
avail memory = 24330407936 (23203 MB)
madt_lapic_probe: lapic_count=4 x2apic_count=0
ACPI CPUS = 4
LAPIC: AMD LINTEN on
   LAPIC AMD elvt0: 0x00010000
   LAPIC AMD elvt1: 0x00010000
   LAPIC AMD elvt2: 0x00010000
   LAPIC AMD elvt3: 0x00010000
LAPIC latency (in TSC ticks): 379 min: 296 max: 675
lapic: divisor index 0, frequency 49906318 Hz
core_bits 4 logical_CPU_bits 0
CPU Topology: cores_per_chip: 4; threads_per_core: 1; chips_per_package: 1;
srat_probe: can't locate SRAT
SMI Frequency (worst case): 12658 Hz (79 us)
Initialize MI interrupts for 4 cpus
TSC testing MP synchronization ...
TSC MPSYNC TEST 1708 4 -> 427 (10uS=27947)
TSC is MP synchronized
TSC: cputimer freq 2794753641
Spectre: support=( IBPB ) req=0000 operating=( none )
MDS: support=( MDS_NOT_REQUIRED ) req=0000 operating=( none )
interrupt uses mplock: swi_taskq
wdog: In-kernel automatic watchdog reset enabled
evdev device loaded.
kbd1 at kbdmux0
md0: Malloc disk
ACPI: RSDP 0x00000000DCC74000 000024 (v02 LENOVO)
ACPI: XSDT 0x00000000DCC740A0 0000BC (v01 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: FACP 0x00000000DCC810D0 00010C (v05 LENOVO TC-M11   00000310 AMI  00010013)
Firmware Warning (ACPI): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20200717/tbfadt-801)
ACPI: DSDT 0x00000000DCC741E8 00CEE5 (v02 LENOVO TC-M11   00000310 INTL 20120913)
ACPI: FACS 0x00000000DD22ED00 000040
ACPI: APIC 0x00000000DCC811E0 00007E (v03 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: FPDT 0x00000000DCC81260 000044 (v01 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: FIDT 0x00000000DCC812A8 00009C (v01 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: MCFG 0x00000000DCC81348 00003C (v01 LENOVO TC-M11   00000310 MSFT 00010013)
ACPI: SLIC 0x00000000DCC81388 000176 (v01 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: MSDM 0x00000000DCC81500 000055 (v03 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: HPET 0x00000000DCC81558 000038 (v01 LENOVO TC-M11   00000310 AMI  00000005)
ACPI: UEFI 0x00000000DCC81590 000042 (v01 LENOVO TC-M11   00000310      00000000)
ACPI: IVRS 0x00000000DCC815D8 0000D0 (v02 LENOVO TC-M11   00000310 AMD  00000000)
ACPI: VFCT 0x00000000DCC816A8 00FE84 (v01 LENOVO TC-M11   00000310 AMD  31504F47)
ACPI: TPM2 0x00000000DCC91530 000034 (v03 LENOVO TC-M11   00000310 AMI  00000000)
ACPI: SSDT 0x00000000DCC91568 000B9C (v01 LENOVO TC-M11   00000310 AMD  00000001)
ACPI: SSDT 0x00000000DCC92108 008877 (v02 LENOVO TC-M11   00000310 MSFT 04000000)
ACPI: CRAT 0x00000000DCC9A980 000578 (v01 LENOVO TC-M11   00000310 AMD  00000001)
ACPI: LUFT 0x00000000DCC9AEF8 0569E2 (v01 LENOVO TC-M11   00000310 AMI  00010013)
ACPI: SSDT 0x00000000DCCF18E0 0015B7 (v01 LENOVO TC-M11   00000310 INTL 20120913)
ACPI: SSDT 0x00000000DCCF2E98 00165E (v01 LENOVO TC-M11   00000310 INTL 20120913)
ACPI: BGRT 0x00000000DCCF44F8 000038 (v01 LENOVO TC-M11   00000310 AMI  00010013)
sc0: <System console> on motherboard
sc0: EFI_FB <16 virtual consoles, flags=0x700>
cryptosoft0: <software crypto> on motherboard
acpi0: <LENOVO TC-M11> on motherboard
ACPI: 5 ACPI AML tables successfully acquired and loaded
ACPI FADT: SCI testing interrupt mode ...
ACPI FADT: SCI select level/low
acpi0: Power Button (fixed)
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
acpi_timer0 on acpi0
cpu0: <ACPI CPU> on acpi0
cpu_cst0: <ACPI CPU C-State> on cpu0
cpu_pst0: <ACPI CPU P-State> on cpu0
cpu1: <ACPI CPU> on acpi0
cpu_cst1: <ACPI CPU C-State> on cpu1
cpu_pst1: <ACPI CPU P-State> on cpu1
cpu2: <ACPI CPU> on acpi0
cpu_cst2: <ACPI CPU C-State> on cpu2
cpu_pst2: <ACPI CPU P-State> on cpu2
cpu3: <ACPI CPU> on acpi0
cpu_cst3: <ACPI CPU C-State> on cpu3
cpu_pst3: <ACPI CPU P-State> on cpu3
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
acpi_sysresource3: Conflicts with PCI device 0:8:0
amdsmn0: <AMD Family 15h System Management Network> on hostb0
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb0
pci0: <base peripheral> (vendor 0x1022, dev 0x1577) at device 0.2
vgapci0: <VGA-compatible display> port 0xf000-0xf0ff mem 0xfeb00000-0xfeb3ffff,0xf0000000-0xf07fffff,0xe0000000-0xefffffff at device 1.0 on pci0
vgapci0: Boot video device
pci0: <multimedia, HDA> (vendor 0x1002, dev 0x9840) at device 1.1
pcib1: <ACPI PCI-PCI bridge> at device 2.1 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 2.2 on pci0
pci2: <ACPI PCI bus> on pcib2
re0: <RealTek 8111/8168 PCIe Gigabit Ethernet> port 0xec00-0xecff mem 0xfea10000-0xfea13fff,0xfea18000-0xfea18fff at device 0.0 on pci2
re0: MAC version 0x50200000, MACFG 67, support MSI
re0: bus speed 125MHz
re0: MAC address: 00:23:24:e2:ac:a4
pci2: <simple comms, UART> (vendor 0x10ec, dev 0x816a) at device 0.1
pci2: <simple comms, UART> (vendor 0x10ec, dev 0x816b) at device 0.2
pci2: <serial bus> (vendor 0x10ec, dev 0x816c) at device 0.3
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfea00000-0xfea03fff,0xfea14000-0xfea14fff at device 0.4 on pci2
ehci0: pre-2.0 USB revision (ignored)
usbus0: EHCI version 1.0
usbus0 on ehci0
usbus0: 480Mbps High Speed USB v2.0
pci0: <encrypt/decrypt> (vendor 0x1022, dev 0x1578) at device 8.0
pci0: <multimedia, HDA> (vendor 0x1022, dev 0x157a) at device 9.2
ugen0.1: <0x10ec> at usbus0
uhub0: <0x10ec EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xfeb68000-0xfeb69fff at device 16.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus1 on xhci0
usbus1: 5.0Gbps Super Speed USB v3.0
ahci0: <AHCI-PCI-SATA> port 0xf100-0xf10f,0xf110-0xf113,0xf120-0xf127,0xf130-0xf133,0xf140-0xf147 mem 0xfeb6c000-0xfeb6c3ff at device 17.0 on pci0
ugen1.1: <0x1022> at usbus1
uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
ahci0: AE did not auto-clear!
uhub0: 1 port with 1 removable, self powered
uhub1: 8 ports with 6 removable, self powered
ahci0: AHCI 1.3 cap 0xf733ff00<S64A,NCQ,SSNTF,SMPS,SALP,SAL,SCLO,SPM,FBSS,PMD,SSC,PSC> cap2 0x0, 1 ports, 32 tags/port, gen 3 (6Gbps)
ugen1.2: <vendor 0x05e3> at usbus1
uhub2: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/60.52, addr 1> on usbus1
uhub2: MTT enabled
uhub2: 4 ports with 4 removable, self powered
ugen1.3: <Kingston> at usbus1
umass0: <Kingston DataTraveler 3.0, class 0/0, rev 2.10/1.10, addr 2> on usbus1
ahci0.0: FBS Cap detected: HW indicates support, enable succeeded
ugen1.4: <vendor 0x13ba> at usbus1
ukbd0: <vendor 0x13ba Barcode Reader, class 0/0, rev 1.10/0.01, addr 3> on usbus1
kbd2 at ukbd0
ahci0.0: PMPROBE(2) No Port Multiplier was found.
ahci0.0: FBS Cap detected: HW indicates support, enable succeeded
ahci0.0: PMPROBE(2) No Port Multiplier was found.
ahci0.0: Found SSD "INTEL SSDSC2CW180A3 400i" serial="CVCV2034019Y180EGN"
ahci0.0: tags=32/32 satacap=4706 satacap2=0002 satafea=004c NCQ=YES capacity=171705.02MB
ahci0.0: f85=7429 f86=b449 f87=6163 WC=enabled RA=enabling SEC=frozen
pci0: <serial bus, SMBus> (vendor 0x1022, dev 0x790b) at device 20.0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
ACPI: Enabled 1 GPEs in block 00 to 1F
aesni0: <AES-CBC,AES-XTS> on motherboard
padlock0: No ACE support.
rdrand0: <RdRand RNG> on motherboard
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
sio0: can't drain, serial port might not exist, disabling
sio1: can't drain, serial port might not exist, disabling
hpt27xx: no controller detected.
CAM: Configuring 2 busses
CAM: finished configuring all busses
da0 at ahci0 bus 0 target 0 lun 0
da0: <SATA INTEL SSDSC2CW18 400i> Fixed Direct Access SCSI-4 device 
da0: Serial Number CVCV2034019Y180EGN
da0: 150.000MB/s transfers
da0: 171705MB (351651888 512 byte sectors: 255H 63S/T 21889C)
da0: supports TRIM
da8 at umass-sim0 bus 0 target 0 lun 0
da8: <Kingston DataTraveler 3.0 PMAP> Removable Direct Access SCSI-6 device 
da8: Serial Number 60A44C4252A8BF916993010F
da8: 40.000MB/s transfers
da8: 14784MB (30277632 512 byte sectors: 255H 63S/T 1884C)
Mounting root from ufs:part-by-label/DragonFly_v5.9.0.706.g783aa.a
DMA space used: 6156k, remaining available: 131072k
Mounting devfs
ums0: <vendor 0x13ba Barcode Reader, class 0/0, rev 1.10/0.01, addr 3> on usbus1
ums0: 5 buttons and [XYZ] coordinates ID=1
ugen1.5: <Kingston> at usbus1
umass1: <Kingston DataTraveler 3.0, class 0/0, rev 3.00/1.10, addr 4> on usbus1
da9 at umass-sim1 bus 1 target 0 lun 0
da9: <Kingston DataTraveler 3.0 PMAP> Removable Direct Access SCSI-6 device 
da9: Serial Number 60A44C413C8CBF916985010A
da9: 400.000MB/s transfers
da9: 14784MB (30277632 512 byte sectors: 255H 63S/T 1884C)
hammer2_mount: '/dev/serno/CVCV2034019Y180EGN.s1d at ROOT'
hammer2_mount: dev="/dev/serno/CVCV2034019Y180EGN.s1d" label="ROOT" rdonly=0
hammer2: using volume header #0
hammer2 mount "/dev/serno/CVCV2034019Y180EGN.s1d":  no recovery needed
hammer2_mount: PFS label not found
HAMMER2: VOLDATA DUMP
HAMMER2: INITIATE SPANs
HAMMER2: CONN WAS TERMINATED
hammer2_unmount(A): devvp /dev/serno/CVCV2034019Y180EGN.s1d rbdirty 0 ronly=0
hammer2_unmount(B): devvp /dev/serno/CVCV2034019Y180EGN.s1d rbdirty 0
v-chain 0xfffff804f4aa04c0.255 0000000000000000/0 mir=0000000000000010
      [00002000] (?) refs=1
f-chain 0xfffff804f4aa0680.254 0000000000000000/0 mir=0000000000000010
      [00000000] (?) refs=0



More information about the Users mailing list