- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: grow LVM disk
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2010 03:30 PM
тАО04-25-2010 03:30 PM
Gprated or PartitionMagic don't support resizing the LVM drive. Is there any software available on the market that does the trick ?
Regards
Peter
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2010 08:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2010 08:35 PM
тАО04-25-2010 08:35 PM
Re: grow LVM disk
fdisk -l
# To see layout
pvdisplay -v
lvextend -l
Next step depends on what version of the OS you are talking about.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2010 07:00 PM
тАО04-26-2010 07:00 PM
Re: grow LVM disk
I'm running CentOS:
Linux version 2.6.18-164.15.1.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Mar 17 11:30:06 EDT 2010
So what would be the next step ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 04:23 AM
тАО04-27-2010 04:23 AM
Re: grow LVM disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 09:31 AM
тАО04-27-2010 09:31 AM
Re: grow LVM disk
The resize2fs command will automatically detect if the filesystem is mounted, and do the right thing in each case.
i.e. after running lvextend, the next step is simply:
resize2fs -p
The "-p" option prints a completion bar, so you'll see that the operation is running. If the filesystem is already very large, the extension may take a while, so it's nice to have some feedback to reassure you it's not hung up.
If you run "df" repeatedly while resize2fs is making an on-line extension, you can see the filesystem getting bigger and bigger in steps.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 02:09 AM
тАО04-28-2010 02:09 AM
Re: grow LVM disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 05:09 AM
тАО04-28-2010 05:09 AM
Re: grow LVM disk
In RHEL 5, the functionality of ext2online was integrated to resize2fs.
Piotr's kernel version indicates he has a RHEL/CentOS 5.
Version 4 would have a 2.6.9-* kernel.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 06:43 AM
тАО04-28-2010 06:43 AM
Re: grow LVM disk
=============================================
Stop the VM
On the ESXi host run: vmkfstools -X 10g ./test.vmdk
Start the VM log in and run:
fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 1044 8185117+ 8e Linux LVM
[root@localhost ~]# pvdisplay -v
Scanning for physical volume names
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 7.81 GB / not usable 25.28 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 249
Free PE 0
Allocated PE 249
PV UUID Hnw1fc-tqXm-sfzP-0vF1-CmhA-bEXb-mP4mv8
[root@localhost ~]# lvdisplay -v
Finding all logical volumes
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID al4VyF-DKXD-cbC8-PEmg-fDMy-0Prx-3bokbB
LV Write Access read/write
LV Status available
# open 1
LV Size 5.78 GB
Current LE 185
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID FqvvFP-9v0m-bd3f-wcfm-oOUF-dkcP-HCHIh3
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GB
Current LE 64
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
fdisk /dev/sda (and create a new primary partition, partition number 3)
[root@localhost ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 1044 8185117+ 8e Linux LVM
/dev/sda3 1045 1305 2096482+ 83 Linux
lvextend ├в L10G /dev/sda2
pvcreate /dev/sda3
pvcreate /dev/sda3 Physical volume "/dev/sda3" successfully created
pvs
vgextend VolGroup00 /dev/sda3
[root@localhost ~]# vgdisplay VolGroup00
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 9.75 GB
PE Size 32.00 MB
Total PE 312
Alloc PE / Size 249 / 7.78 GB
Free PE / Size 63 / 1.97 GB
VG UUID zHLZCU-jryC-xnVR-y5Hb-cfKa-WKmH-JRYoDe
lvextend -l+63 /dev/VolGroup00/LogVol00
[root@localhost ~]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-ao 7.75G
LogVol01 VolGroup00 -wi-ao 2.00G
df -h /
[root@localhost ~]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
5.7G 829M 4.6G 16% /
So as you see now I have 6.4 GB of free space instead of 4.6GB.
Thanks for the effort. Ticket closed.