Linux File Sharing | Run Your Own NAS Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to yet another episode of top linux tech in this video tutorial we'll be configuring a file sharing server for your home network let's begin with the introduction first so what is an smb file sharing or network attached storage server why would you want to run your own server and what are the pros and cons of doing this on your own rather than buying a really available proprietary solution so what is an smb file sharing well it is a server that allows you to share files and folders over the network in this case your home local network with any other device by utilizing the server messaging blocks protocol oh that sounds nice but why would you build your own instead of buying a nice new and shiny one well the answer is simple you are either an enthusiast that wants to build your own thing or you simply do not want to spend an extra cash for a proprietary solution and by the way those proprietary solutions they all run linux or any other unix variant as well so you might be wondering what would be the pros and cons of building your own server for the job well one thing for sure it's less expensive this server uses software raid rather than hardware rate controller which is a major benefit here many proprietary products use hardware rate controllers which controls your hard drives and in many other cases they also use a different cpu architecture so if the hardware controller fails it may be a lot more difficult to rescue your data unlike the software rate where you only have to attach the disks on another computer and your nightmare will be over in an instant another good reason is that these setups are perfect for the dyi enthusiasts and you always have full control over the software and the options that are configured on such server thus allowing you to use the best out of your resources and not just buying a server box that is bloated with tons of software not to mention many of the cheaper ones are very very slow and finally let's explain the cons well one major disadvantage here is that you'll have to install and configure the server yourself of course you're not going to have any support or warranty and the setup might seem a little bit challenging if you've never used linux before or if you aren't a tech savvy person but no worries we'll cover most of your basic needs in this tutorial now there are also other open source and free software solutions ready to go out of the box without involving manual configurations that are worth mentioning and those are for example the open mediavolt and freenas so go ahead click the links down below in the description and check those out the reason of why we are going with this route in this tutorial is because we want the cheapest and the most basic solution available for us for example the open media vault will require that you have three disks installed instead of two where one will be used exclusively for the operating system and the freeness will require the same plus some extra amounts of ram memory due to the deduplication used by the zfs unix file system so let me know in the comments down below if you will be interested in me doing some more videos on this subject involving these two fantastic open source and free software solutions as well anyway before we move to the requirements let's explain what is raid and why are we using two disks for those of you that do not know raid simply stands for redundant array of independent disks which allows you to merge two or more disks in a larger pool array from where you can gain either speed and extra space or redundancy by mirroring the contents of data between the disks in this case scenario we'll be using raid 1 or also known as raid mirror which will duplicate the same data on both disks thus giving you redundancy in case one of the drives fail in this case you'll still be able to preserve and access your data without any loss so let's see what are the requirements for this small home file sharing server first you'll need an old desktop pc which should be no older than 5 years and should support efi bias mode this pc would need to have at least a dual or a single core processor with 2 gigabytes of ram and a network card the pc will also need to have installed two mechanical or ssd sata drives attached and ready to go the disks should be wiped clean meaning they must not contain any data or previous partitions and finally you'll also need a small usb flash drive of minimum 2 gigabytes in size for the debian linux os installation and with all that being said let's move on with this tutorial to get the debian operating system simply navigate to debian.org website click on getting debian then click on the download and installation image link and finally click on the link for your processor architecture in 99 of the cases if not 100 you'll want to click this amd 64 link and simply wait for the download of the debian installation image to finish next we need a usb flashing tool so navigate to rufus.ia and download the rufus flashing tool once the files are downloaded make sure that you insert an empty usb flash drive of minimum size of 2 gigabytes plug it inside your computer into one of the usb ports and then navigate to your downloads folder and start the rufus program in order to be able to flash the installation image once the program is loaded simply choose your usb flash drive from the device list click on select choose your debian iso image click on open choose gpt as a partition scheme and finally click on start once the usb flashing is complete remove the usb from your desktop computer and use it to boot the debian installation on your server remember to choose uefi from the boot menu options or set your bios on the server to boot from efi mode ok so if you have done everything correctly and if your bias was set properly then right after booting up from the installation usb you're supposed to see this debian gnu linux uefi installer menu if you do not see the efi installer menu then you should probably go back reconfigure your bios to boot in efi mode and then restart the installation process again now here on this menu i'm going to go with the graphical installer simply select that and press enter and the first thing that we need to do is select our language so i'm going to go with english here click continue on the second screen you're supposed to select your location so choose your country territory or area so i'm going to go with other you can also double click on these options so let's go to other i'm going to choose europe and macedonia is my location so go with that for my locale settings i'll simply go with united states u.s english and i'll choose american english for my keyboard layout click continue now we are waiting for the installation components to be loaded so that we can proceed with the installation now the network should configure automatically assuming that you have a dhcp enabled on your home router and in 99 of the cases you should have that option enabled by default so you should be able to get an id address assigned to this server automatically if you don't have that then you'll get an error saying that the ip address could not be obtained and you will have to enter it manually so you'll have to choose an ip address that corresponds to your home network in that case so next we'll have to simply choose the host name or however we want to name our storage server so i'll keep it simple and name this system storage server and click on continue for the domain name we do not have to enter anything that's not important in this case so let's click continue and now we have to specify the root password or the super user password or for those of you who are coming from windows this is quite similar to the administrator or the admin password so let's give our root account a password make sure that you type at least some strong and secure password even though this server is going to be on your home network and you probably trust it but still you should make your passwords to be a little bit more complex rather than simple however in this case just for the demonstration purposes i'm going with a simple password so let's click on continue and now we are asked to create our ordinary user account so we'll have to specify the full name for our user and i'll simply call it top linux tech click on continue and for the username or the short name for the account this is actually the login name i'm going to keep it simple and simply say tlt and click continue now we also have to specify a password for this user and by the way this will also be the password that you'll use to connect to your storage server so make sure that this password is also a little bit more complex and quite secure again for the demonstration purposes i'm using a simple password here i'll click continue so basically now we have two user accounts in our system one is the primary system top level account that is known as the root or the super user and the other is the ordinary user account that we have just created okay so all of that is set and now we have come to the most important part in this whole setup and that is the creation of our disk partitions and the raid mirror so in this case we'll have to go with manual setup click continue okay so on this screen you're supposed to see your two disks that you have installed into your system in my case these are not real disks but rather virtual disks and as you can see they are 50 gigabytes each however one thing to note here which is very important is that the disks that you have installed into your system must be clean meaning they should not contain any partition or any configuration whatsoever so make sure that they are clean before inserting them into your system if they are not if for example they already contain some other partitions make sure that you delete those partitions from this partitioning utility or wipe them clean by assigning a new clean and empty partition table on those disks so let's click this number one we can also double click on it and choose to write a new empty partition table so click on yes click on continue and immediately you'll notice that a 50 gigabytes of free space has been assigned to the disk number one now let's do the same for this number two click continue new empty partition table and that's it we now have free space on both disks that will allow us to create new partitions and then configure them accordingly okay so let's begin creating our partitions now and the partitions that we create on the first disk will have to be exactly the same as the partitions created on the second disk and vice versa so it doesn't matter which disks go first as long as the partitions are created in the exact same order and size so let's start with this number one let's double click on that and choose to create a new partition now for the first partition we'll select a 500 megabytes of size and click continue for the location for new partition we'll choose the beginning of the disk and for the use as we see that the ext4 journaling file system has been automatically specified but this is not what we want so we double click on that and change it to efi system partition because this is going to be our bootable partition and also make sure that the bootable flag is on so we click on done setting up the partition and we'll see that under the first disk there's partition number one and it has been created as esp or efi system partition with the size of 500 megabytes so let's do the same for the second disk let's create a new partition and it's going to be the same exact size of 500 megabytes beginning of the disk use as efi system partition flag is on and we are done setting up the partition okay so one very important thing to point out here these two partitions are not going to be mirrored meaning they are not going to be in our rate field well why is that because they have to be separate they have to work with the grub bootloader and they have to work with the efi bios settings so we'll have to configure these as separate but identical and identically configured put partitions everything else will go inside the mirror rate field so let's click on the remaining of the free space of the first disk right after the bootable partition let's double click on that and let's choose to create a new partition and this time we'll choose 2 gigabytes of disk space which will be used as the partition that will serve as our swap file or this web partition in this case which will serve as cash and a reserve ram in case our system needs it so 2 gigabytes of size click continue the location will be at the beginning of course and under use ass we are going to choose physical volume for raid because we also want to include the swap partitions to be part of the rate field as well so let's choose physical volume for rate click continue done setting up the partition and let's do exactly the same for the second disk so click on the free space new partition size of two gigabytes continue beginning use as physical volume for rate done okay so far so good now let's go back to the first disk and now choose to create another partition and this time we'll specify 12 gigabytes here and this will be the partition for our operating system or the root file system partition where debian linux will be installed so click continue beginning again we'll change the type to physical volume for rate done setting up the partition do exactly the same for the second disk and finally we want to use the remaining of the free space for our data partition or for the partition from where we are going to have our shared folder on our home network so you can either use the remaining of the disk space or specify any size that you want to use it doesn't matter in this case i'm going to use all of the remaining disk space for my data partition so i'll choose continue here and of course we're going to change the type to rate done do exactly the same for the second disk all right so far so good so we have four partitions defined on each disk and they are identical in size and in type and right now the only thing left to do here is specify the file system on each partition because obviously we cannot use these partitions unless we format them with the appropriate file system so let's go up here and choose the second option which is configure software rate and click continue now before anything else happens the boot partitions they have to be written to the disk so let's choose yes and on this screen we choose the first option or create an md or multi-disc device so we can double click on that now as the rate type we are going to select raid 1 which is mirror mode which will actually mirror the contents or the data from the first disk onto the second disk and vice versa so let's choose raid 1 click continue number of active rate devices in the array will be two we're not going to use any spare device so let's leave this to zero click continue and now on this screen we have to choose which partition are the active devices or the two partitions that are going to be mirrored between each other on each disk so we'll have to do the pairings right here let's begin by pairing these swap partitions first so let's now pair vda2 with vdb2 and click continue and again we choose to create another multidisc device raid 1 or mirror mode will be selected as well so click continue number of active devices too we're not going to use spare and let's now pair video 3 with vdb3 and click continue and finally the last multi-disk device that we have to create so double click on that grade 1 number of devices too no spare and let's pair vda4 with vdb4 and we're pretty much done so let's click on finish and right now on this screen we see all of our mirrored partitions so we have the swap partition the operating system partition and the data partition and right now we have to double click on each of them and choose however we want to use them or format them so in case if you didn't notice let's choose the rate device 0 click under it on the 2 gigabytes partition double click on that and choose use as and in this case since this is a swap partition we'll choose swap area and click continue let's move to the array device one or the operating system partition and we are going to use this one as the ext4 journaling file system double click on that and for the mount point we need to select the forward slash or the root file system so let's use that and click done setting up the partition finally let's configure the remaining raid device number two double click on that use as ext4 file system again now for the mount point will have to enter this one manually because you're gonna want to name your shares folder so you can name it anyhow you like in my case i'm going to name this one for slash share so this is exactly how i want my shared folder to be called so forward slash share and click continue done setting up the partition and we see now that everything is properly configured and ready to go so we have the swap we have the root file system with the ext4 and we have the forward slash share file system also to be formatted with the ext4 file system so finally we click on finish partitioning and write changes to the disk click continue choose yes to write the changes to the disk and that's it we have just passed through the most complicated part of this setup which is configuring the partitioning and the rate field for each device and now we wait for the base system to be installed basically these are the main operating system components so it's going to take maybe a few minutes or less i'm going to pause the video here and simply resume when it's done all right that finished so let's select no we don't need to scan our installation media so click continue and now we need to configure our package manager or the mirror for the debian archive or the server that is closest to our location or to your location from where we are going to install your server software so in in my case i'm simply going to select my location or any location that's closer to me and click continue i'm also going to choose the mirror that i want to use for the http proxy we don't need to use that so click continue okay so now the package manager is going to be reconfigured and we'll also have to select the software that we want to install on our server but first debian will run apps update in the background and pull any updates that are available for the operating system so we're gonna have to wait for that to finish before we continue installing our software this is also going to take maybe a minute or two okay so the updates have finished and here you can choose if you want to participate in the package your survey uh i'm going to choose no and now we come to the screen where we have to select our software that we want on our server now since this is going to be a purely a file sharing server we do not need to have any desktop environment installed if you want that sure you can go with that but it's really better to simply tick this option off also we don't need any print server so the only two options that we actually need are the ssh server and the standard system utilities select those and click continue now we'll wait for those utilities to be installed and configured in our system finally we are done the installation has completed and now we click continue to reboot our server if everything went well right after reboot you're supposed to see the debian new linux grub bootloader menu and simply press enter or wait for the auto start now here i'm going to use the root account to log in so let me quickly set a bigger font so that you can see the information on the screen in better way so i'm going to use the set font command to change the console fonts so set font slash usr share console fonts and i'm going to use the uni3 terminus dash terminus 24 by 12. okay and before we move up with anything else we'll have to check the disk synchronization process because it has already started so let's do cat for concatenate on slash proc slash mdstat and we see that the partitions are currently resynchronizing now this happens regardless if you have any data or not they have to be in sync so we'll have to wait until that completes and we can actually monitor this thinking process live with the command watch dash n1 on cat slash proc slash mdstat and we see the synchronization process as it happens in real time now the time for this resynchronization will depend on the size and on the speed on your disks so make sure that the synchronization finishes before you can proceed reconfiguring your server you can also skip this part and continue to install software in your server if you like however the performance will be slow until the disks are fully synced so i recommend that you wait until the disks are in proper sync for example if you have something like two terabytes or three terabyte drives this may actually take probably it will take about two hours so you should wait until the synchronization is complete before moving to the next part in my case these are 50 gigabytes disks so it as you can see it's not going to take very long it's about to finish in a minute or two so we can resume with our demonstration and it's done so notice that we have three multi disk devices as if you remember from the setup these are the nd 0 or the swap partition the md1 or the operating system partition and the md2 or the data partition now these are all properly synchronized except md0 now if you see it says active however it's in read only and resync is pending so we are going to fix this right away but first to break out or to get out from the watch command because it is still active you have to press ctrl and c to get back to the shell prompt and now in order to start the resynchronization for the swap partitions we'll have to put them in read write mode and force resync again so in this case we'll use the command mdadm which is the multi-disk administration tool and we'll specify here dash dash read write as option on slash dev md 0 and remember the nd 0 device is the swap partition that failed to synchronize properly so let's execute that and let's do the watch command again so now we finally see that the md0 device is also synchronized and basically all of our three partitions are now properly synchronized and ready to go so let's press ctrl and c again to exit back to the shell prompt and finally install a couple of extra packages that we need in order to make the server fully operational so we'll run the command apt which is the debian's package manager dash y install and we'll choose to install the following packages so first and foremost we need the package for smb file sharing which is called samba so we need to install samba we also need to install sudo to be able to give any other user account a super user privileges or admin account if you want now we also need to install the acl package which is used for the access control lists that will allow you to do advanced file and folder sets of permissions that you can assign to multiple users and multiple groups however in this demonstration i'm probably not going to explain that we'll go with the most basic and the most simplistic setup and probably in the later videos i'll also explain how the acl command works but anyway let's install acl as well regardless if we're going to use it or not and the next package that we also need is smart mon tools which is a diagnostic utility for your hard drives or ssds so basically these utilities will actually alert you or send you signals if there is something wrong with your disks or if they are failing so that you know that in advance let's also install htop which is a process monitor mc or midnight commander which is a file manager and gift up in case if you want to simply monitor your network stats so we have samba sudo acl smart mon tools htop mc and iftop press enter and of course we wait for the installation to finish now use win settings from dhcp no we're not going to use that we don't need that all right so that's finished let's clear the screen and let's also clean the app package cache so let's run the command apt clean so this will basically clean all the downloaded software that we have just used for the installation we no longer need those packages so it's safe to clean them and finally since we are going to actually administer this server remotely we have to make it accessible so let's use the nano editor to modify a system config file so type in nano on slash ptc slash ssh slash ssh d underscore config and press enter so use the arrow keys on your keyboard to move down until you find the option permit login so if you can see there is a hash symbol before permit which means that this option is commented or using the default settings so we want to comment that out to enable this option and change the parameter login from prohibit password into yes so basically this will allow you to log in via ssh with the root account and this is of course if you want to do it this way but i recommend since you are on your home network that you use your root account to do system modifications so permit login yes and since we're done we can press ctrl and x to exit but before we exit we have to save and write the changes to this file so we type in y to confirm the changes and finally press enter and that's it we can clear the screen now and simply restart the ssh daemon with the command system ctl restart sshd press enter and that's it okay well almost there but before we power down this server we'll have to get its ip address so that we can use it to connect remotely and perform the rest of the setup so to do this we can execute the command ipaddr and press enter now in my case i only have two entries and you will probably have only two entries as well because i mean 99 of the cases you're going to have only one network adapter in your server so right now you see two network adapters listed here the first one is the lo low or the loopback adapter and that one you shouldn't be concerned with at all so pay attention to the second one it can be its zero or enp1s0 like in my case so look for where it says inet and then you'll find out your ip address in my case this is 192.168.150.32 24. so that is the ip address that we want if this screen is somewhat confusing you can also use the command network ctl status and look for where it says address and there you will find the ip address that you want to use so in my case again this is 192.168.150.32 and yours will probably be different that will reflect your own home network settings so you should write that address down and finally power off your server and to do that simply run the command power off and press enter and basically that's it from this point on your server will power down and the only cables that you should have attached to your server are the power cable and the network cable so make sure it's set up like that power it on and from now on you can use your other operating systems to remotely connect to your server via ssh or via the graphical software utility that we are going to install or the control panel from which you are going to manage your server okay so when it comes to managing your server there are multiple ways of how we can do this we can either use an ssh connection or we can install a control panel now for those of you who are already using mac and linux you probably already know how to establish an ssh connection to a server however for the rest of you who are using windows well there are actually a few ways of how we can achieve this so if you are on windows you can actually use the windows terminal to accomplish this task or you can have a third-party program installed on your computer something like bitwise ssh client for example now i'll tell you how to get both first of all in order to be able to use the windows terminal app you'll need to have the windows subsystem for linux already installed you can achieve this by going into the control panel click on programs and features then click on turn windows features on or off make sure that the windows subsystem for linux is sticked and then click ok you might be asked to restart your computer after that so go ahead and do that and if you already have enabled the wsl option then you can simply navigate to windows store and do a search for ubuntu 2004 just type in ubuntu make sure that you click and install ubuntu 2004 lts system now in my case i have already installed ubuntu linux within my windows machine so i'm going to skip this part however after you install ubuntu 2004 make sure that you also search for and install windows terminal so type windows terminal in the search and then finally install the app now again i have already installed this app into my windows machine so i'm not going to do it over again the installation process is quite straightforward and simple so i'll leave you to that but right now i also want to show you the second alternative in case if you don't want to bother with a windows subsystem for linux and all these separate installations you can simply open up your web browser and do a search for bitwise slow bit twice wise spelled with a v go ahead and click the link www.bitwise.com go to the download section and simply download the bitwise ssh client you don't need the server's package just the client once that is download simply install the program and run it that's it so i think now it is finally time that i show you how to connect via the windows terminal or the bitwise ssh client so let's start with the windows terminal first so let's first start the terminal and if you have the wsl already installed here from the down arrow next to the powershell tab you can click and select to run a new ubuntu session so let's do that i'll click on ubuntu i don't need the powershell tab open so i'm going to close that and just like that we are right now inside our ubuntu linux machine that is running from within our windows virtualized or containerized environment so let me make this font a little bit bigger i suppose that's fine and i'm also going to position myself inside my home directory by typing cd and tilde now positioning myself into the home directory has nothing to do with this i simply want to eliminate this path here to be shown on the screen and that's it so let's finally establish an ssh remote shell connection to our server all we have to do here is simply type ssh space root at and now we simply type in the ip address of the server so in my case this is 192.168.150.32 and press enter now if this is the first time that you're connecting to this server you're going to be asked if you are sure and if you want to continue connecting so type in yes press enter and finally provide your root accounts password that you have set during the installation of your server type in the password and that's it we are currently logged in via remote secure shell connection into our server and we can now finally finish configuring this server and install the control panel from which we will use to fully administer the server from now on because i suppose that for many of you um trying to do these things from an ssh connection is going to be somewhat inconvenient or maybe difficult especially if you are somebody who doesn't know much about linux and for a change i wanted this video to be actually geared for everybody specifically also for windows users not just for linux users and that's why we are actually going to use a nice graphical user interface in order to configure the server further on but before that we'll have to install it okay so the first thing that i'd like to do when usually connecting to a debian system is enable the color output for my console or the terminal and this basically helps me to distinguish other details and things better so it's a nice feature to have although it's not mandatory and this step is uh quite optional so you don't really have to do it but i must do it because i want to so since i'm already inside my root home directory i'm simply going to edit this bash rc file and enable the color output so i'll use the nano editor in this case and simply edit the file all we have to do is uncomment the ls options for the color control x y enter and i'm going to exit and reconnect to the server again in order for these settings to take effect and that's it we have color output okay now let me also show you how to connect via the bitwise ssh client in case that is the method that you prefer to connect to your server so let's run the program and when the program starts inside the host field simply enter your server's ip address 192.168.115.32 in my case for the port number just enter 22 and then in the section on the right where it says authentication username type in root for the initial method choose password you can choose the store encrypted password in the profile and also specify your root account password so type that click on login you can click here on accept and save and that's it if you see this new terminal console icon here that means that you're already connected to your server and all you have to do is simply click on this terminal console and the terminal window will open from where you'll be able to manage the server in the exact same way as if you are using any other terminal program and when you're done working you can simply end your terminal session by typing in exit press enter and simply click on log out click the exit button and that's it now there are two remaining things that we need to do before we actually configure our file shares and that is number one we'll have to complete our bootloader configuration and number two we'll have to install a graphical control panel that we can access from our web browser so that we can actually manage our server via a nice graphical and more intuitive way so let's begin with finishing the bootloader setup in this case now currently we only have one active and configured boot partition which resides on the first disk so if we run the command ls blk to list block devices we'll see that we have two disks in our system as you already know that's vda and vdb now the boot partition is currently active and mounted on the first partition of the first disk and even though during setup we have already assigned the first partition of the second disk to be also a bootable efi partition however it is not yet configured and it also contains nothing at the moment it just sits there empty so imagine a scenario if for example this hard drive were to fail well your system will continue to operate and will be able to boot because the current active boot partition is on the first disk so you have nothing to worry about however imagine if this disk fails if the first disk fails then in that case you will not be able to put your system from the second disk because the first partition is for the bootable partition is not configured and remember the boot partitions of the two disks are the only partitions which exist outside of our raid mirror configuration so we'll have to set the redundancy here manually so the first thing that we need to do is actually clone vda1 partition onto vdb1 and for this we can use the dd program in linux don't mind the name it's just called the dd and that's it you can think of it as a disk duplicator or maybe you can also think of it as a disk destroyer depending on what you're trying to do and from your point of view so anyway let's use dd and let's specify the first partition of the first disk as the input file so if or the input file equals slash dev slash vda1 and again in my case it's vda1 because i'm using virtual disks and in your case this is probably going to be sda1 so make sure that you type things correctly okay and then we specify the output file so of equals on slash dev slash v d b one in this case we can also set the status flag here if you just like to observe the cloning operation so we can type in status equals progress and then press enter and there we go the partition is currently being cloned okay so far so good so right after the cloning operation is done we'll have to add a secondary efi boot menu item on the list so that the second disk will also be able to boot in case the first disk fails and vice versa so in order to examine the current boot order list for the efi we'll run the command efi boot mgr and use the verbose flag so dash v if i put mgr dashb press enter and this will enable us to see all of the efi boot meaning entries that exist currently for our system and there under 005 for the boot order number five there is our debian efi boot entry listed and specified with the current first partition of the gpt disk with the following uuid which is actually our first vda disk now if you want to check the unique identifiers of every disk you can run the command blk id and this will actually list all of the unique identifiers that exist in your system so for example you see that this unique identifier corresponds with this unique identifier for vda1 which is the same and this of course means that our operating system will only be able to boot from this option and from this partition only as i have previously mentioned so let's add the second item on the list right now let's first clear the screen and let's run the efi but ngr again just for reference and now let's execute the same command yet over again however this time with different switches or different flags so we can run efi boot ngr dash c for create a new entry and then dash g because this is a gpt disk normally in every efi uefi setup you have to work with jupiter disks and then finally dash d for the destination disk and in this case this one is slash dev slash vdb so that's the second disk and then we specify dash p 1 because this is going to be the first partition of the second disk that we want to work with here and then we specify dash capital l open up double quotes and in between those double quotes we can specify the name for the boot menu item and we can type any name we want however let's keep it simple and call this debian2 for example that will suffice and let's specify the final switch here dash l in lowercase and also open a single quotes here and within those single quotes we'll have to type in the path of our efi grub bootloader settings file if you're not sure about the file path you can find it right here in the above reference so it's slash efi slash debian slash shim x64 dot efi so we'll have to use this one so it is with backslash this time so backslash efi backslash debian backslash shim x dot efi and when you're done press enter you'll see that the boot menu item number 6 has been added and this is the debian 2 option that we have specified for the second boot partition that is found on the secondary disk we can also double check and verify everything by typing in efi boot mgr dash v for verbose and we can see the both boot menu items listed properly with their respective unique identifiers okay now once this is done we'll have to save the settings by updating our grub bootloader so the final command that we need to run here is update dash grub and press enter once the bootloader has been successfully reconfigured and updated finally it's time to restart the server and test if everything is okay so we can execute the command reboot and press enter this will basically drop us out from the server's terminal session and revert us within our local terminal session that runs on our ubuntu linux which runs within windows i hope that makes sense so you should at least give your server a minute or two to be able to boot again and right after that simply reconnect or re-establish a new secure shell connection to your server by running the same command ssh root add your server's ip address and press enter type in the password and there you go now let's actually check if the second boot menu entry exists and that we have done everything correctly so let's run efi put mgr dash v and yes we can see that the two boot items are found on our list which means that we have configured everything correctly in case if you're missing this secondary option that means that something went wrong or you've made a mistake so we have to repeat the process all over again anyway let's install the control panel now and once we do that we'll no longer need to administer this server via ssh connection so no more terminals for those of you who actually hate them let's clear the screen here okay open up your web browser and simply type in webmin in the search bar this will take you to webbing.com website and from here simply go to the download section choose the debian package suitable for debian ubuntu or other derived linux distribution and to get the link simply right click on the https link and choose copy go back to the terminal and here simply type in wget and right click to paste the link now depending on the terminal that you are using it can be either right click or ctrl v or maybe ctrl plus shift plus v or maybe ctrl and right click so you have to figure that one out but anyway in windows terminal is simply right click and it pastes the last value from the clipboard so wget and then paste the link and press enter and this will actually download the software package all right let's clear the screen and let's list the directory contents by executing ls dash al press enter and here is our package now it is downloaded and the only thing that we need to do is simply install it into the system and for this we can use the dpkg or the debian package system with the dash i option for install and then simply specify the package name so we can type the first two letters of the name and press tab to auto complete so dpkg dpkg-i and package name press enter and this will install the package into our system okay so it appears that we also got a few errors that were encountered while processing the installation package and this is probably because of missing dependencies now this can be easily fixed by running at dash y f install and just press enter and this will actually pull all of the missing dependencies and reconfigure the failed package as you can see here it says setting up webmin and that is exactly what we need and finally the equipment control panel has installed without any problems so we're all good to go as you can see here it says you can now login to https colon forward slash forward slash storage server colon 10 000 which is the port number so you can either log in to this web address or you can also use your server's ip address instead so let's try now and log in to our storage server let's type in https colon forward slash forward slash storage server colon 10 000 and press enter and you'll get this error message saying that your connection isn't private and you'll also get not secure here in the address bar but this is nothing to worry about because you're only connecting to your private network and regardless of the error message your connection is still encrypted with ssl traffic so simply click on the advanced and click continue so this will open up the login screen and here you'll have to log in with your root user account again so type in root and the password that you have assigned to the root account you can tick the remember me option and click on sign in and just like that you'll be redirected to the dashboard so pretty much on this dashboard you can see all of the stats regarding cpu memory and swap usage we can see now that our server is using for example 15 of our ram memory and nine percent of total local disk space usage you can also click down here on disk usage and you can see that for example your share folder is using this amount of free space which will be shown in percentage and in gigabytes as well you can also click here on the bell icon and you'll get a nice overview of all update details maybe you'd like to change the theme so you can set your dark theme here by clicking on the day night mode so maybe you prefer the dark team or the light team that's completely up to you for this demonstration i'm simply going to revert back to the light team but notice right here where it says package updates it currently says that all packages are up to date and there's nothing that you need to do however in future you should pay attention to this because there will be some operating system updates available in the future and you might want to also install them when they are available so anyway the only things that you would probably want to use from this control panel will be the system category right here on the left pane from where you can add users and groups that you would want to define for your file shares next you would actually want to configure your samba windows file sharing application and finally you would probably want to monitor your disk health status which can be found here on the hardware tab so basically here you would want to check your linux rate status and your smart drive status and smart by the way stands for self monitoring and report tool which is a diagnostic hardware utility chip built into your hard drive which keeps track of your disk health over time as you use it so let's click on the linux rate option here and immediately you'll notice your three partitions that you have configured for the raid mirroring to be displayed and their status so all you need to worry about right here is the status if it's all green and if it says clean or active then that means that the raid mirror is operating normally however if you encounter something like degraded or bad or missing and it will usually be shown in red that means that you have problem and that you might actually need to reconfigure the rate array or maybe fix it re-sync it or actually there's something wrong with your disks if something like that happens then you need to check this smart drive status option here so let's click on that and all you have to do here is simply select the disk for which you want to run checks and click on the show button now unfortunately i'm only using virtual disks so they do not support smart which means that i cannot show any diagnostic data but for real disks you'll be able to see if there are any physical problems so basically you're supposed to run periodic checks in order to make sure that your hardware is always in a big physical condition now the one remaining tool that you will probably want to use is here in the tools section and that is the file manager so let's click on that and from here you'll actually be able to set the files and folders which you want to share and also give the appropriate permissions for users or group accounts now if you remember during setup we have specified the shared folder as our share partition and the folder which will contain all of our shares meaning files and folders or content that we want to share on our home network so in this case we'll be working with this folder so go ahead and click on that and this will bring you inside the directory like with any file manager and here let's for example create two folders for this demonstration so i'll go here to the file menu click on that and select to create a new directory let's call this directory public for example let's click on create and let's also create another directory and this time we'll call this one private so in this scenario i'm setting up two folders one with private access only and the other with public access or free for all so let's now first create the private access folder now if you see here in the owners section let's actually zoom this page a little bit so that you can see better hopefully that's good enough okay so let's first configure the private folder as i said before we'll use this one for private access only so we'll have to change a few settings for example we see here that the owner defaults to the root account and that's not what we want so we can right click on this folder go down to properties and click change ownership and here basically you'll want to change the username and the group name to your own user and group in order to be able to access this folder so in my case the username is called tlt and the group also has the same name which is automatically created during setup and whatever you do make sure that you tick this recursive box option because it will allow you to specify the same ownership for the other folders and files which exist within that parent directory so in most cases you would want to apply these settings everywhere within the directory tree so let's click on change and now that we have set the owner nd group to default to our username we also need to change the permissions now currently they default to seven five five and in this case we need 750 which will give us access only to our user our group and not to everybody else so let's right click on that choose properties and click on change permissions so here we want the owner to have read write and execute permissions the group is pretty much fine with only read and execute permissions however for everybody else or for the others we need to tick these options off and allow no access whatsoever and else down here where it says apply to we'll also use the recursive option so choose all recursive and click on change now before we configure our public folder let's actually go ahead and add a guest user account and a guest group that will be used for everybody else so let's go to system users and groups and here we can click on create a new user account for the username we can use the name guest 123 for example it's up to you to come up with any username that you want to use for your guests we'll leave the user write it to automatic we don't have to specify real name or the home directory the shell well it's not that important because well obviously they are probably not going to log in via ssh but just in case make sure that you change the shell to bin bash in this case now for the password we want to go with the normal password and we can assign the same password as the username or any other password so it's completely your choice and up to you in my case i'm going to use guest 123 the same password just to keep it simple now for the primary group we want to give this user to have its own group name to be identical to the username so we want to click here on the new group with the same name as user so select that option and we also want to add this user into a secondary group which is called samba share and if we scroll down we'll find it down at the bottom of the list so let's click here and we can see that the user account has been added to the samba share group as well and by the way you might be wondering why we are assigning secondary groups to users well groups are more convenient when it comes to file and folder permissions management because they allow you to specify a single set of permissions for multiple users at the same time if they belong inside a group so rather than having you manage a permission set for each user independently you can do that at once if you have multiple users belonging in a single group and then you only manage permissions and access for the group itself which contains all of these other users so in this case it's more convenient to do management this way right now all we have to do is click on create and we are finished with creating our guest account now let's go back to the file manager and reconfigure the file permissions for the public folder so let's click on share right click on public choose properties and then change ownership now in this case for the user name we'll change the owner to our user account however for the group name we'll use that secondary group that we have just specified which is samba share so let's type in samba share and let's also click the recursive option and click on change next right click on that same folder choose properties and click on change permissions so right here we want to give the owner which is tlt read write and execute full permissions and for the sampa group we also want to give read write and execute permissions we can leave all others to read and execute and apply this to all recursively and click change so we are done setting up our private and public share folders and we are also done with our user accounts so we have our own user account and we have one more account for the guest or the public access so the only thing that remains to be configured now is the samba file sharing service itself so let's go to servers and click on samba windows file sharing okay so first things first we don't actually have to share all of these home directories printers and all of other predefined factory shares so what i'm going to do next is simply delete all of this unnecessary shares and make sure that we start clean with a clean setup before we configure anything else we'll also have to make sure that the user accounts and the group accounts that we have defined are also synchronized with the smb file sharing service so let's click down here where it says samba groups and simply add the samba share group to be available for the smb service so in the group name we'll specify samba share for the group type we'll leave this to the default or as the local group and for the unix group we'll click here on the group icon and choose the samba share group make sure this one is selected down here and click on the select button finally click on create and that's it we have assigned the unix samba share group to be also available for the samba service let's click on return to share list and do the same for our user accounts so this time we click on the convert users option here and we select the user accounts that we want to convert from unix type into the samba share type in the same way as we did with the group so let's click here on this option which says only listed users or uid ranges and click on the user icon let's select our own user account make sure that's selected down here click this option to use this password and here make sure that you enter the same user account password that you have assigned for your own user account during setup it's actually much easier this way once you enter the password click on convert users let's return to the share list click convert users again and repeat the same procedure for the guest account remember again we are specifying the same unix account password in this case i'm going to type in guest 123 for our guest account we can verify that everything is set correctly if we click here on the assembler users and we'll see that our own user account and the guest account are now actually listed as samba users okay so now we can click on restart samba servers button here to restart the service itself and we can finally define the file shares and the permissions now this might seem redundant a little bit you're probably asking didn't we just do that from the file manager yes we did that but that was only relevant for the user accounts which are using the plugable authentication module as the only authentication within the system however since we are also using a samba share file service we need to make that same authentication work with the service itself so right now we are configuring the smb file sharing options and we need to click this option here create a new file share for the share name let's keep it simple and assign the same name that we have assigned to the shared folder which is in our case name share next click here on the file icon to choose the directory that we want to share and from the file manager we simply click on the shared folder which is named share click on select and then finally click on create once this is done click the share name that we have just defined and click on security and access control down below make sure that the writable option is set to yes and then as valid users and valid groups we want to assign the usernames and the groups that we have previously defined so let's click here on the user icon click on our guest account and click on our user account and once they're both selected simply click on select and for the group you probably guessed it we'll simply choose the samba share group here and click on select once this is done click on save and finally click on file permissions now for the new unix file mode we'll have to change this to 6 4 4 and we'll leave the unix directory mode to 755 as the default so click on save click return to share list and once more click restart samba servers and we're almost done however we still have to reconfigure and to add a few more modifications to the main samba config file so let's click here on edit config file scroll down a little bit and you'll see this option where it says word group equals word group in all caps now if you're using windows make sure that your windows workgroup is set to the same name that you see it here if it is not you will have to change this to the word group that you prefer anyway this is just a name however in order for the name servers to be able to function properly and to allow you to see this server listed inside your windows network locations this workgroup name has to be identical in between the server and your windows machines anyway you can easily check the workgroup name on your windows machine if you right click on my computer or this pc and choose properties and here in the advanced system settings if you click on the computer name tab you'll be able to see your workgroup name now you can easily change this by clicking on the change button and you can name your workgroup whatever you like but make sure that the workgroup name is as i said identical on your server and on your windows machine so once you have that out of the way scroll to the bottom of the file and here you'll find the settings for your share folder here everything looks fine except that's maybe you'd also want to add the browseable option so type in browsable and set this to yes so this will actually enable file and folder browsing from within windows network locations click on save click return to share list and one more time click restart samba servers so up to this point it seems that we have configured everything that we need to configure and now let's actually test and see how our file shares are working so i'm going to minimize this open up the windows file manager click on network and here if everything is set up properly you're supposed to see your server listed alongside with your windows machine now in my case since i'm using a different type of network settings and this is all a virtual network i'm unable to see my server mapped in this location but now that's completely fine but in your case you're supposed to see your server represented with an icon and if you do not see that simply restart your windows machine if you get a message stating that file and sharing is not turned on for your windows machine simply click on the message and turn on file and sharing for your home network now depending on your network and firewall settings this can be either public or private network if you're running windows 10 or if you're on earlier versions of windows you can get something like a guest home and business type of network so make sure that you select work network home network or private network just don't select the public option now since we already know our server name as we have named it storage server during the installation we can also access it by clicking here in the address bar and typing in backslash backslash and the name or you can also type in the ip address in this case i'm simply going to type in my server name which is called storage server and press enter immediately you'll get prompted to enter your username and password so let's try logging in with our username account first so in this case this is going to be tlt type in my password click ok and there we go we have our private and the public folder set now let's try put some files in here i'm going to go in my private folder and maybe choose to create a new excel document let's call this one payments assuming this is the private folder and we want to keep this content safe let's type in something click save that's it you can also create a new folder for example let's call it test inside my public folder maybe just create some other folders like i don't know music or pictures for example and as we can see our file share is now working perfectly but let's now repeat the same scenario and see what happens if a guest comes in and tries to access our share so in this case i'll simply have to log off and log back in in order to simulate a guest account so let's end this server session here and my terminal session click on log off or sign out and then simply sign back in and the reason why i am signing off and signing in back again is because windows remembers my file share credentials and if i try to access the folder again it will simply not prompt me for the username and password so i'll have to cycle through a login one more time so let's assume that i'm a guest user now and i click the file share i go to the network and of course from my virtual network i will be unable to see the server name here so simply type in the name again backslash backslash storage server and if you get this error message simply just wait up a minute or two until windows gets its network refreshed let's try to ping the storage server to see if everything is okay and yes it is the name seems to be existing on our network so let's try that again and there we go let's double click on that and now let's enter guest 123 as username and our guest password and now we have access however if i try to go inside this private folder i'll get network error permission denied but for the public network well i'll be able to access it as guest and i'll also be able to create new folder and upload some files so i'll call this one upload now for the other folders for example i'll get permission denied error when i want to create files inside well this is because when we created these folders these were created with the tlt or the username account as owner so currently guest has no permission to write into these folders but it has permission to write anywhere else in within the file system so if we want to correct this we can simply go again to our control panel so https storage server and we can go to the go to the file manager again click our shared folder go inside public and change the ownership for the music and the pictures folder in case if we still want to give the guest account more permissions so let's change ownership to tlt and samba share let's do that recursively and let's also change the permissions so as you can see you have full control over every folder and every file on your home network's file share so now while we are logged in as guest let's try going into the pictures folder and create a file name here or a folder and as you can see everything is working perfectly fine we still no longer have access to the private folder and that seems fine now let's sign off and sign in back again into windows because now i want to use my own user account for the file share and in this case i'd like my user credentials to be remembered by the operating system so let's access the file share one more time so i'm going to use my user account right now and click on remember credentials this time there we go now if you're wondering where does windows store and remembers these credentials well that can be set in the control panel when you open it you'll see this credentials manager option so click on that and here under windows credentials you can see your stored credentials for your file shares so you can either edit or remove them by choice also another convenient thing that you would probably want to do is map this share to be available as a network share so click on this pc click here on the view tab or i think it was on the computer tab yeah so click on the computer tab click here on map network drive add map network drive and for the shared folder we can type in our shared path with the following format backslash backslash and then our server's name or the id address and then backslash again and here you specify your shared folder in this case it's called share so i want to have the reconnect at sign in option to be ticked on and click on finish and this way every time when you access my computer or the windows file explorer you'll see your share mounted as a network location as if it were a physical disk and you'll also be able to see the remaining disk space available which is well nice and convenient way of how you would map your network shares so everything seems fine and we have successfully configured our home file sharing and storage server if you are running linux or any other unix-based operating system the way of how you would connect to an smb share is simply specifying the smb share address from within your file manager for example here i'll click down here in the address bar and i'll type the address smb colon forward slash forward slash 192.168.150 that 32 which is the address of my smb file server and press either enter or connect and there it is the shared folder has appeared so i'll simply double click on that i'll get the username and password prompt so you'll have to select registered user and type in your username and password through which you want to connect you can either choose to remember the password forever until logout or forget the password immediately it's really up to you so let's click connect and there we go we have our private and the public folders available when you're done simply eject the mounted file share from within your file manager and that's it all right now let's try to simulate a few failing scenarios in this first example i'm actually going to remove one of the disks into my system and see if the system will continue to work and if it has all the data that i need so let me list here the block devices on this server and i'll actually choose to remove my first disk from the system so this will serve as a perfect fail case scenario so let's power the system down by typing in power off and this is how you would actually want to turn off your server in case if you just wanted to shut it down you can simply type in power off and press enter okay and it is done i have removed and completely destroyed one of the disk drives so let's try connecting to this server again and let's list block devices again let's run lsblk and now we only see that we have only one disk available and that's vda now previously this vda disk was known as vdb or the virtual disk b because it was the second disk but since i have removed the first disk now actually the virtual disk b has reverted back to virtual disk a and this is simply a naming convention so please don't get confused by the naming scheme here these are virtual names and they get assigned always in order or in sequences as you add or remove drives so regardless of the name this disk used to be my second disk and now it is the first disk into our system so it's called vda anyway my storage server is now operating with only one disk so let's see if the data is still here and it is intact and yes everything seems normal all my data and all of my files seem to be here which means even though we have simulated a hardware failure on one of our disks the other disk has still resumed with a normal operation and the server is now waiting for us to replace a brand new disk into the system and to re-synchronize the data so let's see actually what the control panel says just for a reference i can run the command cat on slash proc and the stat to check on my raid array and here for all of the multi-disconfigured devices i'll see that actually only one disk is available out of two so the multi-disk tool is reporting everything as it should and let's also see if the same thing is reported from within the control panel and it should be because the control panel is also using the same underlying service so let's go to hardware and let's go to linux raid and we see here that the status of our mirrored partitions or the multi-disk is now all degraded which obviously means that one disk is missing so what i'm about to do next is insert a new blank disk into the same system and see how we can resynchronize our raid configuration and make sure that they are back into the active and clean state again okay so let's reconnect to my server again and let's run the lsblk command to list all of the block devices and now we see that two disks are again present in our system however the new disk is currently unconfigured so it's listed only as vda but it is completely blank now before we can use this disk back into our raid mirror configuration we'll have to create a new partition table layout on this disk that will be identical as with the existing operational disk so luckily in order to save us from the trouble from creating partitions manually we can use a nice utility here that will actually instantaneously clone all of the partition tables that exist on the vdb disk back on the vda disk so that we can easily re-synchronize our mirrored configuration again so the tool that we want to use here is called sfdisk and we'll use the option d to dump the partition data from the dev vdb disk and if we simply press enter now we'll see the exact partition layout that our vdb disk is using so the data is currently only dumped as output on our terminal we don't want that we actually want to dump this data back on top of our clean and unconfigured disk so in this case we'll use sfdisk dash d on dev vtb or our second disk and then pipe this through the sync program sfdisk on slash dev vda and this will basically clone the partition layout tables from the second disk onto the first disk and you can see here that four partitions have been recreated for our first disk and if we actually list the block devices again with the lsblk command we'll now see that indeed the four partitions have been recreated and now we'll have to copy or mirror the data from the existing operational partitions back on the newly created partitions for this unfortunately we cannot use the control panel to accomplish this because the server is already in use and will not get the list of available partitions however we can use the multi-disk administration tool from the command line to accomplish the same so we'll simply run md adm for the multi-disk administration and we'll use the option dash dash add and now we'll have to add every multi disk device and assign it to the corresponding paired partitions for example this md0 device we see that it is currently assigned to vdb2 partition and we'll have to pair it with vda2 as well and so on the md1 device assigned to vdb3 will have to pair with vda3 and the md2 from bdb4 will have to be paired with vda4 so mdadm dash dash add and let's start with the slash dev md0 device first and we want to pair slash dev slash vda 2 with slash dev slash vdb 2 and press enter now you'll get the message that the device was added but that also device resource is busy nothing to worry about so let's run cad on slash product slash candystat and we'll see that now the device have been properly synchronized and it is using two out of two partitions in the array so let's do the same for all other multi-disk devices again let's use the block devices list for our personal reference let's repeat the same command however this time we'll change the device to md1 and the partitions will have to be vda3 and vdb3 respectively let's also do cat on slash proc and the stat again and we see that the disks are currently synchronizing all over again let's repeat the same for the final multithis device which is md2 on slash vda4 and vdb4 press enter we can also here execute the watch command watch dash n1 on cat slash proc slash mdstat and see how our partitions are getting re-synchronized in real time you should allow your server to finish resynchronization process that is the recommended way to go you can of course still use your file share it will work perfectly fine it might just be a little bit slower so if you're in rush you can go ahead and access your file share or you can wait for the process to finish before you can use anything else and there we go our multi-disk raid array devices have been resynchronized and now we can press control and c to get out of the watch command and let's run lsblk to list block devices again so we see that the multi-disk devices are now in proper sync with the multi-disk devices from the first disk onto the second disk and vice versa let's also start the control panel again to see if everything is okay let's go to hardware and linux rate and here we see that the status has reverted back to all green which means clean and active now one more important thing left to do is that even though we have resynchronized our raid arrays we still have to reconfigure our boot partition because this one remember is outside of the raid mirror and since we have added a new disk we'll also have to clone and reconfigure our boot partition and the bootloader again so unfortunately this would be the only annoying and redundant step that you have to go through over again so let's do that quickly let's run the efi boot mgr command again with the dash v flag for verbose and here we see that we only have the boot entry number 6 or the debian 2 that we have created previously for the second disk however in this case since we have the reverse scenario we are missing the bootloader or the boot menu entry for the first disk so let's create that we will run dd again to clone the disk or to clone the partition which is input file equals on def vdb1 in this case so we want to clone the vdb1 bootable partition onto the vda1 to be also the bootable partition as well so dd input file equals slash dev vtb1 and output file equals slash dev slash vda1 press enter let's wait for the process to finish and finally let's add the other boot menu entry now so efi boot mgr there's c for create dash g for gpt dash d for the destination disk in this case slash dev slash vda dash p partition will be the first partition dash capital l for the label inside double quotes we can enter debian and dash lowercase l inside single quotes we'll specify the path for the grub bootloader settings so backslash efi backslash debian backslash shim x 64 dot efi and press enter and there we go so let's reboot our server one more time type in reboot press enter let's reconnect again let's check the status let's see if our file sharing is working and yes it is everything is back to normal so we have successfully recovered from a failed disk scenario now let's examine fail scenario number two what if for example the motherboard on our server simply dies one day what to do next well the good part with a storage system like this is having the ability to pull off the disks from the failed server and move them into a new server or any other system that runs linux and this way you can easily mount all of your existing raid devices into a separate folder on any other linux machine and pull your important data that you need and the best and the most convenient way of how you can accomplish this task is by using a live ubuntu desktop installation usb disk so all you have to do is navigate to ubuntu.com go to downloads and simply download any version of ubuntu desktop it doesn't matter which one it is the next step will be to remove your disks from the failed server and move them to a system from where you would want to extract the data and obviously you would have to put this system with this live installation ubuntu desktop usb so in order to flash the ubuntu desktop on your usb stick simply use the same method that you used previously for the debian installation now i'm going to remove the disks and attach them to another system and boot this system with this live ubuntu usb flash drive and proceed from there okay there we go i have removed my two hard drives from the previous system and i have installed them into another machine and also i have booted that machine with the live installation usb disk for ubuntu desktop and all i need to do here is simply press enter and choose ubuntu now here we don't want to actually install ubuntu but we want to run it from the live installation usb stick so let's click on try ubuntu and this will put the system into a live temporary session okay so now that we have our system up and running from the live and temporary installation environment we need to access the terminal from the applications menu down here in the lower left corner of the screen so click on show applications type in terminal choose the application let's actually maximize this press ctrl shift and plus to increase the font size i think that should be quite sufficient and let's become the root account by running the command sudo as you press enter and let's check if the multi-disk administration tool is also present on this system it's not so we have to install it let's run at y install nd adm all right finally let's run lsblk to list our block devices and make sure that our two disks are here and ready to be configured and yes they are as you can see so right now we can call the multi-disk administration tool to assemble our previous and existing rate mirror configurations so that we can mount them elsewhere from where we can extract our data so here we can use the command mdadm dash dash assemble dash dash scan and dash dash run and this will basically automatically scan for any multi-disc rate configurations assemble them and automatically run them so let's press enter and we can see here that multi-disk devices 0 1 and 2 have been assembled and started with our two drives so if we're on the ls block command again we'll see that indeed our multi-disk devices have been assembled and now we want to extract our data from those disks if you remember the md2 or the multi-disk device 2 is the only partition that we are worried about here so basically this is the share partition that we actually need so we are going to mount this share partition onto an empty mnt folder and access our data from there so let's do mount on slash dev slash md2 and we want to mount this on forward slash mnt folder and that's it so let's list the directory contents of the mnt folder and we'll see that's here we have our private and the public folders available so let's run the file manager here and let's now navigate to other locations choose computer choose the mnt folder and there's our data so in this case what you would usually want to do is simply insert a removable external disk device into one of your usb ports and simply copy and paste all of the data and all of the folders that you need onto that external drive by the way when you insert that external drive it will appear here below the other locations tab or you can simply click on the other locations and access it from here from the devices list so that's it this is the end of this video i hope that it was informative for you and if you did enjoy it please make sure to comment like share and subscribe and i'll see you in the next one
Info
Channel: Top Linux Tech
Views: 7,393
Rating: undefined out of 5
Keywords: linux, smb, samba, file sharing, NAS, network attached storage, mdadm, windows, debian, webmin, raid, raid mirror, raid1, raid1 mirror, linux raid
Id: NEVtF_0D_rw
Channel Id: undefined
Length: 122min 48sec (7368 seconds)
Published: Mon Dec 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.