HostSEO Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


How to connect to remote storage on CentOS server

  • Category : Tips and Tricks
  • Posted on : Nov 19, 2020
  • Views : 783
  • By : HostSEO
This guide will help you to set up offsite (remote) backup storage settings on your CentOS server.
 

PLEASE NOTE: This option is currently only available for a certain group of users. Please stay tuned if youâ$™re also interested in remote storage.

To start using remote storage, you need to establish a connection between your server and the storage itself.
 
NOTE 1: Before starting any configuration, please check that you have two configuration files, which were sent to you via secured messages.
 
NOTE 2: Save backups on your local computer or server. Since the remote backup storage option is currently in beta, so we cannot guarantee backup safety for the period of beta testing.
 

All commands should be run from the root user.

 
1. Install necessary package
 

To start, you will need to install the necessary package that works with iSCSI:

yum install iscsi-initiator-utils

 

 

 

2. Edit configuration files
 
Now edit configuration files with your parameters in order to connect to the remote storage:
iscsid.conf

 

initiatorname.iscsi
 
Now restart the iSCSI service:
systemctl restart iscsid.service

 

 
3. Check the state of iSCSI service and connect to storage
 
Now let's check the connection to the storage host:
iscsiadm -m discovery -t st -p XXXXX.web-hosting.com -I default -P1
where XXXXX is variable value "node.session.auth.username_in" from file /etc/iscsi/iscsid.conf
 

 

iscsiadm -m discovery -P 1

 

 
Storage was successfully discovered. Now you can connect to the storage and check the session:
iscsiadm -m node -l
iscsiadm -m session -P 3

 

 
In the last string, you can see that iSCSI target was connected as a physical drive sdb.

4. Create partition and filesystem on scsi disk

If you connect to remote iSCSI storage for the first time, you need to create partition and filesystem on this disk:
parted /dev/sdX mklabel msdos

 

 
5. Mount drive and adding mount parameters to /etc/fstab

Finally, you should mount the drive and add the mount parameters to /etc/fstab for automounting in case of server reboots. In other words, you should create a folder for the disk and transfer it to this folder:
backup folder name

 

 
If you would like to configure automatic backups, feel free to follow these instructions.
 
 
Thatâ$™s it!

 

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

SatSunMonTueWedThuFri
 123456
78910111213
14151617181920
21222324252627
28293031 

Born in 2004 ... Trusted By Clients n' Experts

SEO Stars

They never made me feel silly for asking questions. Help me understand how to attract more people and improve my search engine ranking.

Read More

Emily Schneller Manager at Sabre Inc
SEO Stars

Took advantage of Hostseo's superb tech support and I must say, it is a very perfect one. It is very fast, servers reliability is incredible.

Read More

Leena Mäkinen Creative producer
SEO Stars

We're operating a worldwide network of servers with high quality standards requirements, we’ve choose hostseo to be our perfect partner.

Read More

Ziff Davis CEO at Mashable
SEO Stars

It’s very comfortable to know I can rely about all technical issues on Hostseo and mostly that my website and emails are safe and secured here.

Read More

Isaac H. Entrepreneur
SEO Stars

With hostseo as a hosting partner we are more flexible and save money due to the better packages with great pricing, free SEO n' free SSL too!

Read More

Madeline E. Internet Professional