Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
do you find a solution for WORM SD card? I'm looking for it. – Tobia Feb 5 at 18:55

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .