Sunday, May 4, 2014

Raspberry Pi - sdcard, usb sticks, swap

After reading a lot through Google Plus, elinux and raspberry pi forums, its clear that F2FS is a must for sdcards along moving /var /tmp outside of the sdcard.

I've bought 2 - 8 GB USB sticks for my PI, i'm using The Pit Hut Usb Hub

One of them has a 512 MB partition that will be used for SWAP and another partition used for /var ; the other USB stick uses F2FS and its whole purpose is to mount /tmp

They are mounted at each startup using /etc/fstab for the whole file

The thing is that each partition on USB sticks has a unique UUID that you can get with 'sudo blkid'

With this setup you'll take care of your sdcard writing only on USB sticks or external HDD, always remember that if you want any logs or your programs write any log files, be sure that they are written on /var or your sdcard may die.

For more information on swap partitioning

1 comment: