0

I have an Ubuntu machine with some additional attached storage. I mount the storage and create a directory in it as follows:

sudo mkfs.ext4 /dev/xvdf
sudo mount -t ext4 /dev/xvdf /home/ubuntu/tempDir
cd /home/ubuntu/
sudo chmod a+w tempDir
sudo chmod a+x tempDir

I want to move and rename the directory, e.g.

mv /home/ubuntu/tempDir /some/other/location/newName

That is, the directory will now be called newName. Do I have to re-mount in order to make sure the new dir is still attached to the extra storage?

2 Answers 2

1

Yes, you have to remount for it to work. Also, you may have problems if you change the directory name while the file system is still mounted.

I would suggest your unmount, rename, and then remount.

Additionally, if the mounts are in fstab you should use: Edit /etc/fstab unmount and mount again.

1

Yes.

By the way, this question belongs under SuperUser...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .