1

I have a Debian server, my partition /dev/sda6 (which has a lot of space left) is mounted on /cache. I want to use this partition for file backup.

I want to change the name of /cache to /backup. When I tried to do this by mv it told me "Device or resource busy". So how can I do it properly?

Thanks.

1
  • If this isn't a duplicate of some question here, it should be. Long story short, you unmount the file system, change the mount point, edit /etc/fstab, then mount the file system again. You can't change the mountpoint while the file system is mounted.
    – user
    Aug 10, 2015 at 9:42

2 Answers 2

3

Create a folder called /backup

Open /etc/fstab

Change mountpoint of /dev/sda6 to /backup

Reboot

Confirm it is mounted at /backup by typing mount into a terminal.

Delete the other folder with rmdir (only deletes empty folders)

Enjoy

0
0

No need to Reboot. Create a directory /backup

umount -lz /cache

edit /etc/fstab

vi /etc/fstab

and change the directory name

mount -t ext3 /dev/sda6 /backup

(ext3 or ext4 or any format of the drive)

or

mount -o remount /

1
  • This answer seems to be missing critical information on how to accomplish each step. Consider adding that missing comment so the answer is complete.
    – Ramhound
    Aug 31, 2015 at 15:05

You must log in to answer this question.

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