Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux Mount var folder problem

Posted on 2010-11-18
3
Medium Priority
?
534 Views
Last Modified: 2012-05-10
I want to mount an external harddrive to var folder but whenever i mount it aftrer installing brand new linux cent os it looses all folders in it , how should i securely mount disk to var folder without loosing all content in var
0
Comment
Question by:3XLcom
3 Comments
 
LVL 7

Accepted Solution

by:
Hatrix76 earned 1400 total points
ID: 34167759
You do not loose anything.

you have to understand what mounting means. You mount a filesystem to a directory, and the directory will become the new filesystem (in your case the external harddrive). All contents below the mount-directory (in your case var) will not be accessible until you unmount the harddrive.

Why in the first place do you want to mount something to /var?

normaly you mount something to /media/<something> or /mnt/<something> .... the logic of mounting something to /var eludes me in the moment.

If there is a real reason to mount to your /var please state your requirements for doing so.

best
Ray
0
 
LVL 23

Assisted Solution

by:savone
savone earned 600 total points
ID: 34167797
Hatrix76 explained why your stuff is not accessible when mounting external HD to var.

If you want to keep your external HD mounted to var and still have the stuff in var accessible, you will have to move all the stuff in var to your HD.

So mount your external HD to /mnt/exthd (or whatever floats your boat)

Then move everything in var to /mnt/exthd

then unmount /mnt/exthd and remount it at var like you want.

0
 

Author Closing Comment

by:3XLcom
ID: 34167893
i see :) i have a scsi disk 140 Gb but my web sites is more then 200Gb so i bought an external disk , plesk use var folder for store emails and vhosts and ....
ok i will try it :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to moveā€¦
Suggested Courses
Course of the Month11 days, 21 hours left to enroll

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question