Welcome to World of IPTV

With

+23k members
+11k threads
+106k posts

we are the most popular IPTV community on the web. 

IMPORTANT NOTE:
WE HAVE RECENTLY NOTICED THAT TOO MANY DOUBLE FAKE ACCOUNTS ARE CREATED IN THE PAST.
TO PREVENT THIS ISSUE THE DECISION WAS MADE THAT IN THE FUTURE A ANNUALLY FEE 20 EURO WILL BE RAISED FOR NEW MEMBERSHIPS.

Join now to the World of IPTV

Forum Rules

Before you start, check out the forum rules first

Account upgrade

Upgrade your account to get access to full features

Advertising

Would you like to place your advertisement with us ?

Resources Manager

Hundreds of IPTV scripts and apps are available for download

Mitigating (dealing with) severs with large amounts of data (40+ TB)

urgodfather

Banned
Banned
Ext. Member
Joined
Sep 22, 2019
Messages
2,098
Reaction score
5,930
Points
124
Location
neither here, nor there
Over the last couple weeks, the question has come up several times "what can I do to preserve the large amount of data that I have?" Well, that is why I'm writing this. There are several ways to handle servers with large amounts of data.

Solution 1:

Manual transfer (nobody has time for that!) :LOL:

Solution 2:

Fix the issues if possible, or work around them (nobody has time for that either!) :LOL:


Solution 3: (my personal favorite)??

Re-purpose the server!

"What's that you say? Re-purpose it?" YES!

What I mean by this is, what was once a multipurpose server, make it dedicated file server!

"How," you may ask.

Well there's couple different ways to approach this..........

Method A:

sshfs

Configure ssh key-based authentication

Generate key pair on the local host. **ADVANCED**

PHP:
ssh-keygen -t rsa

Accept all suggestions with enter key.

Copy public key to the remote host:

PHP:
ssh-copy-id -i .ssh/id_rsa.pub user@host[CODE]

Install sshfs

[CODE]sudo apt install sshfs

Mount remote directory

PHP:
sshfs user@host:/remote_directory /local_directory

Don't try to add remote fs to /etc/fstab!!!

Or don't try to mount shares via /etc/rc.local !!

In both cases it won't work as the network is not available when init reads /etc/fstab.

Install AutoFS

PHP:
sudo apt install autofs

Edit /etc/auto.master

Comment out the following lines
PHP:
#+/etc/auto.master.d
#+/etc/auto.master
Add a new line

PHP:
/- /etc/auto.sshfs --timeout=30

Save and quit

Edit /etc/auto.sshfs

Add a new line

PHP:
/local_directory -fstype=fuse,allow_other,IdentityFile=/local_private_key :sshfs\#user@remote_host\:/remote_directory

Remote user name is obligatory.

Save and quit

Start autofs in debug mode

PHP:
sudo service autofs stop
PHP:
sudo automount -vf

Observe logs of the remote ssh server

PHP:
ssh user@remote_server
PHP:
sudo tailf /var/log/secure

Check content of the local directory

You should see contents of the remote directory

Start autofs in normal mode

Stop AutoFS running in debug mode with CTRL-C .

Start AutoFS in normal mode

PHP:
sudo service autofs start

Enjoy

Method B:
NFS

Setting up the host server
In order to set up the host system to share directories, we will need to install the NFS Kernel server on it, and then create and export the directories that we want the client systems to access. Please follow these steps in order to smoothly set up the host side:

Step 1: Install NFS Kernel Server
Before installing the NFS Kernel server, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

PHP:
sudo apt-get update
The above command lets us install the latest available version of a software through the Ubuntu repositories.

Now, run the following command in order to install the NFS Kernel Server on your system:

PHP:
sudo apt install nfs-kernel-server
Install NFS Kernel Server


The system will prompt you with a Y/n option to confirm if you want to continue with the installation. Please enter Y and then hit Enter to continue, after which the software will be successfully installed on your system.

Step 2: Create the Export Directory
The directory that we want to share with the client system is called an export directory. You can name it according to your choice; here, we are creating an export directory by the name of “sharedfolder” in our system’s mnt(mount) directory.

Use the following command, by specifying a mount folder name according to your need, through the following command as root:

PHP:
sudo mkdir -p /mnt/sharedfolder
Create the Export Directory


As we want to have full access the directory, we will change permissions of the export folder through the following commands:

PHP:
sudo chown nobody:nogroup /mnt/sharedfolder
PHP:
sudo chmod 777 /mnt/sharedfolder

Now all users from all groups on the client system will be able to access our “sharedfolder”.

Create shared folder


You can create as many sub-folders in the export folder as you want, for the client to access.

Step 3: Assign server access to client(s) through NFS export file
After creating the export folder, we will need to provide the clients the permission to access the host server machine. This permission is defined through the exports file located in your system’s /etc folder. Please use the following command in order to open this file through the Nano editor:

PHP:
sudo nano /etc/exports

Editing this file needs root access; therefore you will need to use sudo with your command. You can also open the file in any of your personal favorite text editors.

Once you have opened the file, you can allow access to:
  • A single client by adding the following line in the file:
PHP:
/mnt/sharedfolder clientIP (rw,sync,no_subtree_check)
  • Multiple clients by adding the following lines in the file:
PHP:
/mnt/sharedfolder client1IP (rw,sync,no_subtree_check)
PHP:
/mnt/sharedfolder client2IP (rw,sync,no_subtree_check)
  • Multiple clients, by specifying an entire subnet that the clients belong to:
PHP:
/mnt/sharedfolder subnetIP/24 (rw,sync,no_subtree_check)

In this example, we are specifying an entire subnet of all the clients we want to grant access to our export folder (sharedfolder):

NFS Exports


Add the required line(s) to your exports file and then save it by hitting Ctrl+X, entering Y, and then hitting Enter.

The permissions “rw,sync,no_subtree_check” permissions defined in this file mean that the client(s) can perform:

  • rw: read and write operations
  • sync: write any change to the disc before applying it
  • no_subtree_check: prevent subtree checking
Step 4: Export the shared directory
After making all the above configurations in the host system, now is the time to export the shared directory through the following command as sudo:

PHP:
sudo exportfs -a
Finally, in order to make all the configurations take effect, restart the NFS Kernel server as follows:

PHP:
sudo systemctl restart nfs-kernel-server
Create the Export Directory


Step 5: Open firewall for the client (s)
An important step is to verify that the server’s firewall is open to the clients so that they can access the shared content. The following command will configure the firewall to give access to clients through NFS:

PHP:
sudo ufw allow from [clientIP or clientSubnetIP] to any port nfs[ICODE]
In our example, we are giving access to an entire subnet of clients machines through the following command:

[CODE]sudo ufw allow from 192.168.100/24 to any port nfs
Open NFS ports in UFW Firewall


Now when you check the status of your Ubuntu firewall through the following command, you will be able to view the Action status as “Allow” for the client’s IP.

PHP:
sudo ufw status
UFW Firewall Status


Your host server is now ready to export the shared folder to the specified client(s) through the NFS Kernel Server.

Configuring the Client Machine
Now is the time to make some simple configurations to the client machine, so that the shared folder from the host can be mounted to the client and then accessed smoothly.

Step 1: Install NFS Common
Before installing the NFS Common application, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

Run the following command in order to install the NFS Common client on your system:

PHP:
sudo apt-get install nfs-common
Install nfs common package


The system will prompt you with a Y/n option to confirm if you want to continue with the installation. Please enter Y and then hit Enter to continue, after which the software will be successfully installed on your system.

Step 2: Create a mount point for the NFS host’s shared folder
Your client’s system needs a directory where all the content shared by the host server in the export folder can be accessed. You can create this folder anywhere on your system. We are creating a mount folder in the mnt directory of our client’s machine:

PHP:
sudo mkdir -p /mnt/sharedfolder_client
Create mountpoint for NFS folder


Step 3: Mount the shared directory on the client
The folder that you created in the above step is like any other folder on your system unless you mount the shared directory from your host to this newly created folder.

Use the following command in order to mount the shared folder from the host to a mount folder on the client:

PHP:
sudo mount serverIP:/exportFolder_server /mnt/mountfolder_client

In our example, we are running the following command to export our “sharedfolder” from the server to the mount folder “sharedfolder_client” on the client machine:

PHP:
sudo mount 192.168.100.5:/mnt/sharedfolder /mnt/sharedfolder_client
Step 4: Test the connection
Please create or save a file in the export folder of the NFS host server. Now, open the mount folder on the client machine; you should be able to view the same file shared and accessible in this folder.
Conclusion
As you can see, there IS more than one way to preserve large amounts of data on a system.

Stay tuned to my next post.

Sources:
https://askubuntu.com/questions/412477/mount-remote-directory-using-ssh

https://www.linode.com/docs/networking/ssh/using-sshfs-on-linux/
https://coderwall.com/p/zras0a/mount-remote-ssh-directory-in-ubuntu
https://www.linode.com/docs/networking/nfs/how-to-mount-nfs-shares-on-debian-9/
https://vitux.com/install-nfs-server-and-client-on-ubuntu/
https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

And the friend who reminded me about NFS ? ?‍♂️ ?
 
Last edited:
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

bojep

Basic Member
Basic Member
Banned
Joined
Oct 2, 2019
Messages
287
Reaction score
785
Points
101
Location
morocco
Over the last couple weeks, the question has come up several times "what can I do to preserve the large amount of data that I have?" Well, that is why I'm writing this. There are several ways to handle servers with large amounts of data.

Solution 1:

Manual transfer (nobody has time for that!) :LOL:

Solution 2:

Fix the issues if possible, or work around them (nobody has time for that either!) :LOL:


Solution 3: (my personal favorite)??

Re-purpose the server!

"What's that you say? Re-purpose it?" YES!

What I mean by this is, what was once a multipurpose server, make it dedicated file server!

"How," you may ask.

Well there's couple different ways to approach this..........

Method A:

sshfs

Configure ssh key-based authentication

Generate key pair on the local host. **ADVANCED**

PHP:
ssh-keygen -t rsa

Accept all suggestions with enter key.

Copy public key to the remote host:

PHP:
ssh-copy-id -i .ssh/id_rsa.pub user@host[CODE]

Install sshfs

[CODE]sudo apt install sshfs

Mount remote directory

PHP:
sshfs user@host:/remote_directory /local_directory

Don't try to add remote fs to /etc/fstab!!!

Or don't try to mount shares via /etc/rc.local !!

In both cases it won't work as the network is not available when init reads /etc/fstab.

Install AutoFS

PHP:
sudo apt install autofs

Edit /etc/auto.master

Comment out the following lines
PHP:
#+/etc/auto.master.d
#+/etc/auto.master
Add a new line

PHP:
/- /etc/auto.sshfs --timeout=30

Save and quit

Edit /etc/auto.sshfs

Add a new line

PHP:
/local_directory -fstype=fuse,allow_other,IdentityFile=/local_private_key :sshfs\#user@remote_host\:/remote_directory

Remote user name is obligatory.

Save and quit

Start autofs in debug mode

PHP:
sudo service autofs stop
PHP:
sudo automount -vf

Observe logs of the remote ssh server

PHP:
ssh user@remote_server
PHP:
sudo tailf /var/log/secure

Check content of the local directory

You should see contents of the remote directory

Start autofs in normal mode

Stop AutoFS running in debug mode with CTRL-C .

Start AutoFS in normal mode

PHP:
sudo service autofs start

Enjoy

Method B:
NFS

Setting up the host server
In order to set up the host system to share directories, we will need to install the NFS Kernel server on it, and then create and export the directories that we want the client systems to access. Please follow these steps in order to smoothly set up the host side:

