Solved

Mounting free space

Posted on 2002-03-16
3
258 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

705 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

18 Experts available now in Live!

Get 1:1 Help Now