Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

mount a partition

Posted on 2011-03-21
14
277 Views
Last Modified: 2012-05-11
Mounting refers to logically attaching a filesystem to a specified location on the currently accessible (and thus already mounted) filesystem(s) on a computer system so that its contents can be accessed by users. Unmounting refers to logically detaching a filesystem from the currently accessible filesystem(s).

If I shut down the computer, do all mounted filesystems disappear?

Thanks,
Hui
0
Comment
Question by:zhshqzyc
  • 7
  • 5
  • 2
14 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 25 total points
ID: 35185984
They do but when the system boots, it reads the file system table file also called fstab (/etc/fstab).

All the mounts written in this file are mounted when the system boots up
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35186030
You can read the description of /etc/fstab at http://linux.die.net/man/5/fstab
0
 
LVL 12

Assisted Solution

by:upanwar
upanwar earned 25 total points
ID: 35187499
If the file system are mounted manually by issueing a command in command prompt then it will disappear when you shutdown your box.

But if you have their entry in /etc/fstab or you have mounted them with autofs then no need to worry, you are good.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:zhshqzyc
ID: 35189507
Can you look at the fstab? Should I mount it again?
#
# /etc/fstab
# Created by anaconda on Sat Mar 19 22:13:49 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=8db49615-ca64-44ae-b0bc-9fef8e977575 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

Open in new window

0
 
LVL 12

Expert Comment

by:upanwar
ID: 35189544
Pleas show output of df -Th and mount as well.
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35189552
Pleas show output of df -Th and mount as well.
0
 

Author Comment

by:zhshqzyc
ID: 35189740
[hzhao@localhost etc]$ df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
              ext4     25G  2.3G   23G  10% /
tmpfs        tmpfs   1004M  272K 1004M   1% /dev/shm
/dev/sda2     ext4    485M   31M  429M   7% /boot

Open in new window

0
 
LVL 12

Expert Comment

by:upanwar
ID: 35189787
If you require the currently showing partition in DF -Th to be available after reboot then you are good. You fstab file having the entry for the same.

0
 

Author Comment

by:zhshqzyc
ID: 35192635
Not sure what is wrong?
[hzhao@localhost /]$ df -TH
Filesystem    Type     Size   Used  Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
              ext4      27G   2.7G    24G  11% /
tmpfs        tmpfs     1.1G   267k   1.1G   1% /dev/shm
/dev/sda2     ext4     508M    33M   450M   7% /boot
[hzhao@localhost /]$ fdisk -l
[hzhao@localhost /]$ mount ntfs -3g /dev/sda1 /windows
mount: invalid option -- '3'
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
One can change the type of mount containing the directory dir:
       mount --make-shared dir
       mount --make-slave dir
       mount --make-private dir
       mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
       mount --make-rshared dir
       mount --make-rslave dir
       mount --make-rprivate dir
       mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
[hzhao@localhost /]$ 

Open in new window

0
 
LVL 12

Expert Comment

by:upanwar
ID: 35192730
If you need below given to be available after reboot. then you are good. No need to worry. I have checked your fstab file having the entries for these file system, after reboot it will mount them.

[hzhao@localhost /]$ df -TH
Filesystem    Type     Size   Used  Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
              ext4      27G   2.7G    24G  11% /
tmpfs        tmpfs     1.1G   267k   1.1G   1% /dev/shm
/dev/sda2     ext4     508M    33M   450M   7% /boot

What do you want to do in your above comment. Why did you paste this.
0
 

Author Comment

by:zhshqzyc
ID: 35193002
The question is that I reboot several times then I go to the mounted partition. Nothing is found.
[hzhao@localhost /]$ ls
bin     dev   lib         media  opt   sbin     sys  var
boot    etc   lib64       mnt    proc  selinux  tmp  windows
cgroup  home  lost+found  null   root  srv      usr
[hzhao@localhost /]$ cd windows
[hzhao@localhost windows]$ ls
[hzhao@localhost windows]$ 

Open in new window

0
 
LVL 12

Expert Comment

by:upanwar
ID: 35195604
Which partition is missing? Was it a local or a network share ?

Earlier you have given your fstab file and df -Th output. As per that all filesystems which you require were in fstab file. These FS are available after reboot.

Now explain your situation in detail so that we can help you.
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35195608
The filesystem you are looking on windows directory was a network file system or a local filesystem. Means the disk is added in your box or you have a windows partition on your disk it self or you have shared that from another box.
0
 

Author Comment

by:zhshqzyc
ID: 35198194
It's a windows partition. There are a lot of files there. I reboot from windows, everything is fine. But when I access from Linux cd windows, nothing found. Maybe I used fdisk several times??

Anyway, I may re-install Fedora and re-mount the partition to see what is going on.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Samba Question 11 75
The better OS Architecture 13 64
Apache LDAP Authentication 20 31
Disabling security updates Ubuntu 3 30
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

856 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