Step 1: Install NFS Kernel Server
Before installing the NFS Kernel server, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

PHP:
sudo apt-get update
The above command lets us install the latest available version of a software through the Ubuntu repositories.

Now, run the following command in order to install the NFS Kernel Server on your system:

PHP:
sudo apt install nfs-kernel-server
Install NFS Kernel Server


The system will prompt you with a Y/n option to confirm if you want to continue with the installation. Please enter Y and then hit Enter to continue, after which the software will be successfully installed on your system.

Step 2: Create the Export Directory
The directory that we want to share with the client system is called an export directory. You can name it according to your choice; here, we are creating an export directory by the name of “sharedfolder” in our system’s mnt(mount) directory.

Use the following command, by specifying a mount folder name according to your need, through the following command as root:

PHP:
sudo mkdir -p /mnt/sharedfolder
Create the Export Directory


As we want to have full access the directory, we will change permissions of the export folder through the following commands:

PHP:
sudo chown nobody:nogroup /mnt/sharedfolder
PHP:
sudo chmod 777 /mnt/sharedfolder

Now all users from all groups on the client system will be able to access our “sharedfolder”.

Create shared folder


You can create as many sub-folders in the export folder as you want, for the client to access.

Step 3: Assign server access to client(s) through NFS export file
After creating the export folder, we will need to provide the clients the permission to access the host server machine. This permission is defined through the exports file located in your system’s /etc folder. Please use the following command in order to open this file through the Nano editor:

PHP:
sudo nano /etc/exports

Editing this file needs root access; therefore you will need to use sudo with your command. You can also open the file in any of your personal favorite text editors.

Once you have opened the file, you can allow access to:
  • A single client by adding the following line in the file:
PHP:
/mnt/sharedfolder clientIP (rw,sync,no_subtree_check)
  • Multiple clients by adding the following lines in the file:
PHP:
/mnt/sharedfolder client1IP (rw,sync,no_subtree_check)
PHP:
/mnt/sharedfolder client2IP (rw,sync,no_subtree_check)
  • Multiple clients, by specifying an entire subnet that the clients belong to:
PHP:
/mnt/sharedfolder subnetIP/24 (rw,sync,no_subtree_check)

In this example, we are specifying an entire subnet of all the clients we want to grant access to our export folder (sharedfolder):

NFS Exports


Add the required line(s) to your exports file and then save it by hitting Ctrl+X, entering Y, and then hitting Enter.

The permissions “rw,sync,no_subtree_check” permissions defined in this file mean that the client(s) can perform:

  • rw: read and write operations
  • sync: write any change to the disc before applying it
  • no_subtree_check: prevent subtree checking
Step 4: Export the shared directory
After making all the above configurations in the host system, now is the time to export the shared directory through the following command as sudo:

PHP:
sudo exportfs -a
Finally, in order to make all the configurations take effect, restart the NFS Kernel server as follows:

PHP:
sudo systemctl restart nfs-kernel-server
Create the Export Directory


Step 5: Open firewall for the client (s)
An important step is to verify that the server’s firewall is open to the clients so that they can access the shared content. The following command will configure the firewall to give access to clients through NFS:

PHP:
sudo ufw allow from [clientIP or clientSubnetIP] to any port nfs[ICODE]
In our example, we are giving access to an entire subnet of clients machines through the following command:

[CODE]sudo ufw allow from 192.168.100/24 to any port nfs
Open NFS ports in UFW Firewall


Now when you check the status of your Ubuntu firewall through the following command, you will be able to view the Action status as “Allow” for the client’s IP.

PHP:
sudo ufw status
UFW Firewall Status


Your host server is now ready to export the shared folder to the specified client(s) through the NFS Kernel Server.

Configuring the Client Machine
Now is the time to make some simple configurations to the client machine, so that the shared folder from the host can be mounted to the client and then accessed smoothly.

Step 1: Install NFS Common
Before installing the NFS Common application, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

