Question

  Asked: Jan 24 2008   4:54 AM GMT
  Asked by: NanouX


space added not showing in redhat linux


Linux, Redhat Linux

added disk space , but not showing in physical volume as well in the logical volumes.

how can I check if the disk is there?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0



The simple way would be to run this command
dmesg

That command will run through a list of messages about hardware added/initialized. From there all you will need to do is figure out which hard drive you are using, and if you have not partitioned it, you can use the graphical tool, you can simply go do that (can't remember the GUI program's name). If you don't use a GUI, you can do this (in this example, I am assuming that the new harddrive showed up as "hdb":
fdisk /dev/hdb

If you need help from here, I reccomend you have a look at About.com's guilde to Fdisk
Now, you will need to mount the new drive. Most people think you need to mount the drive in /mnt/ but that is not true. You can mount it in /var/www/ /home/<user_folder>/ or whatever place you like, so long as the directory you are mounting it to is currently empty. You can either mount it each time, or simply edit your /etc/fstab file
vim /etc/fstab

my fstab looks something like this:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=<random gibberish> ext3 defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=<random gibberish> none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0

I modified it slightly so you wouldn't see my harddrive info (serial number). I replaced it with <random gibberish>
to add a drive, you would add something like this to the bottom of your fstab:

/dev/hdb1 /var/www ext3 defaults 0 0

You see how the hdb changed to hdb1? Well, that's the new partition on the new drive. Each partition (be it 1, or 1000) gets a numeral at the end, starting with 1.
Rember, I've only been using hdb as an example. Yours may be different. It may be sda, sdb(those are SATA drives, usually). Just make sure you know which drive you are working with. If you get the wrong one, you could accidentally repartition your primary drive (I'm not sure if you actually can, but I'm covering my butt here).
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Linux.

Looking for relevant Linux Whitepapers? Visit the SearchEnterpriseLinux.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Victorp  |   Jan 24 2008  2:46PM GMT

Are you using LVM? if so then the answer above is incorrect for you situation.

 

Jonsjava  |   Jan 24 2008  8:16PM GMT

That’s true. for some reason, I had completely forgotten to add that how-to. sry about that.

 

Bradleybradley  |   Jan 31 2008  8:52PM GMT

I believe you need to use the fdisk -l and check to see how many disks are there.

You may also need to use the partprobe command to bring the disk into your operating system.

Another way to check is to goto the /proc/partitions
cat /proc/partitions

Other helpful commands are lspci and lsusb

If your OS supports it use hal-device and in Gui format hal-device-manager

Let me know if you need more information on these command, they are very helpful when working with disks

Good luck

Bradley