LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 01:32 AM   #1
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 24

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, 02:37 AM   #2
tg0000
Member
 
Registered: Jul 2009
Location: Philippines
Distribution: Linux Mint 20.3 Una, MATE 1.26.0
Posts: 63
Blog Entries: 1

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, 04:27 AM   #3
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 24

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, 09:25 PM   #4
tg0000
Member
 
Registered: Jul 2009
Location: Philippines
Distribution: Linux Mint 20.3 Una, MATE 1.26.0
Posts: 63
Blog Entries: 1

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, 12:51 AM   #5
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 24

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, 01:14 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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, 03:13 AM   #7
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 24

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, 03:30 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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 03:32 AM. Reason: fixed typo
 
Old 07-25-2013, 04:45 AM   #9
onkar_nimje
LQ Newbie
 
Registered: Jul 2013
Posts: 24

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

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome

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


Reply



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 01:29 AM
Showing different Hard disk size manoj.linux Linux - Enterprise 1 04-07-2010 06:56 AM
sata hard disk is showing hd device bharatlalgupta Linux - General 1 03-16-2009 11:08 AM
Hard disk size not showing correctly niranjan_mr Linux - Software 4 01-29-2005 06:10 AM
Hard disk not showing correct size rwalkerphl Linux - Newbie 8 08-19-2004 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:50 PM.

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
Open Source Consulting | Domain Registration