Run the following command in order to install the NFS Common client on your system:

PHP:
sudo apt-get install nfs-common
Install nfs common package


The system will prompt you with a Y/n option to confirm if you want to continue with the installation. Please enter Y and then hit Enter to continue, after which the software will be successfully installed on your system.

Step 2: Create a mount point for the NFS host’s shared folder
Your client’s system needs a directory where all the content shared by the host server in the export folder can be accessed. You can create this folder anywhere on your system. We are creating a mount folder in the mnt directory of our client’s machine:

PHP:
sudo mkdir -p /mnt/sharedfolder_client
Create mountpoint for NFS folder


Step 3: Mount the shared directory on the client
The folder that you created in the above step is like any other folder on your system unless you mount the shared directory from your host to this newly created folder.

Use the following command in order to mount the shared folder from the host to a mount folder on the client:

PHP:
sudo mount serverIP:/exportFolder_server /mnt/mountfolder_client

In our example, we are running the following command to export our “sharedfolder” from the server to the mount folder “sharedfolder_client” on the client machine:

PHP:
sudo mount 192.168.100.5:/mnt/sharedfolder /mnt/sharedfolder_client
Step 4: Test the connection
Please create or save a file in the export folder of the NFS host server. Now, open the mount folder on the client machine; you should be able to view the same file shared and accessible in this folder.
Conclusion
As you can see, there IS more than one way to preserve large amounts of data on a system.

Stay tuned to my next post.

Sources:
https://askubuntu.com/questions/412477/mount-remote-directory-using-ssh

https://www.linode.com/docs/networking/ssh/using-sshfs-on-linux/
https://coderwall.com/p/zras0a/mount-remote-ssh-directory-in-ubuntu
https://www.linode.com/docs/networking/nfs/how-to-mount-nfs-shares-on-debian-9/
https://vitux.com/install-nfs-server-and-client-on-ubuntu/
https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

And the friend who reminded me about NFS ? ?‍♂️ ?
Thanks for sharing
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

traskin

Extended Member
Ext. Member
Joined
Oct 18, 2019
Messages
59
Reaction score
89
Points
29
Location
Spain
Thank you for share this how to. Very useful for share big content library's
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

redhat

Administrator
Staff member
Administrator
Chief Moderator
Moderator
Joined
Jun 19, 2019
Messages
3,074
Reaction score
14,824
Points
134
Location
root[@]woi
how much is the cost of having 40 terabytes of movies available on the internet?

It does cost a lot time that you have spent
 

siscon

Extended Member
Ext. Member
Joined
May 29, 2020
Messages
38
Reaction score
25
Points
19
Location
Paraguay
Website
canalesiptv.org
already spend many hours and days.. and months... include years... gathering archives on mkv of movies and series
its a hobby....

just want to know how expensive was
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

bazza444

Extended Member
Ext. Member
Joined
Sep 23, 2019
Messages
21
Reaction score
3
Points
14
Location
UK
Amazing Write up urgodfather, thanks for that
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

yamcell

Extended Member
Ext. Member
Joined
Nov 11, 2019
Messages
139
Reaction score
163
Points
54
Location
dr
hello can any one help me to finish this steps I do and get error ,

Code:
/mnt/sharedfolder clientIP (rw,sync,no_subtree_check

in this step I set the ip from the panel I have the content or the client I want to share the content

br
 

melk

Extended Member
Ext. Member
VIP Member 12M
Joined
Jun 30, 2020
Messages
57
Reaction score
95
Points
29
Location
world
i didn't know about that, gonna play around with this, thanks.
 
Last edited:
shape1
shape2
shape3
shape4
shape5
shape6
Top
AdBlock Detected

We know, ad-blocking software do a great job at blocking ads. But our site is sponsored by advertising. 

For the best possible site experience please take a moment to disable your AdBlocker.
You can create a Account with us or if you already have account, you can prefer an Account Upgrade.

I've Disabled AdBlock