[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

Mounting free space

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
Ned_Kelly
Asked:
Ned_Kelly
  • 2
1 Solution
 
jlevieCommented:
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
 
Ned_KellyAuthor Commented:
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
 
jlevieCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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