-5

how i can increase the size of the root directory .i face some problem of cache of my sql. result of command df -h

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_host-lv_root
                      50G   24G   23G  51%  /
tmpfs                 16G     0   16G   0%  /dev/shm
/dev/sdb1             477M   42M  411M 10%  /boot
/dev/mapper/vg_host-lv_home
                      3.6T   17G  3.4T   1% /home

Now its fine but when load increase space is full and my sql is damaged.

womble
  • 96,255
  • 29
  • 175
  • 230
Saad Awan
  • 1
  • 2
  • 1
    FYI, technically speaking you're using the wrong terminology here, which is probably a large part of the reason you got a downvote. The directory itself, under the hood, is a file, so to increase its size you simply add more entries (i.e. files) to it. What you actually want to do is increase the size of the root *filesystem*, or root *partition*. You also probably garnered downvotes because this is a pretty basic question that almost certainly has already been answered, or is at least trivial to figure out by doing basic research. So, someone probably downvoted because of no research. – Parthian Shot Nov 30 '15 at 04:58

1 Answers1

1
lvextend -L100G vg_host/lv_root
resize2fs /dev/vg_host/lv_root
womble
  • 96,255
  • 29
  • 175
  • 230
  • both command not work – Saad Awan Nov 30 '15 at 06:12
  • 1
    Your VG probably doesn't have any free extents, given that `lv_home` is so ridiculously big. If `vgs` shows `VFree` of `0`, that's the problem. Shrink down `lv_home` to something sensible, then you'll have plenty of space. – womble Nov 30 '15 at 06:54