I have created a LINUX machine with 2 disks. the 2nd disk is 100GB /wdata THIN provisioning. I stopped the VM and changed DISK02 to 200GB instead of a 100GB). when I do /proc/partitions I see /dev/sdb1 = 100GB and /dev/sdb = 200GB. when I run: "df -k I see:

/dev/mapper/storage-lvol0 - 99G 63G 32G 67% /wdata

what do I need to do in order to have a total of 200GB of /wdata partition?

df -h
enter code here
Filesystem            Size  Used Avail Use% Mounted on
                   29G   29G     0 100% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/sda1             485M   52M  408M  12% /boot
                  6.3G  143M  5.8G   3% /logs
                   99G   63G   32G  67% /wdata

 cat /proc/partitions 
 major minor  #blocks  name

 8        0   41943040 sda
 8        1     512000 sda1
 8        2   41430016 sda2
 8       16  209715200 sdb
 8       17  104856223 sdb1
 253        0   30720000 dm-0
 253        1    4063232 dm-1
 253        2  104853504 dm-2
 253        3    6643712 dm-3

cat /etc/fstab 

# /etc/fstab
# Created by anaconda on Mon Oct 29 11:16:02 2012
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
/dev/mapper/vg_basecentos6-lv_root /                       ext4    defaults        1 1
UUID=d1717ba0-0477-4588-9ee3-78ae4fb01366 /boot                   ext4    defaults               1 2
/dev/mapper/vg_basecentos6-LogVol02 /logs                   ext4    defaults        1 2
/dev/mapper/vg_basecentos6-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
/sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/storage/lvol0  /wdata    ext4    defaults         0   0

Thanks! Dotan.

  • More data is needed to answer this effectively. Can you post the output of df -h, fdisk -l, mount and cat /etc/fstab? – Craig Watson Jul 30 '13 at 14:46
  • Hi Craig, I hope this is enough. let me know if you still need to see the fdisk -l or mount – edotan Jul 30 '13 at 15:23
  • I did a really long guide of how to do this a while back, it may be a bit out of date now but the overall work path should be right, take a look; serverfault.com/a/422972/1435 – Chopper3 Jul 30 '13 at 15:28
  • "parted" only showing me /dev/sda - it's not showing me /dev/sdb. you can see I added some more information to my original question. Thanks! – edotan Jul 30 '13 at 18:22
  • I found the way to do it. these are the steps: stop vmware instance edit instance and increase disk space reboot VM cat /proc/partitions fdisk /dev/sdb reboot pvcreate /dev/sdb2 vgextend storage /dev/sdb2 vgdisplay lvextend /dev/storage/lvol0 /dev/sdb2 resize2fs /dev/storage/lvol0 – edotan Jul 30 '13 at 19:24

I'm making some assumptions here about the current state of your environment, but here goes. You have two options. You can extent the partition (/dev/sdb1), then extend the PV, then extend the LV, or you can create a new partition (/dev/sdb2), create a new PV, extend the VG, and extent the LV. Either way, you should use your favored partition manager (I use fdisk because I haven't bothered to learn parted) for the first part. I recommend the second option (I would find it safer if I were doing it). In that case, one you have the second partition created:

# pvcreate /dev/sdb2
# vgextend storage /dev/sdb2
# lvextend [-L [+]size] /dev/storage/lvol0
# resize2fs /dev/mapper/storage-lvol0

You haven't given enough details for an exact answer but the steps are

  1. Have linux recognise the disk change through rescan or reboot (you've done this by the looks of it)
  2. Enlarge your lvm partition using lvresize
  3. Enlarge your file system (eg. using resize2fs if it is ext3)

Don't forget to backup your data before any operation of this type

  • I rebooted the system and I see the change when I run cat /proc/partitions. 8 16 209715200 sdb 8 17 104856223 sdb1 – edotan Jul 30 '13 at 15:12

this is what I was looking for:

stop vmware instance
edit instance and increase disk space 
reboot VM
cat /proc/partitions
fdisk /dev/sdb - 
pvcreate /dev/sdb2 
vgextend storage /dev/sdb2 - sdb2 is the newest created disk
lvextend /dev/storage/lvol0 /dev/sdb2 - sdb2 is the newest created disk
resize2fs /dev/storage/lvol0

Thanks everyone!! Dotan.


I've answered this BEFORE, please take a look - it may need minor tweaks for you specific distro but it's a good start ok.

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.