1

I'm thinking that micro SD-cards, because of their high storage density, are probably especially susceptible to bit rot. So I thought I might give ZFS a try. (I'm open to alternatives..) However, I also read somewhere (can't find the link anymore) that SD-cards often come with somehow specially aligned filesystem formats from the vendor and therefore should never be formatted if not absolutely needed.

(I read this question about flash filesystems but in the comments it says it makes only sense to use block-level filesystems on SD-cards, since they emulate a block-level device in hardware.)

Any advice or links? I'm on Mac OS X and my Kingston micro SD-card is currently exFAT formatted by the vendor. I'll use to hold my iTunes library and a few rarely-accessed files.

mb21
  • 223
  • 2
  • 9
  • I don't exactly remember where, but I found some "tuning" guides for SD cards, to determine the erase block size and the like. Still, ZFS is copy-on-write, so you'll waste quite some write cycles. – Daniel B Feb 25 '14 at 12:27
  • ZFS is not properly supported by OS X (the best I have seen is beta level - as of feb-2014). – Ouki Feb 25 '14 at 13:53
  • @Daniel B yeah, you know a filesystem better suited for SD-cards? – mb21 Feb 25 '14 at 14:25
  • @Ouki https://code.google.com/p/maczfs ? – mb21 Feb 25 '14 at 14:29
  • 1
    Sure, FAT32. It's in the specs, so it must be good, right? ;) I presume SD cards are too high-level for most of the more (flash-)specific file systems out there. Not that OS X supports any of them, mind you. – Daniel B Feb 25 '14 at 14:31
  • @mb21: I don't call that recent: "zpool version 8 and zfs version 2". The best I have seen so far is [github.com/zfs-osx](https://github.com/zfs-osx). This is still far from end user level. – Ouki Feb 25 '14 at 17:57
  • 1
    Assuming that ZFS can operate on an SD card (I don't know) then it will be able to detect bit rot but it will only be able to repair it if your SD card is part of a redundant pool (multiple SD cards?) or you have set copies=2 on a non-redundant single-drive pool. – Mike Fitzpatrick Feb 25 '14 at 23:08
  • @Ouki I'm more interested in a stable filesystem, not the most recent dev-version. But Mike is right, I didn't think about `copies=2` halving the space on the drive 8) – mb21 Feb 26 '14 at 10:18
  • @mb21 Either way, the best you can got around here for Mac OS X and ZFS is beta. If you want stable ZFS, go for Solaris-like, FreeBSD or maybe Linux. – Ouki Feb 26 '14 at 11:23
  • @MikeFitzpatrick This might sound stupid, but what about splitting the SD card into several VDEVs and doing RAIDZ on those? – mb21 Mar 03 '14 at 11:19
  • 1
    That might be feasible but RAIDZ will increase the amount of writing to the SD card which may reduce their lifespan. If the data won't change often this this might not be an issue. Personally I wouldn't go down this path. If I was going to use ZFS on SD cards then I'd use simple ZFS pools and use **two** cards, each an independent copy of the other (synced occasionally with `rsync` or `zfs send`). If any bit rot was detected with `zpool scrub` then I'd simply copy the offending file(s) from the other card. – Mike Fitzpatrick Mar 03 '14 at 22:29
  • @MikeFitzpatrick You could also use a zraid 1 on the two cards. `zpool scrub` detects and corrects any bit rot. – FUZxxl Jul 18 '17 at 19:56
  • @FUZxxl, a ZFS **mirror** pool of 2 SD cards is also possible and `zpool scrub` would work as you say. RAIDZ1 uses parity and requires a minimum 3 devices. – Mike Fitzpatrick Jul 19 '17 at 00:04

0 Answers0