LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-22-2013, 02:32 AM   #1
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 20

Rep: Reputation: Disabled
Unhappy It showing 0 for all partition when i add new hard disk


[root@oeis-l03 ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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 2610 20860402+ 8e Linux LVM

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1 0 0 Empty
Partition 1 does not end on cylinder boundary.



CAN ANYONE HELP ME TO SOLVE THIS?. I M NEW IN LINUX
 
Old 07-22-2013, 03:37 AM   #2
tg3793
Member
 
Registered: Jul 2009
Location: Philippines
Distribution: Linux Mint 13 (Mate Edition)
Posts: 50

Rep: Reputation: 12
All I can offer (at the moment) are a couple of troubleshooting steps to gather more information. Do you have another boot disk (CD or USB perhaps) that you can start up, and then take a look at the drive again. Let us know if you get the same results.
 
Old 07-22-2013, 05:27 AM   #3
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Unhappy

No. Actually my linux machine is hoasted on the VM server. When i created this my Limux VM that time i kept only 20GB hard disk. Now i increased the another hard disk of 20GB.
Then I ran some commands in terminal
fdisk /dev/sdb
fdisk a
1
w

Now when i check the partition it show the following output of newly added disk sdb as
Disk /dev/sdb: 2610 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sdb1 * 0 - 0 0 0 Empty
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
 
Old 07-24-2013, 10:25 PM   #4
tg3793
Member
 
Registered: Jul 2009
Location: Philippines
Distribution: Linux Mint 13 (Mate Edition)
Posts: 50

Rep: Reputation: 12
I'm assuming that you mean you have a Virtual Machine running. Should I also guess that you are using VMWare? Perhaps if you provided a few other details; like the OS that you are running the Virtual Machine on top of?
 
Old 07-25-2013, 01:51 AM   #5
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
My linux OS is Red Hat 5.5
Previously i had 20GB hard disk which is working properly.
Now my requirement is increased and i added another 20 GB hard disk.
Now the hard disks are sda and sdb.
First hard disk 'sda' is working, visible and i m able to do anything here. BUT 2nd hard disk 'sdb' is not yet visible.
I also ran the following commands after adding the 2nd hard disk
fdisk /dev/sdb
fdisk a
1
w
[root@oeis-l03 ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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 2610 20860402+ 8e Linux LVM

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1 0 0 Empty
Partition 1 does not end on cylinder boundary.
[root@oeis-l03 ~]#

BUT STILL THIS HARD DISK 'SDB' IS NOT DETECTABLE FOR ME. MAY BE I MISSED SOME 'MOUNT' COMMAND. CAN YOU HELP ME TO SOLVE THIS PROBLEM. TELL ME THE COMMAND
 
Old 07-25-2013, 02:14 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by onkar_nimje View Post
I also ran the following commands after adding the 2nd hard disk
fdisk /dev/sdb
fdisk a
1
w
This isn't correct, it will create an empty type (as you can see from the output you posted). A disk needs to be set up with one ore more partitions, which you did not do.

Try the following:

Start by removing the faulty entry:
Code:
fdisk /dev/sdb
d

# you should now have a clean disk
# to create one partition, do the following:

n
p
1
<enter>
<enter>

# check if the new entry is visible
p

# you should see something like this at the bottom (bold parts may differ):
/dev/sdb1    1   999     99999999   83 Linux

# safe the changes and exit:
w
You should now have access to /dev/sdb1
 
Old 07-25-2013, 04:13 AM   #7
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks....
Now i got this correct output

[root@oeis-l03 dev]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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 2610 20860402+ 8e Linux LVM

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 2610 20964793+ 83 Linux
[root@oeis-l03 dev]#

BUT WHEN I M GOING TO CHECK THE DISK SPACE THEN THIS NEWLY ADDED DISK IS NOT COMING IN LIST
see the following output
WHERE IS 'SDB1' WITH 20gb? ITS SHOWING ONLY SDA1

[root@oeis-l03 dev]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
16G 2.3G 13G 16% /
/dev/sda1 99M 17M 78M 18% /boot
tmpfs 2.3G 0 2.3G 0% /dev/shm
 
Old 07-25-2013, 04:30 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
You also need to:

1 - create a filesystem on /dev/sdb1
I don't know what you prefer, so this example creates a ext3 journaling file-system:
Code:
mke2fs -jv /dev/sdb1
/dev/sdb1 is now ready to be mounted.

2 - mount /dev/sdb1 on a mountpoint
Only you know what this new disk needs to be used for, so the following is just an example:
Code:
# create a mountpoint:
mkdir /media/ExtraSpace

# mount /dev/sdb1:
mount /dev/sdb1 /media/ExtraSpace
/dev/sdb1 is now mounted on /media/ExtraSpace, df -h should show this entry.

3 - automated mount during boot
If you want/need this disk to be mounted automatically when booting you need to add an entry in /etc/fstab:
Code:
# open /etc/fstab with your editor and add the following at the end:

/dev/sdb1   /media/ExtraSpace   ext3  defaults            0 2
Do remember: /media/ExtraSpace is just an example, change this to your needs.

Last edited by druuna; 07-25-2013 at 04:32 AM. Reason: fixed typo
 
Old 07-25-2013, 05:45 AM   #9
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks a lot...Now i got my full answer...Thank you very much
 
Old 07-25-2013, 05:57 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
You're welcome

BTW: Can you put up the [SOLVED] tag (top right hand corner)
 
1 members found this post helpful.
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add virtual hard disk parmanentally, if i add like this.... nandunay Linux - Server 0 06-09-2012 02:29 AM
Showing different Hard disk size manoj.linux Linux - Enterprise 1 04-07-2010 07:56 AM
sata hard disk is showing hd device bharatlalgupta Linux - General 1 03-16-2009 12:08 PM
Hard disk size not showing correctly niranjan_mr Linux - Software 4 01-29-2005 07:10 AM
Hard disk not showing correct size rwalkerphl Linux - Newbie 8 08-19-2004 03:58 PM


All times are GMT -5. The time now is 07:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration