0

CentOS 6 server currently has the following volumes:

/boot
/

Is it possible to create a new volume that is a mounted SMB share? E.g.:

/nas

Currently this share is mounted by fstab to /mnt/nas, however I'd like to not be under /. I need to backup the entire / volume to this SMB share.

0

The normal way to move a volume from one mount point to another is something like:

1) Create the new mount point:

mkdir /nas

2) Unmount the SMB share from the old mount point:

umount /mnt/nas

3) Open /etc/fstab in your favorite text editor and change "/mnt/nas" to "/nas":

${EDITOR:-editor} /etc/fstab

4) Mount the SMB share at the new mount point:

mount /nas

5) Remove the old mount point since you don't need it anymore:

rmdir /mnt/nas

But that probably won't solve your real problem since "/nas" is still under "/".

What program are you going to use when you're making the backup?

Some of them have options to either skip a directory (in your case you would want to skip "/mnt/nas" and/or "/nas") or to stay on one filesystem (in your case you would then have to make two backups, one of "/" and one of "/boot").

If possible, I would suggest finding a backup program that lets you stay on one filesystem. You most likely also want to skip "/dev", "/proc", "/run", "/sys" and maybe more. That's a lot of typing and you're likely to forget to skip a (pseudo) filesystem.

It's much easier to specify that you want to backup this filesystem and stay on that filesystem, even if it means you'll have to run the backup program first for "/" and then for "/boot".

For "cp", "rsync" and "tar", the option you're looking for is "--one-file-system".

  • Thanks for your reply. I am trying to setup ShadowProtect SPX which does not appear to allow for the skipping of any directory. In fact the / filesystem cannot be selected at all. I think I'll have to try a different product. – Ash Sep 7 '15 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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