Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

It turns out a German company named Altec developed a drive and software for writing to Sandisk WORM devices. The device looks like (but I'm not sure) just a typical USB SD card reader. The software, however, is interesting. It somehow can write and update files in a WORM version of FAT that might even mount as an ordinary FAT FS.

They open sourced bits of their code (in the event they or the technology disappears, and the technology did). There's a file named WormHugeFile.cpp with implementation details for the WORM bit of all this. Basically, Sandisk created vendor-specific SCSI opcodes for WORM operation. You can query the device to see if it's a WORM device, switch it between WORM and ROM mode, open and close it for WORM writing, and mark it as read-only.

Out of the box, these cards seem to be in "ROM" mode and act like normal SD cards.

As for the UDF bits, UDF does support WORM media, but the Linux UDF driver driver doesn't currently have that support; it sees a UDF FS in WORM mode as a RW UDF FS.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.