Solved

Mounting free space

Posted on 2002-03-16
3
264 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
[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
  • 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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