Jump to content

RHEL 5.5 hard drive not detected after LVM format and created Volgroup1 ?


Recommended Posts

Posted

Hi All,

 

I'm having mysterious problem here with my Red Hat EL 5.5 64 bit edition,

 

I've install it on my primary hard drive 12 GB it works fine and then

I added secondary 20 GB hard drive (sdb1) into this system and then format it as VolGroup01 see the attachment, but how come it doesn't show up ?

 

 

[administrator@websphere02 ~]$ pwd

/home/administrator

 

[administrator@websphere02 ~]$ uname -a

Linux websphere02.domain.com 2.6.18-186.el5 #1 SMP Wed Jan 27 18:11:22 EST 201 0 x86_64 x86_64 x86_64 GNU/Linux

 

[administrator@websphere02 ~]$ df -kh

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup00-LogVol00

5.9G 2.5G 3.2G 44% /

/dev/sda1 99M 17M 78M 18% /boot

tmpfs 1.9G 0 1.9G 0% /dev/shm

 

[administrator@websphere02 ~]$ su

Password:

 

[root@websphere02 administrator]# fdisk -l

bash: fdisk: command not found

 

LVM-SDB.jpg

 

can anyone help me how to actually utilize this new capacity ?

 

Thanks,

 

Albert

Posted

haha you're right man, now it gets better:

 

[root@websphere02 administrator]# /sbin/fdisk -l

 

Disk /dev/sda: 12.8 GB, 12884901888 bytes

255 heads, 63 sectors/track, 1566 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 1566 12474472+ 8e Linux LVM

 

Disk /dev/sdb: 21.4 GB, 21474836480 bytes

64 heads, 32 sectors/track, 20480 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

 

Device Boot Start End Blocks Id System

/dev/sdb1 1 20480 20971519+ 8e Linux LVM

[root@websphere02 administrator]#

Posted (edited)

Try /usr/sbin/lvdisplay and see if it shows up the one you're looking for and then mount that name somewhere.

 

--- Logical volume ---

LV Name /dev/images/5gb

VG Name images

LV UUID bgfHoe-gp1F-863h-t1uk-xSRf-drtW-Jndb2k

LV Write Access read/write

LV Status available

# open 1

LV Size 5.00 GB

Current LE 320

Segments 1

Allocation inherit

Read ahead sectors auto

- currently set to 512

Block device 253:6

 

 

mount /dev/images/5gb /mydisk

 

You might be able to do this from the gui.

Edited by kmount
added full path
Posted

Oh, I should have pointed out that if that complains about the filesystem type you may need to make a file system on the lvm.

 

mke2fs -j /dev/images/5gb in my case to make an ext3 fs.

 

Then it will mount.

Posted

I'll try to explain as we go along, maybe you can see if a step was missed. I've been doing this for a long time, so I use the command line. Not sure how the GUI tools do this.

 

1. Install new hard drive and boot.

2. 2nd hard drive is now /dev/sdb

3. fdisk to partition the drive, probably 1 large partition like /dev/sdb1

4. pvcreate /dev/sdb1. This writes a header page into the partition that says "Hey, I'm a 'physical volume' (part of LVM), and my id is blah-blah." This pv is now available for use

5. vgcreate vgMyVgName /dev/sdb1 (substitute whatever volume group name you wish). This creates a new volume group, and assigned the newky-created partition to it. Now we have a storage pool available.

6. lvcreate --name lvMyLvName --size 10G vgMyVgName. Now we create a logical volume from some of the space in the storage pool called vgMyVgName.

7. mkfs -t ext3 -L SOME_FS_LABEL -c /dev/vgMyVgName/lvMyLvName. We are now writing the file-system metainformation in the logical volume.

8. edit /etc/fstab, add a line:

LABEL=SOME_FS_LABEL /mymountpoint ext3 defaults 0 0

depending on what mount point, options and defaults you want

9. mount /mymountpoint.

 

To add another disk partition (say /dev/sdc1) to an existing pool)

pvcreate /dev/sdc1

vgextend myVgName /dev/sdc1

 

To increase the lv size by 10 GB

lvextend --size +10G /dev/vgMyVgName/myLvName

 

To grow the ext3 file system to the full size of the newly-expanded volume

resize2fs //dev/vgMyVgName/myLvName

 

Hope this helps. See the man pages for more details. good luck.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...