Wednesday, May 31, 2023

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

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

Re: netstat: vfprintf %s NULL in " %2d %-5.16s"

On 2023-05-31, Benjamin Stürz <benni+openbsd@stuerz.xyz> wrote:
> Hi misc@,
>
> while scrolling through my /var/log/messages I found this entry:
> netstat: vfprintf %s NULL in " %2d %-5.16s"
>
> I tracked down the issue to line 278 of /usr/src/usr.bin/netstat/show.c:
>> printf(" %2d %-5.16s", rtm->rtm_priority,
>> if_indextoname(rtm->rtm_index, ifbuf))
> It appears to me that if_indextoname(3) returns NULL for some reason,
> and that this isn't being checked.
>
> Is this intentional? Or did I find a minor bug?

I'd guess at a race, probably the route was pointing at a virtual
interface that was removed during printing of the route table.