Solved Not unmounted properly

Code:
FreeBSD kif 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Code:
root@kif:~/bin # cat /etc/fstab
# Device        Mountpoint      FStype      Options         Dump    Pass#
/dev/ada0p2     /                     ufs          rw              1       1
/dev/ada0p3     none               swap      sw              0       0
/dev/cd0           /var/mnt/dvd  cd9660  ro,noauto       0       0
/dev/da0p1       /var/mnt/rdx   ufs         rw,noauto       0       0

I have an Tandberg RDX drive installed which I used for backups.
Every time I mount it, I get the error on console that it was not unmounted properly.

Any ideas where I should begin to look?
 
I always unmount it.
umount /var/mnt/rdx

I get no errors...

Code:
root@kif:~/bin # fsck -n /var/mnt/rdx
** /dev/da0p1 (NO WRITE)
** Last Mounted on /var/mnt/rdx
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
11191 files, 22252995 used, 53433136 free (1376 frags, 6678970 blocks, 0.0% fragmentation)

It's always fine...

The mystery is deep!
 
Always run fsck(8) on unmounted filesystems. If there are issues fsck(8) can't fix them if the filesystem is mounted.

It shouldn't happen but is it possible there's still something writing to the disk when you unmount it? The system should prevent that but it may be happening. Try issuing a couple of sync(8) commands before umounting it.
 
Code:
root@kif:~/gpg.d # mount
/dev/ada0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
root@kif:~/gpg.d # fsck /var/mnt/rdx
** /dev/da0p1
** Last Mounted on /var/mnt/rdx
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
11191 files, 22252995 used, 53433136 free (1376 frags, 6678970 blocks, 0.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****
 
So the file system is currently unmounted (see output of mount above). Itis clean (see output of fsck above). When you mount it again, you should not get the warning about "not unmounted". If you do, then unmount and mount it again, and now it should be clean.

If it isn't, then either I'm wrong, or there is a bug in the UFS implementation.
 
So, it did go away.
So what I gather is that if, for any reason, I get this message again I should simply unmount the filesystem, run fsck on it, and then remount.
thanks guys.
 
Back
Top