User Tools

Site Tools

LXC containers on mSATA drive

Turris offers the possibility to create virtual installations using LXC containers. It is useful for isolation of basic networking functionality of router from other functionalities or experiments. This simple tutorial describes, how to set installation of LXC containers on the mSATA disk, which is recommended for not to wear out the internal FLASH memory.

Installation of mSATA disk

  • Hardware installation of the new mSATA disk is perfectly described in this videotutorial.
  • Partition the new disk as you need by the fdisk /dev/sda command using SSH console after the hardware disc installation follow this instruction partition a disk.
  • Use mkfs.ext4 for creation of filesystem on the new partitions (for example mkfs.ext4 /dev/sda1) follow this instruction format a partition.

Mounting of the disk

Mount can be done on the command line or via the LuCI GUI interface.

  • Find the UUID of chosen partition by blkid /dev/sda1 command
  • Edit the /etc/config/fstab file and insert new config mount section below the config global section. The content of the new section should be:
config mount
        option uuid 'your-partition-uuid-number-here'
        option enabled '1'
        option target '/srv/lxc'
  • Save the file and restart the router
  • Login to SSH and take a look at the output of the mount command. You should see your /dev/sdaX partition mounted on /srv/lxc, the place where router installs LXC containers by default. Also you should see it using LuCI under the menu System.
  • Then you can begin with the LXC containers installation exactly as described in the LXC howto and the containers will be placed on your mSATA drive.