Right way to resize LVM Volume on SAN?
Hello All!
I have read all the archives, HOWTO etc. but I don't seem to find the definitive guide to do it correctly.
My diskspace in Linux is on SAN. The last partition (/dev/sda3) is LVM, ext3 and it represents my /home. Now I expanded the SAN volume and I would like to add this additional space to this last LVM partition.
I already see larger disk space with fdisk. AFAIK I have now two options. Either I create new partition (for example /dev/sda4) and pvcreate it and add it to Logical Volume or I can resize existing /dev/sda3 since it is the last partition and I can resize it to new end sector.
I would prefer resizing existing partition. So I should make backup, delete existing partition /dev/sda3. make new partition with new end sector and same start sector and do pvresize, lvresize on it right?
Is there any other way to do it? It is after all quite something to delete existing live partiton and hope it still work after resize :)
Thank you!
Quoted 15 lines · Alen Salamun
Hello All!
I have read all the archives, HOWTO etc. but I don't seem to find the definitive guide to do it correctly.
My diskspace in Linux is on SAN. The last partition (
/dev/sda3) is LVM, ext3 and it represents my /home. Now I expanded the SAN volume and I would like to add this additional space to this last LVM partition.I already see larger disk space with fdisk. AFAIK I have now two options. Either I create new partition (for example
/dev/sda4) and pvcreate it and add it to Logical Volume or I can resize existing/dev/sda3since it is the last partition and I can resize it to new end sector.
Quoted 6 lines
I would prefer resizing existing partition. So I should make backup, delete existing partition
/dev/sda3. make new partition with new end sector and same start sector and do pvresize, lvresize on it right?Is there any other way to do it? It is after all quite something to delete existing live partiton and hope it still work after resize :)
man pvresize
Quoted 8 lines
Thank you!
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 15 lines
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat GmbH
Consulting Development Engineer Am Sonnenhang 11
Storage Development 56242 Marienrachdorf
Germany
[email protected] PHONE +49 171 7803392
FAX +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Thank you. I read that already. And since it only says:
"Expand the PV on /dev/sda1 AFTER enlarging the partition with fdisk"
my question is related on part of enlarging partition with fdisk. Do I have to do it in described way (delete, create new with extended last sector) to preserve data or is there any other "less destructive look-a-like" way?
Best regards
Quoted 23 lines · Heinz Mauelshagen
Quoted 11 lines · Alen Salamun
Hello All!
I have read all the archives, HOWTO etc. but I don't seem to find the definitive guide to do it correctly.
My diskspace in Linux is on SAN. The last partition (
/dev/sda3) is LVM, ext3 and it represents my /home. Now I expanded the SAN volume and I would like to add this additional space to this last LVM partition.I already see larger disk space with fdisk. AFAIK I have now two options. Either I create new partition (for example
/dev/sda4) and pvcreate it and add it to Logical Volume or I can resize existing/dev/sda3since it is the last partition and I can resize it to new end sector.I would prefer resizing existing partition. So I should make backup, delete existing partition
/dev/sda3. make new partition with new end sector and same start sector and do pvresize, lvresize on it right?Is there any other way to do it? It is after all quite something to delete existing live partiton and hope it still work after resize :)
man pvresize
Quoted 7 lines
Thank you!
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Quoted 5 lines · Alen Salamun
Thank you. I read that already. And since it only says:
"Expand the PV on
/dev/sda1AFTER enlarging the partition with fdisk"my question is related on part of enlarging partition with fdisk. Do I have to do it in described way (delete, create new with extended last sector) to preserve data or is there any other "less destructive look-a-like" way?
sfdisk for backing up your partition table
parted to resize
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
Quoted 4 lines · Luca Berra
Quoted 3 lines · Alen Salamun
Thank you. I read that already. And since it only says:
"Expand the PV on
/dev/sda1AFTER enlarging the partition with fdisk"
That should probably be more generalized in the documentation. Instead it should say "Expand the PV on /dev/<dev name> AFTER englarging the block device. If the block device is a partition then you will need to enlarge the partition utilizing a tool for managing partitions like fdisk."
If the device in LVM is just a SAN backed LU then you really don't need partitions on it at all. This would simplify your setup in the future if you just exposed the LU to the server and then just simply pvcreate the entire disk next time. Then when you increase the size of the LU on the SAN you can validate its size using blockdev --getsize64 /dev/sda both before and after the change. At that point a simple pvresize will pick up the new size and move forward.
Hope that sheds some light.
Signature · 3 lines
Zac Slade [email protected] ICQ:1415282 YM:krakrjak AIM:ttyp99