LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2012, 04:43 AM   #1
anwar5006
LQ Newbie
 
Registered: Jan 2012
Posts: 20

Rep: Reputation: Disabled
Unable to add Disk in RedHat


Hi Friends,

I tried to add disk in my machine, referring the following link

http://www.linuxplanet.com/linuxplanet/tutorials/4232/1

It was unsccessful, after few weeks i dint use my machine, now when i checked, i couldnt find that disk,

Disk size is 6GB and mounted as different partition /opt. but now i couldnt find.

even fdisk /dev/sdb, is not working.

[root@hostname dev]# fdisk /dev/sdb
bash: fdisk: command not found
[root@hostname dev]#


[root@hostname dev]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
8.6G 2.6G 5.6G 32% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
[root@hostname dev]#
 
Old 02-10-2012, 05:40 AM   #2
Fantasio
Member
 
Registered: Nov 2007
Location: Vinsobres - Drome - France
Distribution: SuSE Linux 11.3
Posts: 152

Rep: Reputation: 19
what give dmesg,fdisk -l ?
 
Old 02-10-2012, 05:52 AM   #3
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by anwar5006 View Post

It was unsccessful, after few weeks i dint use my machine, now when i checked, i couldnt find that disk,
If it was unsuccessful the first day you tried how do you expect it to work after few weeks?

Quote:
Originally Posted by anwar5006 View Post
[root@hostname dev]# fdisk /dev/sdb
bash: fdisk: command not found
this output has nothing to do with missing external HDD

run this command
Code:
#export PATH=$PATH:/sbin/bash
or
Code:
#/sbin/bash/fdisk -l
and post the output
 
Old 02-10-2012, 08:20 AM   #4
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Sounds like a hardware problem, first go into your bios and make sure the drive is being picked up on the POST, check the wires also.
 
Old 02-10-2012, 02:20 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Become root. Run
Code:
fdisk -l
#  If command-not-found error, try
# /sbin/fdisk -l
Report the findings here.

A general recipe is:
  1. use fdisk to find the partition of interest
  2. decide on an appropriate mountpoint
  3. mount the partiton at the mountpoint
  4. access files on the device
  5. optionally, add the partition to /etc/fstab for future mounts
The command above is step 1 in the recipe.

--- rod.

Last edited by theNbomr; 02-10-2012 at 02:24 PM.
 
Old 02-12-2012, 03:05 AM   #6
anwar5006
LQ Newbie
 
Registered: Jan 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Hi All,

thanks for your response.

/sbin is not included in my environment variable PATH, so fdisk -l was not accessible. fdisk -l is working under the location /sbin

[root@hostname sbin]# ./fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1305 10377990 8e Linux LVM

Disk /dev/sdb: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 783 6289416 83 Linux
[root@hostname sbin]#


content of fstab:-

[root@CSCWMEALD199V sbin]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sdb1 /opt ext3 defaults 1 1


after adding disk i was able to view /opt partition, but after a reboot of a system, i couldnt see /opt partition

[root@CSCWMEALD199V sbin]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
8.6G 2.6G 5.6G 32% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
[root@CSCWMEALD199V sbin]#

Kindly Help me please.
 
Old 02-12-2012, 10:15 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
As root, run mount -a. Run mount, and report results here. You will probably be seeing some error messages about why the 6.4GB partition cannot be mounted.
--- rod.
 
Old 02-12-2012, 11:51 AM   #8
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Code:
/dev/sdb1 /opt ext3 defaults 1 1
You can't just mount the drive to /opt you need to make a directory in /opt or at some other point like maybe /mnt/mount point

Read This
 
Old 02-13-2012, 04:09 AM   #9
anwar5006
LQ Newbie
 
Registered: Jan 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
[root@hostname wmeadmin]# mount -amount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


[root@hostname wmeadmin]# mount/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@CSCWMEALD199V wmeadmin]#
 
Old 02-13-2012, 07:09 AM   #10
anwar5006
LQ Newbie
 
Registered: Jan 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
If i mount /dev/sdb on /mnt/sdb, after reboot, i couldnt see the mounted partition.

mount /dev/sdb /mnt/sdb

unable to view after reboot

[wmeadmin@CSCWMEALD199V ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
8.6G 2.6G 5.6G 32% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
[wmeadmin@CSCWMEALD199V ~]$

please provide a solution for this
 
Old 02-13-2012, 12:40 PM   #11
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You cannot mount a device (/dev/sdb); only partitions can be mounted (/dev/sdb1, /dev/sdb2, ...) But mount is reporting that there is a problem with your partition /dev/sdb1. We see this when you try to mount all of the partitions listed in fstab. It looks like the last time the partition was mounted or unmounted, it became corrupted. Did you inspect the system logs (run dmesg or view /var/log/messages), as the error messages suggested?
You can try to test & fix it with fsck.
Code:
fsck /dev/sdb1
There is nothing wrong with using a separate partition for the /opt tree, if that is the way you want your filesystem arranged.

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to Load Redhat Linux 9 Server after disk recovered pakuwal Linux - Server 1 03-13-2011 09:44 AM
Incresing disk device to / root disk Redhat Enterprise server 4 lamoul Red Hat 1 03-25-2010 04:40 PM
How to add a scsi disk in RedHat Enterprise Linux v 4 LotharIrausquin Linux - Enterprise 3 04-04-2008 07:37 PM
Unable to add hardware RAID on Redhat EL4 landev Linux - Hardware 2 08-21-2007 04:23 PM
unable to add programs from add/remove programs dav7500 Linux - Software 2 02-26-2004 07:25 PM


All times are GMT -5. The time now is 03:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration