how to move a directory from current partition/drive to a new partition/drive

General support questions
User avatar
jlehtone
Posts: 2387
Joined: 2007/12/11 08:17:33
Location: Finland

Re: how to move a directory from current partition/drive to a new partition/drive

Post by jlehtone » 2019/11/01 09:53:39

Yes.

Note that once you have a filesystem, you have to mount it to somewhere else than /var/lib/mysql, at least temporarily.
Otherwise you cannot copy from /var/lib/mysql into the new volume.

If you will mount the new filesystem to /var/lib/mysql (and only there), then the entry in fstab is more similar to existing entries (i.e. not a "bind").
It is good to refer to filesystem with UUID. You can see UUIDs with:

Code: Select all

blkid
Note also, that if you have file X in /var/lib/mysql and mount something to /var/lib/mysql, then you cannot access the X, because it is hidden by the mount (yet occupies space within the '/' filesystem).

StariBrko
Posts: 25
Joined: 2012/08/24 12:35:50

Re: how to move a directory from current partition/drive to a new partition/drive

Post by StariBrko » 2019/11/07 10:35:26

just want to inform you that everything passed as smooth as it is possible and works as a charm.

topic solved with success.

thanx again

Post Reply

Return to “CentOS 7 - General Support”