Solved

How to mount new partition on Linux

Posted on 2004-08-13
5
347 Views
Last Modified: 2010-04-03
I have been away from Linux for several years now and have forgotten most everything. Don't even have my books anymore. Nevertheless, I am administering a Linux server (kind of shows you how hard that is!! :)

In any case, I need to mount a partition and am not getting anywhere. I would like something like Disk Druid, but I read that it is only available during installation. So I created the new partition using Partition Magic from NT.

The OS is RedHat 8. Here is the current configuration (hdb is the one of interest):

120 GB hda:
   Windows NT in first partition
   swap partition
   boot partition
   / partition

30 GB hdb:
   small NTFS partition
   newly formatted ext3 partition on most of the disk--this is the one I want to mount

What I need to know is what I need to do to mount this partition. I have tried

   mount -t ext3 /dev/hdX /var/local/Backup/mnt-hdb

where /dev/hdX refers to attempts at different numbers from 1 thru 3
and where /var/local/Backup/mnt-hdb is a newly created directory.

I always get an error message.

Eventually I would like to edit fstab so that this partition is auto-mounted. I am looking for the proper mount command and fstab entry.
0
Comment
Question by:jasimon9
  • 3
5 Comments
 
LVL 15

Assisted Solution

by:scampgb
scampgb earned 40 total points
ID: 11799692
Assuming that the second disk is an IDE drive, and the OS sees it as hdb, it should be as simple as:

mount /dev/hdb1 /var/local/Backup/mnt-hdb

That also assumes that the partition is the first one on the disk.
BTW, You can look at this with fdisk /dev/hdb

0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 85 total points
ID: 11800809
mount -t ext2 /dev/hd2 /var/local/Backup/mnt-hdb

Should work, however note the following:

1.    The type is ext2 (ext3 is ext2 with a journalling). I'm not sure what happens with journalling when an ext3 system is potentially mounted outside of the initialisation process. (Once it works with ext2, try switching to ext3).

2.    The dev is /dev/hda2  (The disc is hda, and the first partition is the NTFS partition(hda1), and the second is hda2...BUT....if hda2 is set up as an extended partition, then the one you want could be hda3). As suggested:

fdisk /dev/hdb

p then prints the partition table
q quite
m gives a menu

3.    The mount point MUST exist.

mkdir /var/local/Backup/mnt-hdb

if it doesn't already exist

HTH:)
0
 

Author Comment

by:jasimon9
ID: 11802679
1. So far both posts are helpful in answering my first question. It appears that I just did not go out far enough, only trying hdb0, hbd1, hdb2, and hdb3. It turned out the partition I wanted is hdb6, and for some reason only hdb1, hdb5 and hdb6 are listed on the fdisk listing.

2. Now I just need to make the proper changes so that this volume is automounted. Either the line that I need, or a tool to use that does it right.
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 85 total points
ID: 11803381
Add the following line to your /etc/fstab

/dev/hdb6               /var/local/Backup/mnt-hdb                    ext2    defaults        0 0

If it works try changing ext2 to ext3 to get the journalling. The 0 0 at the end relate to how often file checks should occur on the partition.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 11803386
The fact that you can only see hdb1, hdb5 and hdb6 is a historical issue in that DOS could only boot from partitions 1-4 and only one bootable partition was allowed on a hard drive. This is avoided by creating an extended partition, and sticking the linux partition in that.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Don't buy such-and-such disk drives, they are not reliable!    Boy, how many times have we read a post from a well-meaning person who had some bad experiences with a drive and now they exclaim the entire company's products can't be trusted.  First, …
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

760 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