This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:cmd:lvm [2020/07/24 11:55] – js | linux:cmd:lvm [2022/12/21 09:21] (current) – js | ||
---|---|---|---|
Line 6: | Line 6: | ||
<code bash> | <code bash> | ||
- | <code bash> lvs -o +devices | + | |
+ | <code bash>[root@centos ~]# lvs -o +devices | ||
LV | LV | ||
- | 6a8853c1-b0d5-86a0-5580-5447327106cd XSLocalEXT-6a8853c1-b0d5-86a0-5580-5447327106cd -wi-ao---- 29.96g | + | 6a8853c1-b0d5-86a0-5580-5447327106cd XSLocalEXT-6a8853c1-b0d5-86a0-5580-5447327106cd -wi-ao---- 29.96g |
+ | </ | ||
- | <code bash>lvs --segments -o +devices</ | + | |
- | <code bash>LV | + | <code bash>[root@centos ~]# lvs --segments -o +devices |
+ | |||
+ | LV | ||
6a8853c1-b0d5-86a0-5580-5447327106cd XSLocalEXT-6a8853c1-b0d5-86a0-5580-5447327106cd -wi-ao---- | 6a8853c1-b0d5-86a0-5580-5447327106cd XSLocalEXT-6a8853c1-b0d5-86a0-5580-5447327106cd -wi-ao---- | ||
=== show logical volume groups === | === show logical volume groups === | ||
- | <code bash> | + | <code bash>[root@centos ~]# vgdisplay</ |
=== show logical volume === | === show logical volume === | ||
- | <code bash> | + | <code bash>[root@centos ~]# lvdisplay</ |
+ | |||
+ | === resize physical volume === | ||
+ | You can use gparted live ios - do the partition magic .... and after that, resize the logical volume and extent the filesystem. | ||
+ | |||
+ | Rescan Host: | ||
+ | <code bash> | ||
+ | |||
+ | check hd: | ||
+ | <code bash> | ||
+ | Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0x4952fe1d | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | or user cfdisk / parted: | ||
+ | <code bash> | ||
+ | |||
+ | Get MB of free space: | ||
+ | <code bash> | ||
+ | < | ||
+ | < | ||
+ | Get the size of the disk in MB | ||
+ | <code bash> | ||
+ | Enter size in MB - e.g. 24242MB | ||
+ | |||
+ | resize | ||
+ | <code bash> | ||
+ | Physical volume "/ | ||
+ | 1 physical volume(s) resized or updated / 0 physical volume(s) not resized</ | ||
+ | |||
+ | check | ||
+ | <code bash> | ||
+ | PV | ||
+ | / | ||
=== resize logical volume === | === resize logical volume === | ||
- | resize logical volume< | + | resize logical volume< |
- | < | + | |
+ | File descriptor 7 (pipe: | ||
Size of logical volume fsilun/ | Size of logical volume fsilun/ | ||
Logical volume lvfsilun successfully resized</ | Logical volume lvfsilun successfully resized</ | ||
- | and than resize filesystem< | + | |
- | <code bash>resize2fs 1.41.12 (17-May-2010) | + | and than resize filesystem< |
+ | |||
+ | resize2fs 1.41.12 (17-May-2010) | ||
Filesystem at / | Filesystem at / | ||
old desc_blocks = 16, new_desc_blocks = 63 | old desc_blocks = 16, new_desc_blocks = 63 |