I have an LXC on internal memory at the moment …I have no recollection of being advised this was in the category “under no circumstances do this”
I have just plugged a USB stick in to the rear port of my Omnia and I would like to move the LXC to this device.
Some advice please:
What format should I use on the flash stick (ext2 ?)
How do I move the LXC from internal memory to the USB stick …I have done a lot of random tweaking to the VM over the last year-or-so and really don’t want to start all over again.
We recommend Btrfs Well problem is not LXC itself but how are the distributions inside usually behaving - OpenWRT is optimized to limit flash write, while normal distributions don’t care a many people don’t realize it. Currently in 3.10 we are testing storage plugin that will help you move containers on external flash drive with few clicks in WebUI. In general, you need to format flash drive, make sure it is mounted before LXC tries to start and move data there using either tar or rsync with appropriate options (like numeric ids, preserving rights etc).
If you’re comfortable with using the command line, you can ssh into your router and set this up fairly simply.
While @miska recommends btrfs, I cannot. From what I’ve read, it is still really not ready for production use.
I recommend formatting the disk as ext4 for now, then when you mount it, you should use the UUID and not the device name since with USB, if you have multiple usb storage devices, the device name can change. You should see a section like this in /etc/config/fstab:
…and this: # mount /dev/mmcblk0p1 on / type btrfs (rw,noatime,ssd,space_cache,commit=5,subvolid=263,subvol=/@)
I concluded that btrfs is stable, and the driver in the Omnia is trusted.
However, I’ve found an interesting problem…
I formatted the partition with: # mkfs.btrfs -L USB-Omnia -U 1ABE11ED-B7F5-C0DE-DA7A-B007AB1E0001 /dev/sda2 # btrfs filesystem show Label: ‘USB-Omnia’ uuid: 1abe11ed-b7f5-c0de-da7a-b007ab1e0001 Total devices 1 FS bytes used 384.00KiB devid 1 size 26.03GiB used 2.02GiB path /dev/sda2
But the UUID being detected by, well, everything, especially Luci is some other random hex string! [shrug]
I also mounted the partition with the option “noatime” to prevent abusive writes which will trash the flash stick …this will also be beneficial on ext filing systems
I also took the opportunity to add a vfat partition on the front of the flash stick …but I have been unable to convince the Omnia to mount it …either CLI or WebGUI …But I guess that’s another thread
Thanks again for fast, good quality help.
BC
PS. I did try and install the new plugin …but I failed at working out how to install the plugin (or, for that matter, any plugin)
the plugin is only available in 3.10, for that you have to be in RC channel and upgrading the whole system will install it anyway by iself, then you will have a Storage option in the main menu.
But it is better is you are waiting until it will be pushed out from RC into the main stable release