I received my Omnia yesterday. I plan to install my 512GB Corsair mSATA SSD before turning it on and doing my initial setup. Any setup comes down to the devil in the details. I’d rather make the best choices first on the initial setup of the SSD.
Questions:
1/ What the max size mSATA that can be installed?
2/ What is the preferred formatting. EXT4? NTFS? FAT32? what are the trade offs here.
3/ Partitioning. What’s our limit here.
4/ Can we partition and Format from Telnet or SSH? Or is better to set the drive up
from an external Linux / GPARTED and just plug it in?
5/ SSD optimization tools for a given filing system? This is important. Take NTFS and say windows
Windows 7 and above drivers clear up free blocks on and SSD to keep drive speed up over time.
Do we have any SSD optimization tools that can be installed to run in a time based manner
to optimize the SSD for a given filing system? What are they called for reference?
Congratulations and welcome to the club of Omnia owners
1: Max size has all to do with filesystem, so if you use ext4 for example, if i am not wrong it was up to 16 TB per partition size.
2: I am also busy with this part, but as openWRT is Linux and you are planning to put a mSATA (internal hd) in the Omnia, so just forget about NTFS and FAT32. Rather go use BTRFS or EXT4.
3: Turris OS, is somehow different then openWRT, so for now we are or i better should say i am walking in the darkness about certain things. More research from my side is needed.
4: I put my mSATA drive in and just use “fdisk”. There you can create/delete/format/etc. etc. For formatting for example ext4, just
mkfs.ext4 /dev/sdX
(X being the letter and number of the partition) So if you have sda1 it would be
mkfs.ext4 /dev/sda1
Do remember that you have to create the partition first in fdisk, it is rather simple. If you still need help, you know where to find the forum :).
5: I myself have a Samsung 850 EVO, and the drivers are already within the Linux kernel. “fstrim”, i haven’t configured this yet. For clearing things.
When selecting mSATA drive see also the power ratings for it. I would be careful to go over 3.6W. Drives with larger power ratings might work but if you have issues on the drive or the system then one source for those might be power related.
Some Linux filesystems already support TRIM operation so you don’t need to run fstrim for them. Check the filesystem’s manual for details and if you need to enable TRIM or if it is enabled on default for SSDs. For ext4 there is “discard” option that enables TRIMs.
On 32-bit architectures, the limit is 16 TB indeed. For anything above that, you need 64-bit CPU, i.e. not Omnia.
Support for the discard option is not in the Omnia kernel (trying to mount the filesystem with it will fail). There’s no fstrim standalone command either. See also this issue.
I cannot find any official material that confirms this. All texts I could find says that ext4 supports 1 EB. There are no references that CPU architecture has any relevance on that.
Although some years ago there were issues reported that many of the ext2/3/4 tools didn’t have support for 64bit ext4 disk layout. At least mkfs has been fixed to support 64bit ext4.
And if I test with Turris Omnia: I can successfully create ext4 filesystem with 64bit layout and mount it:
% mkfs.ext4 -O 64bit abc
mke2fs 1.42.12 (29-Aug-2014)
abc contains a ext4 file system
created on Fri Nov 25 00:54:33 2016
Proceed anyway? (y,n) y
Discarding device blocks: done
Creating filesystem with 64000 1k blocks and 16000 inodes
Filesystem UUID: 3c5d13b5-494f-4c69-a68d-dadf0e32e028
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
I’m talking from experience. I have a Synology NAS, with Marvell Armada XP SoC (similar to SoC in Omnia), that has exactly the same problem. Digging a bit more, it does not have 64-bit flag.
Now this is a good news. It was failing three weeks ago and it is not failing anymore. Good catch!
root@K-Router:/srv/lxc/K-Router-LXC# fdisk /dev/sda
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x12774218
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4196351 4194304 2G 83 Linux
/dev/sda2 4196352 843057151 838860800 400G 83 Linux
The LXC mount is not really within LXC, but is just a mounted partition. I can also put other stuff on it if i wanted. If you have anymore questions do ask.
All primary btw.
/srv/ partition du…
root@K-Router:/srv# du -h
4.0K ./lxc/K-Router-LXC
12.0K ./lxc
12.0K .
Thanks @Big_boss! That’s exactly what we did (only on a weekly basis though). Two additional questions:
You recon it must be done every day? I’ll be running servers in my containers such as: a mailserver / pihole / ftp / nexcloud etc. but only for a very few users.
If BTRFS is used does running fstrim on the root “directory” suffice*, or should it be run on each subvolume separately?
Thanks for your (or anyone’s) reply!
P.S. *if I understand this unix stackexchange correctly I think it suffices to only fstrim the main (or any even) volume in the storage pool.
Well in the past i also used it on weekly basis, however later on got a good argument to have fstrim just daily. It doesn’t do any damage as far as i know and things will keep being fast. While you would have to wait for the week to end for fstrim to take effect. You might don’t write data for lets say 5 weeks, but week 6 just after the “weekly job”, you do the writing and heavily. This will then have to wait until the week is over, while daily well you get the picture.
fstab? you mean fstrim? Well i believe you can only apply it on the root directory only. So in my case i have 2 partitions. LXC and majordomo. That is also what you see there.
I am also right now having Nextcloud on the Ubuntu 16.04 LXC, works wonderful, soon hopefully i will also try running pihole on it.
BTW, i have mariaDB 10.x running, that is oke, however i also have php 7.0 and php7.1 installed, but strangely phpmyadmin doesn’t recognize php7.1 and also Nextcloud uses php7.0 instead of php7.1. I am kind of lazy at the moment but also hopefully soon will dig in to see what is the problem. I though i’ll let you know.
Ok if it indeed doesn’t hurt, why not do it each day (or night at 03:00), got it! Thanks! Will look for second opinions.
Yah root directory I get. But I make extensive use of multiple subvolumes (which are represented as directories but in fact are separate instances of the file-system). I think your answer would still apply (I think fstrimming the root volume is enough, but I am (still) unsure. Can anyone confirm?
Kewl we got that on our list too first some more basiscs though!
You should Peace of cake (we had it up and running withing 15 minutes - without exaggerating). But it seems to have some resolving troubles which have to be cleared before I can use it on a dailt basis (but I forgot the details for now).
I know that feeling and yes please let us know (as stated before we are planning on running Nextcloud too soonish).
Yeah, i think getting the root directory will include the rest.
Just find some good tutorial that guides you using all those steps. There are some very SHALLOW tutorials but some are just a BIT more in depth regarding for example MariaDB and PHP7.
I do recommend to use MariaDB instead of Mysql. Mysql just like openOffice is slowly dying. Al you needs to install with PHP7 some necessary extentions to get Nextcloud working, but you will see it when you are installing it.
I mostly use it to upload some pictures and upload them to other places using laptop but also use “Grauphel” to get my grocery list of what to buy when i am at the shop. In combination with “Tomboy” (on my Linux Ubuntu Desktop), this is ideal and Tomdroid on Android. In Synchronizes perfectly.
About laziness, take your time…the biggest issue we had was getting our Omnia :P. Which we now have. About hardware changes i have also done the necessary tweaking already (replaced 2.4 Ghz with a very strong wifi-card) and the SSD off course. Now it is all about the software side.