Solved

Mounting free space

Posted on 2002-03-16
3
259 Views
Last Modified: 2010-08-05
Hi folks, I have created the dir /mnt/free-space and I'm trying to have it mount on boot up.
My problem is what do I call it and what do I set the file type to, the line that I tried caused an error and I had to go in and delete the entry in vi as it booted up.
Said line:-
/dev/hda   /mnt/free-space    auto   defaults  1 2
My understanding of it is this.
/dev/hda  :first hard drive, I wasn't sure which partition to give it, I tried 7 which was the next free number unused.
/mnt/free-space  :Directory into which the partition is read.
auto  :Seeing as it is free space I thought the system would be able to work it out, as its unformatted as yet
defaults  :My understanding of this is the different types of installed systems that it will accommodate
1 2   :I'm not to sure here apart from a guess that its to do with the order in which the devices are mounted.
Any help would be greatly appreciated.
Your friendly bushranger,
Ned Kelly
0
Comment
Question by:Ned_Kelly
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 25 total points
ID: 6871494
Before you can mount something that something has to contain a valid file system. In this case I assume that you have some extra space available on your boot disk that you'd like to use. The first step in making that available to the system will be to create a partion that occupies the free space with fdisk or disk druid. Once you have a partion you'll what the partition number is (7 from what you say in the question) and  can make a Linux file system with 'mkfs /dev/hda7'. Then you'll be able to mount the file system by adding:

/dev/hda7  /mnt/free-space  auto defaults 1 2

to /etc/fstab. Note that you can manually mount it with 'mount /dev/hda7 /mnt=free-space'.
0
 

Author Comment

by:Ned_Kelly
ID: 6871523
Thanks jlevie, this would explain the error I was getting on boot. Any knowledge to fill fill in the gaps on the last three entries in the line please.
Regards
Ned
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6871604
On the assumption that your question is about the line that goes into /etc/fstab...

The first field is the block special device that contains the filesystem to be mounted.

The second field specifies where the filesystem is to be mounted.

The third field specifies the type of filesystem. You can explicitly specify one of the supported types (ext2, ext3, nfs, etc) or use auto and let mount figure it out from what it sees on the filesystem.

The fourth field is used to specify mount options to be used when mounting the filesystem. The list of available options is dependant on what kind of filesystem is being mounted. 'defaults' simply says to use the default options for whatever filesystem is mounted.

The fifth field is used to enable/disable dumping of filesystems by the dump command. A value of 1 enables dumps and a value of 0 disables them.

The sixth and last field determines where in the fsck sequence this file system is to be checked.

All of this, and much more, can be found in the man page for fstab (man fstab).



0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

914 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

17 Experts available now in Live!

Get 1:1 Help Now