Wednesday, May 31, 2023

Re: NFS mounted but shows nothing even df -h has it

Thanks for all the help. Hereby is the result of command `disklabel
sd0`, seems the drive is well detected by failed mounted:

> $ doas disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: SAMSANG ST1000LM
duid: 2b6c2b5b929f9a55

16 partitions:
# size offset fstype [fsize bsize cpg]

c: 1953525168 0 unused
i: 1758185664 64 4.2BSD 8192 65536 52270 # /mnt/hdd

On Wed, May 31, 2023 at 7:56 PM Otto Moerbeek <otto@drijf.net> wrote:
>
> On Wed, May 31, 2023 at 11:21:15AM +0100, Zé Loff wrote:
>
> > On Wed, May 31, 2023 at 05:25:07PM +0800, Jazzi Hong wrote:
> > > You made the point, thank you Maksim.
> > > I checked /mnt/hdd and nothing there.
> > > > # cat /etc/fstab
> > > 1593ab2ee369c420.b none swap sw
> > > 1593ab2ee369c420.a / ffs rw 1 1
> > > 1593ab2ee369c420.e /var ffs rw,nodev,nosuid 1 2
> > > 2b6c2b5b929f9a55.i /mnt/hdd ffs rw,noexec,nosuid,nodev 0 0
> > > > # doas sysctl hw.disknames
> > > hw.disknames=sd0:2b6c2b5b929f9a55,sd1:1593ab2ee369c420
> > > > # doas fdisk sd0
> > > Disk: sd0 geometry: 121601/255/63 [1953525168 Sectors]
> > > Offset: 0 Signature: 0xAA55
> > > Starting Ending LBA Info:
> > > #: id C H S - C H S [ start: size ]
> > > -------------------------------------------------------------------------------
> > > 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
> > > 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
> > > 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
> > > *3: A6 0 1 2 - 121601 80 63 [ 64: 1953525104 ] OpenBSD
> > > ============
> > > So /dev/sd0 is my NFS share hard disk, and when I tried to mount it manually:
> > > > # doas mount /mnt/hdd
> > > mount_ffs: 2b6c2b5b929f9a55.i on /mnt/hdd: Invalid argument
> > > +++++++++++
> > > The error message mentioned about "Invalid argument" of mount, anything wrong?
> > > So the problem now is why can not mount the drive even it's detected?
> >
> > It can detect the drive, but it doesn't find the i partition. What does
> > disklabel sd0 say?
>
> Or it can find the i partition but mount_ffs does not like it for some reason.
> By convention i partitions are often FAT. But we need the dislabel to
> see what type it has.
>
> -Otto



--
jazzi

Best Regard,

Re: [new] sysutils/lsblk

On Tue, 30 May 2023 17:28:00 +0200, Benjamin Stürz wrote:

> lsblk(8) is a simple tool to list attached block devices.
> This specifically is a clone of the one in util-linux.
>
> This is actually my second attempt of submitting this port.
> This time I reworked most of it, fixed all bugs (hopefully :),
> incorporated feedback, added a few options and a manual,
> and added support for RAID through bio(4).

NOK, lsblk SegFault on openbsd-current/amd64 (VM with VirtualBox on Linux/
Debian)

$ doas /usr/obj/ports/lsblk-1.2.3/fake-amd64/usr/local/sbin/lsblk
Segmentation fault

Excerpt of my dmesg: only one disk wd0

OpenBSD 7.3-current (GENERIC) #1143: Mon May 22 08:36:54 MDT 2023
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 2130640896 (2031MB)
avail mem = 2046590976 (1951MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xe1000 (10 entries)
bios0: vendor innotek GmbH version "VirtualBox" date 12/01/2006
bios0: innotek GmbH VirtualBox
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC SSDT
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3399.94 MHz, 06-3c-03
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,RDRAND,NXE,RDTSCP,LONG,LAHF,ABM,ITSC,FSGSBASE,BMI1,AVX2,BMI2,INVPCID,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/
line 8-way L2 cache, 8MB 64b/line 16-way L3 cache
cpu0: smt 0, core 0, package 0
(...)
cpu0: using Broadwell MDS workaround
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371AB IDE" rev 0x01: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide0 channel 0 drive 0: <VBOX HARDDISK>
wd0: 128-sector PIO, LBA, 40960MB, 83886080 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2

Laurent