Re: NFS mounted but shows nothing even df -h has it
Fixed, thanks Otto. I checked this drive and found an error of "BAD SUPER BLOCK: MAGIC NUMBER WRONG", it's fixed in the end. So I changed the last option of the fstab file from ZERO to TWO thus the command fsck can check it automatically. Thank you all for the great help, I am so happy my little NAS works again. The OpenBSD community is so helpful and there are so many nice people here, hopefully I can serve you all a cup of the tea I made from the mountain, actually I am making tea today. > $ doas fsck -v -t ffs sd0i start sd0i wait fsck_ffs sd0i ** /dev/sd0i (sd0i) BAD SUPER BLOCK: MAGIC NUMBER WRONG LOOK FOR ALTERNATE SUPERBLOCKS? [Fyn?] y USING ALTERNATE SUPERBLOCK AT 256 ** File system is already clean ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE? [Fyn?] y 32580 files, 68466851 used, 40554992 free (312 frags, 5069335 blocks, 0.0% fragmentation) UPDATE STANDARD SUPERBLOCK? [Fyn?] y * FILE SYSTEM WAS MODIFIED * === Check the drive after fsck === ibox$ doas mount /mnt/hdd ibox$ ls /mnt/hdd Book Picture??? On Wed, May 31, 2023 at 10:41 PM Otto Moerbeek wrote: > > On Wed, May 31, 2023 at 10:25:06PM +0800, Jazzi Hong wrote: > > > 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: 19535251680 unused > > i: 1758185664 64 4.2BSD 8192 65536 52270 # /mnt/hdd > > In your fstab, sd0i is marked ar "do not run fsck on it" (last zero in > its fstab line). That is bad. > > Try running fsck on sd0i. It might be that the filesystem is damaged > so mount does not like it, but fsck still has a chance to repair it. > > -Otto > > > > > On Wed, May 31, 2023 at 7:56 PM Otto Moerbeek 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, -- jazzi Best Regard,
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: 19535251680 unused i: 1758185664 64 4.2BSD 8192 65536 52270 # /mnt/hdd On Wed, May 31, 2023 at 7:56 PM Otto Moerbeek 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: NFS mounted but shows nothing even df -h has it
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? Thank you, jazzi On Wed, May 31, 2023 at 2:38 PM Maksim Rodin wrote: > > The /mnt/hdd partition on your NFS server might just be not mounted > which does not prevent nfs service from successfully serving an empty > directory. > Or one of your two nfs clients might have deleted all your files and you > did not notice this. > > On Wed May 31 09:27:04 2023, Maksim Rodin wrote: > > Hello, > > Silly question but... > > Are you sure that your NFS server still has any files on /mnt/hdd? > > > > On Wed May 31 09:07:15 2023, Jazzi Hong wrote: > > > Hello, > > > > > > I have OpenBSD 7.2 installed and NFS service running on Cubieboard2, > > > one Linux client and one MacOS client, everything works fine for the > > > last 6 months. > > > > > > Yesterday as usual I mounted NFS share and showed mounting > > > successfully even command `df -h` got it, but `ls /Users/jazzi/nfs` > > > showed nothing. Tried on both Linux and MacOS. > > > > > > OpenBSD is 24*7 running and I didn't do anything to change the system, > > > maybe it's too hot so I shut it down for the whole night and power on > > > the next day but it didn't work. > > > > > > +++ > > > Here is how I mount it on MacOS: > > > > > > > sudo mount -t nfs -o > > > > resvport,async,nolocks,locallocks,soft,wsize=32768,rsize=32768 > > > > 192.168.31.231:/mnt/hdd /Users/jazzi/nfs > > > > > > +++ > > > Here is the settings on OpenBSD NFS server: > > > > > > # $ cat /etc/exports > > > > > > # For Macbook Air > > > /mnt/hdd -alldirs -mapall=root 192.168.31.76 > > > > > > # For Linux desktop > > > /mnt/hdd -alldirs -mapall=root 192.168.31.77 > > > > > > > > > > > > Any help will be appreciated, thank you. > > > > > > > > > > > > -- > > > jazzi > > > > > > Best Regard, > > > > > > > -- > > С уважением, > > Родин Максим > > -- > С уважением, > Родин Максим -- jazzi Best Regard,
NFS mounted but shows nothing even df -h has it
Hello, I have OpenBSD 7.2 installed and NFS service running on Cubieboard2, one Linux client and one MacOS client, everything works fine for the last 6 months. Yesterday as usual I mounted NFS share and showed mounting successfully even command `df -h` got it, but `ls /Users/jazzi/nfs` showed nothing. Tried on both Linux and MacOS. OpenBSD is 24*7 running and I didn't do anything to change the system, maybe it's too hot so I shut it down for the whole night and power on the next day but it didn't work. +++ Here is how I mount it on MacOS: > sudo mount -t nfs -o > resvport,async,nolocks,locallocks,soft,wsize=32768,rsize=32768 > 192.168.31.231:/mnt/hdd /Users/jazzi/nfs +++ Here is the settings on OpenBSD NFS server: # $ cat /etc/exports # For Macbook Air /mnt/hdd -alldirs -mapall=root 192.168.31.76 # For Linux desktop /mnt/hdd -alldirs -mapall=root 192.168.31.77 Any help will be appreciated, thank you. -- jazzi Best Regard,