Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Apr 12 '13 at 8:05

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

Yes.

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.