mount/umount UFS2 on DVD+RW

Frans-Jan v. Steenbeek frans-jan at van-steenbeek.net
Wed Dec 6 16:38:41 PST 2006


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 at van-steenbeek.net


More information about the freebsd-questions mailing list