Creating and mounting a partition lager than 2 TB in Linux
4.62 (92.31%) 13 votes
This might be basics for some, but it’s a good thing to have bookmarked for the day you might need it. It helped me a lot.
Why can I only use 2 TB (TeraByte) of my 2+ TB drive in linux?
The answer is really simple. I guess you formatted the drive using “fdisk” which use a ms-dos partition table.
MS-dos partition table (MBR) is 32 bit, and thereby it can’t handle anything above 2 TeraBytes
How to create a partition above 2TB in linux
To fully use your 2+TB harddrive, you have to use a partition table that supports it. We now know that the MS-DOS partition table (MBR) does not, so what should you use instead? GPT.
GPT supports up to 9.4 ZB (ZetaByte). That’s 9895604649984 GB (GigaByte)!. It’s pretty safe to say, that you will not hit this limit in the near future.
Finding folder size with du and disk space left with df in Linux
2 (40%) 3 votes
This post will explain two commands every linux user need to know. Every Linux user is going to use these at one point in their life, and it is usually for when the shit has hit the fan and your server is out of diskspace and you have to find the source of the problem.
How to configure a distributed file system with replication using GlusterFS
3.67 (73.33%) 3 votes
Distributed file system between multiple servers is a thing I have planned for a long time, but I never got around to it because I first had to find the right filesystem for it.
After a lot of research, I found that GlusterFS was the right file system for me.
My plan was to use a distributed filesystem to share the content of my webservers to make sure all my webservers had the same content on their pages at all time and using some sort of high availability to make sure the content was always there.
To this I used a tool in Linux called Lsyncd before I set up my GlusterFS cluster, this worked well and did live syncing of all the servers using rsync. But there was one problem with it.
If I uploaded a lot of files (20+) to one webserver, and it started to sync to the other webserver before I was finished copying, the result would be that some of the files ended up corrupt, and this was a problem for me!
My distributed file system overview
Here is the overview of the setup I am making, it’s not pretty but I’m sure it’s a lot more easy to explain the setup using a simple mspaint drawing than with text!
As you can see in the picture above, I have build this with high availability in mind, since I want my websites to always be up and running! Continue reading →