Solved

How to mount new partition on Linux

Posted on 2004-08-13
5
353 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
[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
  • 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tivoli Backup create analytic backup report 2 58
S2D for SMB or vSAN 1 106
Run Server 2012 on PowerEdge 2950 13 80
SyncBackPro or easeUS Todo Backup 16 67
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
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 Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
Suggested Courses

734 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