Sounds like something is keeping your fs busy. Could be gio-kqueue, do you have glib2 installed?
— Antoine > On 13 Jan 2020, at 06:01, Nick Holland <n...@holland-consulting.net> wrote: > > Hiya. > > I'd like to use amd(8) to automatically mount and dismount local file > systems. The file systems in question are big, lots of complicated > links, lots of files, and take a while to fsck if the power goes out > unexpectedly, and are used relatively rarely (maybe an hour a day). > Sounds like a perfect job for amd(8)! > > The file systems in question are mounted to /v/1 and /v/2 > > I've got the following set up: > > $ cat /etc/rc.conf.local > amd_flags=-l syslog -x all -c 10 -w 10 > lockd_flags= > portmap_flags= > > $ cat /etc/amd/master > /v amd.v > > $ cat /etc/amd/amd.v > 1 type:=ufs;dev:=/dev/sd2i > 2 type:=ufs;dev:=/dev/sd2j > > > AND....it works! > > start the system up, I get this: > > $ df > Filesystem 512-blocks Used Avail Capacity Mounted on > /dev/sd2a 1011676 203812 757284 21% / > /dev/sd2h 10319836 48 9803800 0% /home > /dev/sd2f 4136828 20 3929968 0% /tmp > /dev/sd2d 8264188 2369920 5481060 30% /usr > /dev/sd2e 2065116 2104 1959760 0% /usr/local > /dev/sd2g 4136828 64920 3865068 2% /var > amd:36583 0 0 0 100% /v > > $ ls /v/1/ > [...expected output from files and directories on that file system...] > > $ df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/sd2a 505838 83602 396946 17% / > /dev/sd2h 5159918 24 4901900 0% /home > /dev/sd2f 2068414 10 1964984 0% /tmp > /dev/sd2d 4132094 1280264 2645226 33% /usr > /dev/sd2e 1032558 1052 979880 0% /usr/local > /dev/sd2g 2068414 32572 1932422 2% /var > amd:92953 0 0 0 100% /v > /dev/sd2i 2106117872 298739480 1702072504 15% /tmp_mnt/dbu/v/1 > > Success!! > well...no. Seems it never umounts the amd file systems. And that is > basically the point of this exercise -- to increase the odds that a FS > isn't mounted when the power goes out. > > Am I doing something wrong? Do I have inaccurate expectations of > what amd(8) does with local file systems? > > Nick. > > OpenBSD 6.6-current (GENERIC.MP) #599: Sat Jan 11 18:52:00 MST 2020 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > real mem = 2038652928 (1944MB) > avail mem = 1964462080 (1873MB) > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root > bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xebd30 (52 entries) > bios0: vendor American Megatrends Inc. version "1020" date 12/15/2014 > bios0: PowerSpec V400 > acpi0 at bios0: ACPI 5.0 > acpi0: sleep states S0 S3 S4 S5 > acpi0: tables DSDT FACP APIC FPDT MSDM MCFG LPIT SLIC HPET SSDT SSDT SSDT UEFI > acpi0: wakeup devices XHC1(S3) PXSX(S4) PXSX(S4) PXSX(S4) PXSX(S4) PWRB(S0) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat > cpu0 at mainbus0: apid 0 (boot processor) > cpu0: Intel(R) Pentium(R) CPU J2900 @ 2.41GHz, 2417.12 MHz, 06-37-08 > cpu0: > FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN > cpu0: 1MB 64b/line 16-way L2 cache > cpu0: smt 0, core 0, package 0 > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges > cpu0: apic clock running at 83MHz > cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0.0.3.3, IBE > cpu1 at mainbus0: apid 2 (application processor) > cpu1: Intel(R) Pentium(R) CPU J2900 @ 2.41GHz, 2416.67 MHz, 06-37-08 > cpu1: > FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN > cpu1: 1MB 64b/line 16-way L2 cache > cpu1: smt 0, core 1, package 0 > cpu2 at mainbus0: apid 4 (application processor) > cpu2: Intel(R) Pentium(R) CPU J2900 @ 2.41GHz, 2416.69 MHz, 06-37-08 > cpu2: > FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN > cpu2: 1MB 64b/line 16-way L2 cache > cpu2: smt 0, core 2, package 0 > cpu3 at mainbus0: apid 6 (application processor) > cpu3: Intel(R) Pentium(R) CPU J2900 @ 2.41GHz, 2416.68 MHz, 06-37-08 > cpu3: > FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN > cpu3: 1MB 64b/line 16-way L2 cache > cpu3: smt 0, core 3, package 0 > ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 87 pins > acpimadt0: bogus nmi for apid 0 > acpimadt0: bogus nmi for apid 2 > acpimadt0: bogus nmi for apid 4 > acpimadt0: bogus nmi for apid 6 > acpimcfg0 at acpi0 > acpimcfg0: addr 0xe0000000, bus 0-255 > acpihpet0 at acpi0: 14318179 Hz > acpiprt0 at acpi0: bus 0 (PCI0) > acpiprt1 at acpi0: bus 1 (RP01) > acpiprt2 at acpi0: bus 2 (RP02) > acpiprt3 at acpi0: bus 3 (RP03) > acpiprt4 at acpi0: bus -1 (RP04) > acpiec0 at acpi0: not present > acpicpu0 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51), > C1(1000@1 mwait.1), PSS > acpicpu1 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51), > C1(1000@1 mwait.1), PSS > acpicpu2 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51), > C1(1000@1 mwait.1), PSS > acpicpu3 at acpi0: C3(10@1500 mwait.1@0x52), C2(10@500 mwait.1@0x51), > C1(1000@1 mwait.1), PSS > acpipwrres0 at acpi0: PLPE > acpipwrres1 at acpi0: PLPE > acpipwrres2 at acpi0: USBC, resource for EHC1, OTG1 > acpipwrres3 at acpi0: FN00, resource for FAN0 > acpitz0 at acpi0: critical temperature is 90 degC > acpicmos0 at acpi0 > acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000 > extent `acpipci0 pcibus' (0x0 - 0xff), flags=0 > extent `acpipci0 pciio' (0x0 - 0xffffffff), flags=0 > 0x70 - 0x77 > 0xcf8 - 0xcff > 0x10000 - 0xffffffff > extent `acpipci0 pcimem' (0x0 - 0xffffffffffffffff), flags=0 > 0x0 - 0x9ffff > 0x100000 - 0x7fffffff > 0xd0717000 - 0xffffffffffffffff > "DMA0F28" at acpi0 not configured > acpibtn0 at acpi0: PWRB > acpibtn1 at acpi0: SLPB > "INT33BD" at acpi0 not configured > "PNP0C0B" at acpi0 not configured > acpivideo0 at acpi0: GFX0 > acpivout0 at acpivideo0: DD1F > cpu0: using VERW MDS workaround > cpu0: Enhanced SpeedStep 2417 MHz: speeds: 2408, 2407, 2324, 2241, 2158, > 2075, 1992, 1909, 1826, 1743, 1660, 1577, 1494, 1411, 1328 MHz > pci0 at mainbus0 bus 0 > pchb0 at pci0 dev 0 function 0 "Intel Bay Trail Host" rev 0x0e > inteldrm0 at pci0 dev 2 function 0 "Intel Bay Trail Video" rev 0x0e > drm0 at inteldrm0 > inteldrm0: msi > ahci0 at pci0 dev 19 function 0 "Intel Bay Trail AHCI" rev 0x0e: msi, AHCI 1.3 > ahci0: port 0: 3.0Gb/s > ahci0: port 1: 3.0Gb/s > scsibus1 at ahci0: 32 targets > sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD80PURZ-85Y, 80.H> > naa.5000cca261cc252e > sd0: 7630885MB, 512 bytes/sector, 15628053168 sectors > sd1 at scsibus1 targ 1 lun 0: <ATA, WDC WD80PUZX-64N, 80.H> > naa.5000cca3b7c55b78 > sd1: 7630885MB, 512 bytes/sector, 15628053168 sectors > xhci0 at pci0 dev 20 function 0 "Intel Bay Trail xHCI" rev 0x0e: msi, xHCI 1.0 > usb0 at xhci0: USB revision 3.0 > uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 > addr 1 > "Intel Bay Trail TXE" rev 0x0e at pci0 dev 26 function 0 not configured > azalia0 at pci0 dev 27 function 0 "Intel Bay Trail HD Audio" rev 0x0e: msi > azalia0: codecs: VIA/0x4760, Intel/0x2882, using VIA/0x4760 > audio0 at azalia0 > ppb0 at pci0 dev 28 function 0 "Intel Bay Trail PCIE" rev 0x0e: msi > pci1 at ppb0 bus 1 > ppb1 at pci0 dev 28 function 1 "Intel Bay Trail PCIE" rev 0x0e: msi > pci2 at ppb1 bus 2 > ppb2 at pci0 dev 28 function 2 "Intel Bay Trail PCIE" rev 0x0e: msi > pci3 at ppb2 bus 3 > re0 at pci3 dev 0 function 0 "Realtek 8168" rev 0x0c: RTL8168G/8111G > (0x4c00), msi, address b8:ae:ed:34:f1:a7 > rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0 > pcib0 at pci0 dev 31 function 0 "Intel Bay Trail LPC" rev 0x0e > ichiic0 at pci0 dev 31 function 3 "Intel Bay Trail SMBus" rev 0x0e: apic 1 > int 18 > iic0 at ichiic0 > spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600 SO-DIMM > isa0 at pcib0 > isadma0 at isa0 > pckbc0 at isa0 port 0x60/5 irq 1 irq 12 > pckbd0 at pckbc0 (kbd slot) > wskbd0 at pckbd0: console keyboard > pcppi0 at isa0 port 0x61 > spkr0 at pcppi0 > it0 at isa0 port 0x2e/2: IT8728F rev 2, EC port 0xa40 > vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation) > efifb at mainbus0 not configured > uhub1 at uhub0 port 2 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" > rev 2.00/32.98 addr 2 > vscsi0 at root > scsibus2 at vscsi0: 256 targets > softraid0 at root > scsibus3 at softraid0: 256 targets > sd2 at scsibus3 targ 1 lun 0: <OPENBSD, SR RAID 1, 006> > sd2: 7577604MB, 512 bytes/sector, 15518933033 sectors > root on sd2a (ec7ef108fc3d18e6.a) swap on sd2b dump on sd2b > drm:pid0:connector_bad_edid *WARNING* HDMI-A-2: EDID is invalid: > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > inteldrm0: 1024x768, 32bpp > wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0 > wsdisplay0: screen 1-5 added (std, vt100 emulation) >