Answer the question
In order to leave comments, you need to log in
How to move a directory to another drive in centos 7?
There are 2 disks sda and sdb.
Everything is on sda.
I want to leave the /var/lib/pgsql/10/data directory as is. The directory /var/lib/pgsql/10/backups I want to transfer to the sdb drive.
Current:
#: df -h /var/lib/pgsql/10/backups
File System Size Used Ext Used % Mounted on
/dev/sda1 458G 4.4G 430G 1% /
Answer the question
In order to leave comments, you need to log in
Create a partition on / dev / sdb, file system, that's all.
after you mount it temporarily, let's say in /mnt/transfer , transfer your backups there (the contents of /var/lib/pgsql/10/backups). After the transfer, clear the source folder.
Unmount /mnt/transfer and mount to /var/lib/pgsql/10/backups. You write this mount point to /etc/fstsb , check the access rights, they must match what it was.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question