hey guys what's up roman here from tech
guides and in today's part two of my
ultimate how to install and set up an
ubuntu server tutorial series
i will show you how to format and
partition hard drives under ubuntu
also i will show you how to mount your
new hard drives and in that instance i
will also show you how to combine
different drives
to create one big virtual drive this
basically comes in super handy if for
example you're using your server as a
cloud
and in order to extend your cloud
storage you can basically just throw in
another hard drive
and using the approach that i show in
this video all you need to do is change
one file
and your cloud storage will be extended
as always you can find
timestamps to each topic discussed in
this video in the description below
also if you rather like to follow along
this tutorial in its written
form then definitely check out my blog
where i have this tutorial and any of my
other tutorials
written down for your convenience and
with having said that let's start off
with how to partition and format your
hard drives
on ubuntu now the approach i'm going to
show you on partitioning your hard
drives
is basically the easiest and fastest
that i could find
so on your linux machine the first thing
you want to do is to type in sudo
fdisk l to check which kind of disk you
have currently set up to your home
server
in my case i have this new sde drive
which is a six terabyte ck drive
that used to be in my windows machine
now to check for any partitions on that
drive
type in sudo gdisk then followed by the
disk identifier so in my case
slash def sde as you can see i have a
mbr and gpt partition table
in order to delete all partitions type
in d then the petition number
and repeat this for all partitions on
the drive
type in w to delete the partitions and
confirm by typing y
note that this will obviously overwrite
any data on that drive
so absolutely make sure that you have a
backup before proceeding
and when you type sudo fdisk l again you
can see that the drive is now ready to
be partitioned
this is basically also how a new drive
would look like if you simply plugged it
into your server
now to create a new gpt partition table
which i would recommend
for anybody who's using an ubuntu server
type in sudo
gdisk followed by the disk identifier
type in
n for a new partition use 1 as the
partition number
and confirm all of the following entries
finally type w
and confirm the writing of the new
partition by typing y
now when you type sudo f disk l again
you can see that we have successfully
created a gpt partition table
called the sde 1 partition on our new
drive
in the next step we're going to create a
new xte4
file system on our newly partitioned
drive to do so type in
sudo mkfs.xt4
followed by the drive identifier now
absolutely make sure that you actually
create a file system
for the partition that you just created
so in my case dev
sde 1. once you have repeated this for
all of the drives that you've connected
to your home server
it's time for the server to mount these
drives now in order to mount drives upon
boot
you can edit the fstab file which you
can find under the etc directory
in this file you can either simply
specify the regular dev
sde 1 etc identifiers or even better
use the uid also known as the universal
unique identifier
you can get the uid of each drive by
typing in sudo blk id
copy the uid of the drive that you want
to mount
and paste it in the fstab file remove
the quotation marks
and specify the location where you want
this drive to be mounted
in my case i'm going to mount it under
mount cloud
1. the next field describes the file
system so in our case
ext4 the fourth field describes the
mount option associated with this drive
in our case we're going to use defaults
finally the two zeros
tell the system to not always check the
drive upon every boot
however if you do want the system to
check your disk then type in either 0
1 if this is the root device or 0 2
for any other drive next repeat this for
any other drive that you also want to
mount upon each boot make sure that they
actually use different mount locations
for your different drives
finally create the folders for the mount
location so in my case
mount cloud 1 2 and 3 and type in sudo
mount dash a in order to mount the
drives to the respective mount locations
now in this last part of today's
tutorial i'm going to show you how to
glue together different drives
in order to make them appear as just one
drive to the linux file system
for this we will need to install mhddfs
so first make sure to update your
repositories by typing in sudo
apt update followed by sudo apt install
mhddfs
next open the f-step file again where
you have specified the amount locations
for the different drives
we can add a new line called mhddfs
followed by a hashtag and immediately
followed by the amount locations of the
drive that you want to fuse
[Music]
next specify a location where you want
your fuse drives to appear
in my case i want my fuse drive under
mount cloud
instead of a file system type in fuse
followed by allow other comma non-empty
again we specified two zeros as we don't
want this drive to be checked upon boot
now what the allow other does is it
basically allows anybody that has access
to your home server
to read and write files on the fused
location
this is going to come in handy if for
example you want apache to be able to
ride to this location
and at the same time you also want to
write to this with your personal user
finally the non-empty makes sure that
you're not going to be able to actually
mount into a directory
which already contains data next create
the mount directory so in my case mount
cloud and type in sudo mount a
in order to fuse your drives and that's
it as you can see
i can now go into the mount cloud
directory and i can see all of the data
that
is actually spread across three drives
you can check your total fused disk
capacity by typing in
df-h
now if you're building your own home
server which i presume you are since
you're watching this video
then i assume you're a rather privacy
sensitive person
and because of that you probably don't
want to share all of your personal data
with the big internet companies such as
amazon google and the likes
however your internet privacy should
really not end just
there see whenever you go online over a
public wi-fi
basically anybody is going to be able to
intercept that communication
and is going to be able to see what
you're doing on the internet
additionally your internet service
provider is likely keeping locks of all
of your activity on the internet
and can therefore trace back any website
that you've ever visited
now the obvious solution to this problem
is using a vpn
or a virtual private network now what a
vpn does
is it allows you to access a server in a
certain country
and then encrypts all of your connection
between you and that server
making you appear to access a certain
website from that country rather than
the country that you're actually in
so if this sounds like something that
you'd also like to take advantage of
then i can strongly recommend you
ipvanish using ipvanish to conceal your
true location and ipaddress is super
easy
you simply download the app on any of
your devices
connect one of these servers and your
connection will be encrypted
now ipvanish provides absolutely
blazingly fast connection speeds
basically on 130 megabits connection i
can saturate it even if the vpn is
enabled
they offer up to 1 500 server locations
in 75
countries and you can simultaneously
connect as many devices as you want to a
vpn
also ipvanish now keeps absolutely zero
locks off your activity on the internet
and if you don't like their service then
you can get all of your money back
within 30
days now i personally use ipvanish
whenever i use my mobile phone to
connect to an open wi-fi
so if you also want to take back control
over your online security and at the
same time also supporting my channel so
i can make more content like this
then check out ipvanish by going to
techguides.yt
ipvanish or clicking on the link in the
description below
and with that we have reached the end of
today's tutorial now hope you guys were
able to actually partition
and format your hard drives and i hope
you also learned something new if you're
running a cloud and want to extend your
cloud storage
if you still have any questions then
don't hesitate to leave them down below
leave a like if you like this video
leave a dislike if you didn't
subscribe for more content like this
thank you so much for watching have
a wonderful day and i'll see you guys in
the next video
you