Increasing the filesystem size

Hi Guys

We have a VM machine, now I want to increase the size of the filesystem.

We are running RHEL6 O/S.

I have filesystem that is 500GB I want to increase that filesystem to 1.5 TB.

The guy who manages the VM increased the size on the VM machine, now how do I make sure that the changes reflect on the O/S?

Thanks in advance...

Please Help!!!

Well, the big question is "Is your VM provided volume defined as an LVM device or set up to give fixed partitions?"

If the filesystem is an LVM filesystem and you have got the space into your volume group, then using lvextend should do the job. If you use the -r flag then it will alter the filesystem when you resize the logical volume.

If you filesystem is on a fixed slice of disk, then I think you are stuck with it. You would need to do something like this:-

  • Define the new disk or slice as an LVM Physical Volume
  • Create a volume group using this PV
  • Create a logical volume of at least 500Gb in the volume group
  • Format the logical volume as a filesystem.
  • Mount the filesystem & move the data
  • Edit /etc/fstab to point to the new filesystem to be mounted
  • Unmount the original filesystem
  • Unmount the new filesystem and remount it to the correct location
  • Destroy the original filesystem/disk/slice
  • Define the original disk as an LVM PV
  • Extend the volume group by adding this disk/slice

You are now able to use extendlv as described above. What do you have defined?

If your server is actually a single filesystem, then we're in more trouble.

Can you share the contents of /etc/fstab for a starter?

Robin

Thanks for the reply,

/dev/sde1            /disk5               reiserfs   acl,user_xattr        1 2

I asked the VM guy about "Is your VM provided volume defined as an LVM device or set up to give fixed partitions?"

He replied :

The OS should see one contiguous hard drive. No partitioning

Thanks

From your fstab output, this is not LVM.

The 'VM guy' will allocate one or more devices. It's up to you how you use them.

If you display your device now, does it recognise the new size? If so, you are into my long-winded process to make it LVM so that we can be more flexible with it.

Robin

Thanks for the replies,

I am now clueless as to what needs to be done for me to have that filesystem increased.

I have to do a lot of reading...

Thanks

If you provide us with the output of the df and the fstat -l commands, somebody here can assist you.

df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             200G  103G   98G  52% /
tmpfs                 8.0G   12K  8.0G   1% /dev/shm
/dev/sdb1             1.5T  772G  765G  51% /disk2
/dev/sdc1             1.3T  618G  689G  48% /disk3
/dev/sdd1             1.3T  715G  545G  57% /disk4
/dev/sde1             950G  599G  351G  64% /disk5
/dev/sdf1             850G  826G   25G  98% /disk6
/dev/sdg1             330G  292G   39G  89% /disk7

fdisk -l

Disk /dev/sdg: 461.7 GB, 461708984320 bytes
255 heads, 63 sectors/track, 56132 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1       43078   346024003+  83  Linux

When I try to run fstat I get these error: -

bash: fstat: command not found

Thanks

---------- Post updated at 02:37 PM ---------- Previous update was at 11:23 AM ----------

I used fdisk to check the filesystem :

sh-2.05b# df -h /disk7
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdg1             330G  292G   39G  89% /disk7
sh-2.05b# fdisk -l /dev/sdg

Disk /dev/sdg: 461.7 GB, 461708984320 bytes
255 heads, 63 sectors/track, 56132 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1       43078   346024003+  83  Linux
sh-2.05b#

I want /disk7 to be 430G, How do I achieve this?

I regrettably refer you back to post 2. You are starting from a difficult place I'm afraid.