[SOLVED] It showing 0 for all partition when i add new hard disk
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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?
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
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
[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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.