How do I map a lun from a san

I have added a lun to my san and it appears to be seen by the linux server.  How do I mad this lun to a specific directory and how can I copy the contents (including subdirectories) from an existing file structure to it.

I want to map the new volume to /opt/zimbra/backup but first need to move the data already there to the new volume.

Here is the info from the df command on the sysdtem:
Filesystem           1K-blocks      Used Available Use% Mounted on
                      37219896  31290052   4039132  89% /
/dev/sda1               101086     19140     76727  20% /boot
none                   1947656         0   1947656   0% /dev/shm
/dev/sdb1            144189460 104754120  32110908  77% /opt/zimbra
Who is Participating?
Kent OlsenConnect With a Mentor Data Warehouse Architect / DBACommented:
Hi gordonmann,

Create a directory, mount the volume, copy the data, and remount it.

mkdir /newdir
mount /dev/sdb1 /newdir
copy -R oldpath /newdir

umount /oldpath
mount /dev/sdb1 oldpath

Good Luck,
gordonmannAuthor Commented:
The copy (cp) command did not copy all the subdirectories
omarfaridConnect With a Mentor Commented:

cp -r
gordonmannAuthor Commented:
Thanks to all
With Zimbra a simple cp -r will copy more than you are looking for.

You will more than likely want to do an rsync -aH  (archive and hard links). With zimbra shared objects you will get far more data to your destination than your source.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.