Replacing a drive that was set with pct set

nhasian

Renowned Member
Aug 25, 2016
14
7
68
48
Hello,

In my /etc/fstab I have a physical hard disk mounted as /data that I am giving direct access to a container. Originally I used the command:

Code:
pct set 100 -mp0 mp=/data,/data

Now I would like to replace the drive. What changes do I need to make? I'm guessing that all I have to do is install the new drive, partition/format it and set the new UUID in my /etc/fstab. Do I need to do anything further with the pct command? Or does it just pass the /data from the filesystem to the /data mountpoint in the container?
 
Hi,
Or does it just pass the /data from the filesystem to the /data mountpoint in the container?
yes, it's a bind mount, meaning the same part of the file hierarchy is mounted at two places, once inside the container and once on your host. Whenever that part of the file hierarchy changes it should be visible from both mount points immediately. So even if you mount something else to /data on the host, the container will see it as well.
 
  • Like
Reactions: nhasian