Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2006 01:38:37 +0100
From:      "Frans-Jan v. Steenbeek" <frans-jan@van-steenbeek.net>
To:        freebsd-questions@freebsd.org
Subject:   mount/umount UFS2 on DVD+RW
Message-ID:  <200612070138.37380.frans-jan@van-steenbeek.net>

next in thread | raw e-mail | index | archive | help
Hi folks!

I have a small problem that bugged me the last days: I made a UFS2 filesystem 
on a DVD+RW (which can act like a RAM-disk). After some troubles it worked. I 
used the following commands to achieve this:

# dvd+rw-format /dev/cd0
# bsdlabel -w acd0
# newfs -n /dev/acd0
# mount -o noatime /dev/acd0 /mnt/ufs

I gathered that atapicam can get nasty with UFS2 on DVDs, so that is why I 
resorted to use /dev/acd0. The symptoms where the same, but it proved handy 
with regards to /etc/fstab and fsck.

Problem one: between each step I have to reload the DVD (eject and close the 
drive). Otherwise it gives IO errors. 'camcontrol eject cd0' refuses (Error 
received from stop unit command), 'cdcontrol eject' does nothing (no errors). 
It has to be done by hand.

Second problem: when I unmount the disk and mount it again later, it refuses 
to do so since the filesystem isn't marked clean. So to mount it I have to go 
through:

# fsck /dev/acd0
#mount -o noatime /dev/acd0 /mnt/ufs

Again, I need to reload it between these steps.

The reloading bugs me a bit, but that might be the devices firmware, or maybe 
atapicam having a hold on the drive (it keeps in spinning state for a few 
minutes after activity, while it relatively spins down soon after mount).
What really bugs me is that the umount seems not to mark it as clean. Why is 
that? I noted that the lights on the drive don't come on when umount is busy, 
allthough the drive does spin up.

What I also would like to ask, is there a way to further minimize the amounts 
of writes on the disk? I gathered that turning on softupdates can trigger 
panics, which might also have something to do with atapicam. Any other 
techniques?

Short summary of oddities / questions:

1. Drive-reloading between actions: device not freed?
2. FS not marked clean on umount.
3. How to reduce writes?

Thanks in advance. I'm not subscribed, so please CC me.

-- 
Frans-Jan v. Steenbeek
frans-jan@van-steenbeek.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612070138.37380.frans-jan>