S
S
Stanislav2019-04-07 18:58:13
linux
Stanislav, 2019-04-07 18:58:13

How to mount disk to /var/www/domain folder?

For the first time I encountered mounting an additional disk and I don’t understand what to do.
There is a cloud on hetzner, a site is located on it, the root directory of which is defined as /var/www/domain.ru, there is also another VPS from a third-party hoster, the file server file.domain.ru.
After hetzner introduced the connection of additional disks, I want to abandon the additional VPS and transfer files to an additional disk.
When connecting the disk, it was mounted to the /mnt/Name_volumes folder.
How to move it to the /var/www/file.domain.ru folder.
In fact, I want to ensure that the main domain on the main disk is in the /var/www/domain.ru directory, and the disk for files was in /var/www/file.domain.ru

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Reversaidx, 2019-04-07
@ms-dred

Hello, you need to change the /etc/fstab file, add a line like
/dev/sda1 /var/www/domain.ru ext4 errors=remount-ro 0 0
Where /dev/sda1 is the name of the new
ext4 disk - file system type, after you have changed, write the mount -a command to apply

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question