Solved

mount a partition

Posted on 2011-03-21
14
282 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
[X]
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
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

734 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