Solved

mount a partition

Posted on 2011-03-21
14
274 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
 

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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now