Editing
Raid: Growing
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===LVM: Growing the PV=== LVM (logical volume manager) abstracts a logical volume (that a filesystem sits on) from the physical disk. If you are used to LVM then you are likely used to growing LVs (logical volumes), but what we grow here is the PV (physical volume) that sits on the ''md'' device (RAID array). For further LVM documentation, please see the [http://tldp.org/HOWTO/LVM-HOWTO/ Linux LVM HOWTO] Growing the physical volume is trivial: pvresize /dev/md0 A before-and-after example is: root@barcelona:~# pvdisplay --- Physical volume --- PV Name /dev/md0 VG Name server1_vg PV Size 931.01 GB / not usable 558.43 GB Allocatable yes PE Size (KByte) 4096 Total PE 95379 Free PE 42849 Allocated PE 52530 PV UUID BV0mGK-FRtQ-KTLv-aW3I-TllW-Pkiz-3yVPd1 root@barcelona:~# pvresize /dev/md0 Physical volume "/dev/md0" changed 1 physical volume(s) resized / 0 physical volume(s) not resized root@barcelona:~# pvdisplay --- Physical volume --- PV Name /dev/md0 VG Name server1_vg PV Size 931.01 GB / not usable 1.19 MB Allocatable yes PE Size (KByte) 4096 Total PE 238337 Free PE 185807 Allocated PE 52530 PV UUID BV0mGK-FRtQ-KTLv-aW3I-TllW-Pkiz-3yVPd1 The above is the PV part after md0 was grown from ~400GB to ~930GB (a 400GB disk to a 1TB disk). Note the ''PV Size'' descriptions before and after. Once the PV has been grown (and hence the size of the VG, volume group, will have increased), you can increase the size of an LV (logical volume), and then finally the filesystem, eg: lvextend -L +50G -n home_lv server1_vg resize2fs /dev/server1_vg/home_lv The above grows the ''home_lv'' logical volume in the ''server1_vg'' volume group by 50GB. It then grows the ext2/ext3 filesystem on that LV to the full size of the LV, as per ''Extending the filesystem'' above. [[Category:How-to]] [[Category:Linux]]
Summary:
Please note that all contributions to RARForge may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RARForge:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Home
All Pages
All Files
View Categories
Recent changes
Random page
Edit this menu
Tools
What links here
Related changes
Special pages
Page information