cancel
Showing results for 
Search instead for 
Did you mean: 

simple question on storage

iinfi1
Super Advisor

simple question on storage

I have a windows or linux box where a drive is mapped from external storage using iscsi initiator. i have formatted the same using ntfs or ext3 depending upon which OS i m using.
in the storage i v created a LVM and made that partition a ISCSI target.
at the time of creating the target the LVM size was 30GB. later i know is it possible to increase the size of the LVM by adding another PV and VG. But will the size of the partition on the windows or linux box increase on the fly without downtime?
i hope my question isnt too crazy
5 REPLIES
Gerardo Arceri
Trusted Contributor

Re: simple question on storage

I can only answer for linux, fortunately the answer is yes, if you used ext3, you can add one more iscsi device to the vg and use it to extend the filesystem on the fly (depending on the Linux Version you are using, for example Red Hat 3 doesn't support this feature), the command sequence would be the following supposing /dev/sdc is your new 30GB iscsi disk:

pvcreate /dev/sdc (or first fdisk / create a partition and then use /dev/sdc1 instead)
vgextend yourvg /dev/sdc
lvextend -L+30G /dev/yourvg/yourlv
ext2online /dev/yourvg/yourlv
or
resize2fs /dev/yourvg/yourlv
(depending on your linux distribution).
Hope it was helpful, and don't forget to assign points if you found my answer useful!
iinfi1
Super Advisor

Re: simple question on storage

well i think you didnt get my question.
as i had mentioned in my previous post, i know is it possible to increase the size of the LVM by adding another PV and extending VG.

the size of the LVM when increased by say 20GB will become 50GB. this LVM is mapped to a windows or linux box using iscsi initiator. will the drive size in the client machine increase once the LVM size is increased
AnthonySN
Respected Contributor

Re: simple question on storage

>>will the drive size in the client machine increase once the LVM size is increased

you may have to remap the drive again
Gerardo Arceri
Trusted Contributor

Re: simple question on storage

Ok, i now get it... for Linux you can use the following commands to make it recognize the new device size:
blockdev --rereadpt /dev/sdX
or simply, partprobe.
iinfi1
Super Advisor

Re: simple question on storage

thanks i will chk this command