LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-02-2006, 12:17 PM   #1
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Rep: Reputation: 15
Unhappy Does umount command hides all the data in a partition ?


Hi,

pls help me as i have a conceptual problem regarding the umount command.

Suppose i have a partition /dev/sda5 which has been mounted to /home. Now /dev/sda5 is the physical partition and /home is the logical partition.So the data that we see in /home actually resides on /dev/sda5.Now if i give a ommand like #umount /dev/sda5 that would imply that /home would be empty. But in my machine even aftr isuing this command
i cab still see some contents in /home. How ?

Secondly if /usr is formatted will the machine run all the applications after rstarting ?
 
Old 03-02-2006, 12:49 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
There is no such thing physical partition and logical partition. Only a disk partition, which could be primary or extended. (well, trehre is but in another context - LVM - which is not the case)

/dev/sda5 is a partition and /home is a mount point for /dev/sda5.

You can mount /dev/sda5 over any directory on the filesystem. The contents in that directory becomes "invisible" and you can only see the data that comes from the mounted partition. As soon you umount it, the original data in that directory is visible again.

The data you have in the mount point /home is result of some mistake you may have done before, like creating files, or starting a window manager without mounting /dev/sda5 first. It will be there forever until you remove it. If you do, make sure this time, the /dev/sda5 is not mounted otherwise you will remove the data from /dev/sda5 not from the underlying /home directory !

Quote:
Originally Posted by sambyte
Secondly if /usr is formatted will the machine run all the applications after rstarting ?
No. Very critical programs are in /usr, specially in /usr/sbin. The X windows system is under /usr/X11 just to mention one.

cheers,

Last edited by marozsas; 03-02-2006 at 12:54 PM.
 
Old 03-02-2006, 12:53 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by sambyte
Now /dev/sda5 is the physical partition and /home is the logical partition.
Technically /dev/sda5 is the device associated with the first logical partition on the first harddrive, and /home is the mountpoint for this device.

Quote:
Now if i give a ommand like #umount /dev/sda5 that would imply that /home would be empty. But in my machine even aftr isuing this command i cab still see some contents in /home.
You would still be able to see the /home directory, but there shouldn't be anything in it. Unless there was something already there before you mounted /dev/sda5 over the top of it. The mount of /dev/sda5 would have hidden what was there before and the umount would have revealed it again. Mountpoints are generally empty directories to start with. Was yours?

Quote:
Secondly if /usr is formatted will the machine run all the applications after rstarting ?
I have no idea what you're asking here. "format" is like "wipe clean and start over". So any applications would be gone. Your system would not be very happy if you wiped out /usr. You could still boot to single-user mode, things wouldn't be totally dead, but neither would they be fully functional.
 
Old 03-02-2006, 11:44 PM   #4
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
Hi,
Thanks for your reply.i have almost got it. But still i have one more point to clear. Suppose i have unmounted /dev/sda5 . In that case the contents of /dev/sda5 would now be no longer visible in /home.If now at this juncture i create some files in /home where would be the files be saved ? Not in /dev/sda5
for sure ..... So is it going to be saved in / ?

Pls Help
 
Old 03-03-2006, 12:57 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
No, it's saved in the directory '/home' which is a subdirectory of '/'
 
Old 03-03-2006, 01:23 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
This may help:

1. All files and directories are stored in partitions--ie somewhere on a physical disk.

2. Partitions are mounted to the master directory tree. Instead of "mounted", read "attached"--may make it easier to follow.
In the simplest possible system, there is ONE partition mounted at /. This partition contains all of the sub-directories to /. If it were possible to unmount it without stopping the system, you would see **nothing** in the directory tree. (The reason, of course, that the system would crash is that IT would see nothing...)

3. When you mount a partition, you overlay its structure on top of whatever was associated with the mount point---thus all the files that you saw there now **appear** to be replaced by the newly mounted partition's structure. The old files and subdirectories are still there--they are just hidden. They are safe because you cannot access them to erase or modify. They could, however, also be safe from you ever finding them......

4. Based on the above, mounting a partition to anything but an empty directory can cause more confusion than most of us can deal with. Save yourself the grief and don't do it.....
 
Old 03-03-2006, 11:24 PM   #7
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
Hi,
Thanks all for your help
 
  


Reply



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
umount hangs on my ipod after writing data icpsvt Linux - Hardware 2 01-05-2006 12:42 AM
lilo hides a fat32 partition amimusa Linux - Software 1 01-09-2005 09:03 AM
Unable to umount partition sgfx Linux - Newbie 3 07-10-2004 10:42 AM
umount a hd swap partition? GoinEasy9 Linux - General 6 04-09-2004 11:34 PM
Partition umount on Mac PowerPC stomcavage Linux - Hardware 0 08-02-2002 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 PM.

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