Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-07-2008, 06:57 AM   #1
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Rep: Reputation: 51
Directories gets deleted !!!Confused !!!

I have been running few steps but whenever I run:
# mount -a

The Directories gets deleted.

Here are the steps I have been following:

#Creating the fsadmin folders and user IDs
cd /home/
mkdir fsadmin
useradd -c "Feature Server User" -d /home/fsadmin -m  fsadmin
cd fsadmin
mkdir logs
mkdir archive
mkdir tomcat
mkdir traces
mkdir mysql

#Mount the logical volumes Created
echo "/dev/lvm01-lvfs.vol on /home/fsadmin type ext3 (rw)" >> "/etc/fstab"
echo "/dev/lvm01-lvfslog.vol on /home/fsadmin/logs type ext3 (rw)" >> "/etc/fstab"
echo "/dev/lvm01-lvfstomcat.vol on /home/fsadmin/tomcat type ext3 (rw)" >> "/etc/fstab"
echo "/dev/lvm01-lvfstrace.vol on /home/fsadmin/traces type ext3 (rw)" >> "/etc/fstab"
echo "/dev/lvm01-lvfsarchive.vol on /home/fsadmin/archive type ext3 (rw)" >> "/etc/fstab"
mount -a
When I run the mount -a seen above all the directories manually created like logs,archive,tomcat gets deleted.

Anyone having idea why is is behaving so?
Old 08-07-2008, 07:42 AM   #2
LQ Newbie
Registered: Jan 2006
Posts: 28

Rep: Reputation: 15
How about umount the /home. I think your created directories will appear again.

Check the /etc/fstab see whether there is a mount point for /home.

Last edited by sleepyhomme; 08-07-2008 at 07:43 AM.
Old 08-07-2008, 07:46 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
You are mounting to a directory (mount point) after creating the subdirectories. Whenever you mount (connect) something to the filesystem tree, it hides what was there previously.

Let's assume that /home/username is on one partition (or drive) and that the logical volumes are on another. You create directories in /home and they (and their data) are stored on that partition. If you then mount a different partition to /home/username, you will see the contents of the new partition. The old stuff is still there and can be seen by simply unmounting the new.

I'm surprised there weren't error messages from mount -a. As soon as something was mounted to /home/fsadmin, those subdirectories would have become hidden.
Old 08-07-2008, 11:07 AM   #4
Senior Member
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
The error messages might be there in the log. Or they might not. This has the look of a batch script. I would like to see that fstab printed out if he has run this several times.

Could be that whatever is mounted on /home/fsadmin now has directories named logs, tomcat, traces, archive and each of those has something mounted.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused nay Very Confused chrystlenight SUSE / openSUSE 3 08-28-2007 05:57 PM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 03:22 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
Kmail crashes when deleted mail is deleted dufferin Slackware 0 03-21-2005 03:23 PM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration