0

I have pved, /dev/sda and /dev/sdb, and I vgextended the /dev/sdb to the default VolGroup, and lvextended the /.

now the lsblk shows this:

[root@store01 ~]# lsblk
NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                           8:0    0 238.5G  0 disk 
├─sda1                        8:1    0   500M  0 part /boot
└─sda2                        8:2    0   238G  0 part 
  ├─VolGroup-lv_root (dm-0) 253:0    0  1010G  0 lvm  /
  ├─VolGroup-lv_swap (dm-1) 253:1    0  23.9G  0 lvm  [SWAP]
  └─VolGroup-lv_home (dm-2) 253:2    0   100G  0 lvm  /home
sdb                           8:16   0 931.5G  0 disk 
└─VolGroup-lv_root (dm-0)   253:0    0  1010G  0 lvm  /

but when I put data into the /, the / get full:

there shows:

[root@store01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G   49G     0 100% /
tmpfs                  32G     0   32G   0% /dev/shm
/dev/sda1             477M   55M  397M  13% /boot
/dev/mapper/VolGroup-lv_home
                      162G   60M  154G   1% /home

now the vgs is this:

[root@store01 ~]# vgs
  VG       #PV #LV #SN Attr   VSize VFree 
  VolGroup   2   3   0 wz--n- 1.14t 35.65g

EDIT

at first the / only have 50G, after the bellow commands:

pvcreate  /dev/sdb
vgextend VolGroup /dev/sdb
lvextend -L +950G /dev/VolGroup/lv_root

lsblk shows the upper print.1010G

  • 4
    lvextend enlarges the file system's container. Did you follow this by extending the filesystem? – JRFerguson Jan 22 at 14:24
  • 1
    Can you add the command lvextend you use. Also also result of execution of vgs – Romeo Ninov Jan 22 at 14:24
0

you need to extend lv_root as a LV

lvextend --size +500G lv_root

then extend / as a filesystem, this depends on filesystem type

 resize2fs /dev/mapper/VolGroup-lv_root  ## ext3/ext4
 xfs_growfs / ## xfs

note that I would advise you to put data on a separate file system, 50 G is more that enough for system, you should create a new FS ( /data /MY_APP whatever )

  • the resize2fs /dev/mapper/VolGroup-lv_root will affect the /'s data? – 244boy Jan 22 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.