S
S
Sergey Karbivnichy2018-02-13 17:06:24
linux
Sergey Karbivnichy, 2018-02-13 17:06:24

linux. How to move the /opt folder to another partition?

Now the whole system is on sda1. On sda2 - swap. I want to transfer the /opt folder to sda3, because I make backup copies with acronis, and in the /opt folder android sdk, studio, gradle and a bunch of "heavy programs", without this folder, the backup will be done in a few minutes. Google helped a little. As I understand it, you need to boot from livecd, move all files from /opt to the /sda3 partition and edit fstab. But what will fstab look like then? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-02-13
@alexr64

mkdir /new_opt && mount /dev/sda3 /new_opt && mv /opt/* /new_opt/ && umount /new_opt &&  mount /dev/sda3 /opt  && rm /new_opt

I'm making a living. In /etc/fstab
where ext4 is /dev/sda3 file system

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question