Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

First of all, I'm quite new to Linux so forgive me if I use the terms 'disks', 'partitions' and 'devices' incorrectly below!

I have a Red Hat 5.2 x86_64 server with kernel version 2.6.18-92.el5. I have several SAN-based Vdisks presented to the server, appearing as /dev/sd*x* and, when I create a partition, /dev/sd*x*1 . The SAN is an hp EVA-8100.

Occasionally I need to extend a disk. I can increase the size of the Vdisk via the hp Command View EVA software, but the only way currently I can get the server to recognise the additional space is to reboot the server.

For various reasons I'm not currently using an LVM. Is there a command or method I can use to get the server to recognise the additional space without rebooting the server?

Many thanks,

/Neil

share|improve this question

3 Answers 3

This is what I have used for systems with dm-multipath and LVM; modify as needed:

1) Increase size of LUN in SAN
2) Check with "multipath -ll" which devices belong to said LUN
3) For each device above, do "echo 1 > /sys/block/sdX/device/rescan"
4) Go to multipath command line with "multipathd -k"
5) For each device, do "del path sdX", "add path sdX" while hoping that
the multipathing functionality works as advertised and fails over properly.
6) "resize map multipath-map-name"
7) Exit multipath command line (Ctrl-D), check with "multipath -ll" that
new size is seen.
8) pvresize, lvextend, resize2fs
9) Profit!

This works as of RHEL 5.3.

share|improve this answer
1  
+1 for the key of "echo 1 > /sys/block/sdX/device/rescan" –  ktower Dec 29 '09 at 16:00

/* THIS MAY RESULT IN DATA LOSS */

Here's how to do it without LVM

1) Resize the LUN on your SAN

2) Unmount the partition

3) fsck the partition to reorder the data to the beginning

4) Here's the scary part, fire up fdisk and delete the partition making note of it's starting block

5) Re-create the partition with the same starting block but with the new end block

6) Run resize2fs (assuming your running ext2/3)

7) Remount your resized partition

8) Profit

share|improve this answer

you looking to same of link you can use

http://sysdigg.blogspot.com/2008/03/add-san-disks-on-rhel-without-reboot.html

share|improve this answer
    
Thanks Rajat...but that article is about adding Vdisks, not extending existing Vdisks. –  Brisbane Mango Sep 18 '09 at 11:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.