• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 299
  • Last Modified:

mount a partition

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
zhshqzyc
Asked:
zhshqzyc
  • 7
  • 5
  • 2
2 Solutions
 
farzanjCommented:
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
 
farzanjCommented:
You can read the description of /etc/fstab at http://linux.die.net/man/5/fstab
0
 
upanwarCommented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
zhshqzycAuthor Commented:
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
 
upanwarCommented:
Pleas show output of df -Th and mount as well.
0
 
upanwarCommented:
Pleas show output of df -Th and mount as well.
0
 
zhshqzycAuthor Commented:
[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
 
upanwarCommented:
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
 
zhshqzycAuthor Commented:
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
 
upanwarCommented:
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
 
zhshqzycAuthor Commented:
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
 
upanwarCommented:
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
 
upanwarCommented:
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
 
zhshqzycAuthor Commented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now