I'm looking into getting some Sandisk 1GB WORM SD cards for archiving things. I assume they appear to the OS as a block device (they're SD, after all). I noticed that mkudffs supports a worm media type. I tried testing this with a file:
# dd if=/dev/zero of=worm.img bs=1M count=16 # mkudffs --blocksize=512 --media-type=worm worm.img # mount -o loop worm.img /mnt/worm/
But the filesystem isn't enforcing WORM:
/mnt/worm# dd if=/dev/urandom of=foo dd: writing to `foo': No space left on device 31329+0 records in 31328+0 records out 16039936 bytes (16 MB) copied, 1.27185 s, 12.6 MB/s /mnt/worm# rm foo /mnt/worm# dd if=/dev/urandom of=bar dd: writing to `bar': No space left on device 31329+0 records in 31328+0 records out 16039936 bytes (16 MB) copied, 1.19381 s, 13.4 MB/s
If the FS actually enforced WORM, delete might work, but I wouldn't be able to write 16 MB twice.
So my questions:
- Would a WORM SD really just appear as a block device? Would writes to already-written blocks fail? Would empty blocks just be zeros?
- Am I misunderstanding what UDF WORM is supposed to do?
- Would UDF WORM work if I had an actual WORM device? Is there a way to test this with a loopback device?
- Any other suggestions for doing this? Finding 100-year media I trust is tricky