Visit Our UNIX and Linux User Community

Help with resizing partitions

Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Help with resizing partitions
# 1  
Old 04-27-2009
Help with resizing partitions


First post Smilie

I have recently used Acronis (Backup software for data backup and disaster recovery in Windows and Linux - Acronis) to create identical systems that I need to build.
Everything works OK, but one of the machine has a bigger harddisk (250G) than the one I used to create the backup image (I think it was 180G).
When I applied the backup image to that harddisk, everything works fine, but `df -a` only shows 180G.
When I run `fdisk -l` it does say the size is 250G.
The machines run on CentOS 5.2 and here are some info:

# df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
                     187150052   3169204 174320844   2% /
proc                         0         0         0   -  /proc
sysfs                        0         0         0   -  /sys
devpts                       0         0         0   -  /dev/pts
/dev/sda1               101086     12210     83657  13% /boot
tmpfs                  1025204         0   1025204   0% /dev/shm
none                         0         0         0   -  /proc/sys/fs/binfmt_misc
sunrpc                       0         0         0   -  /var/lib/nfs/rpc_pipefs

# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 24321 195254010 8e Linux LVM

lvm> pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               232.71 PB / not usable 128.00 PB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              3513503756
  Free PE               3513497798
  Allocated PE          5958
  PV UUID               m2sZJE-t8Dl-d4kk-DpMY-p2Px-FDgn-dHxKtv

lvm> vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               104.71 PB
  PE Size               32.00 MB
  Total PE              3513503756
  Alloc PE / Size       5958 / 186.19 GB
  Free  PE / Size       3513497798 / 104.71 PB
  VG UUID               JOfhL1-ObNO-EebF-zwBQ-W9Ei-GGCL-zrJSbe

I would like to make use of that extra space. I know I need to extend the partition, but not sure on what steps to take. As it is a potentially dangerous operation I would like to get some advice on how to do it properly.

I hope I can get some help regarding this matter.

Thank you for your help and sorry for the long post.

Last edited by Yogesh Sawant; 04-27-2009 at 08:49 AM.. Reason: added code tags
# 2  
Old 04-27-2009
You could extend the partition, but I think it would be easier to create a third partition on the device, add it as a LVM physical volume and extend the volume group. If you want to include that space into the existing mount point, you'll have to know whether or not your filesystem supports resizing (online/offline).
# 3  
Old 04-27-2009
Thanks for the reply.

I have created a third partition, add it as an LVM physical volume and extended the volume group, using this instructions:

Logical Volume Manager: How can I extend a Volume Group? | HowtoForge - Linux Howtos and Tutorials

# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       24321   195254010   8e  Linux LVM
/dev/sda3           24322       30401    48837600   8e  Linux LVM

How do I check whether or not I can resize my existing partitions?
vgdisplay says that the volume group is resizable.

Previous Thread | Next Thread
Test Your Knowledge in Computers #991
Difficulty: Medium
System V was known inside Bell Labs as Unix 6.0.
True or False?

9 More Discussions You Might Find Interesting

1. HP-UX

Some doubts about resizing fs's in HP-UX

Hello, I'm new to HP-UX and I'm not sure about some concepts related to resizing fs's under this OS. First of all I'm only asking about resizing ONLINE, it means, without having to umount the fs nor rebooting, etc. Q1. I've read that in order to resize a fs online there are 2 requirements:... (3 Replies)
Discussion started by: asanchez
3 Replies

2. Solaris

Resizing a disk

I'm used to using AIX but a new box running Solaris I need a little help with. The disk are presented from a SAN, the disk needing to change is presented as 148GBs drive which was allocated to a file system as the same. I need to change that without losing any data. I know I can change the disk... (7 Replies)
Discussion started by: ltlawnman
7 Replies

3. Solaris

vxfs online resizing

Hi, I have two filesystems called /u009 and /u008. I need to release 60gb from /u009 and add it to /u008 fs through fsadm command.. these are vxfs filesystem..its urgent.. thanx in advance (5 Replies)
Discussion started by: bpsunadm
5 Replies

4. Solaris

Parition Resizing

Is there a way to take space from the /opt slice (/dev/dsk/c1t0d0s5) and then put it in the /var (/dev/dsk/c1t0d0s1)? In theory, I should be able to ufsdump /opt and /var to another drive. Use disk label to resize those two slices (ex. take 10G from opt and add to /var) and then newfs and dump back... (1 Reply)
Discussion started by: adelsin
1 Replies

5. UNIX for Advanced & Expert Users

Resizing of ctelnet window

Hi, How can I resize the ctelnet window in Solaris? (0 Replies)
Discussion started by: sharif
0 Replies

6. AIX

Resizing VG with mirror

Dear Friends, I would like to know if there is any chance to expand a Volume Group, If this VG have a mirror. If there is any chance to do this what would be the safer way to avoid lost any data. Sorry about my English.:D Thanks a lot. (1 Reply)
Discussion started by: chrispaz
1 Replies

7. UNIX for Dummies Questions & Answers

Resizing file

is there anything such as "resizing file for optimal disk usage" if so, whats it about? (4 Replies)
Discussion started by: TRUEST
4 Replies

8. UNIX for Dummies Questions & Answers

resizing slices

I downloaded the Solaris recommended patched for x86 and tried to install it, but I got the message that I dont have enough disk space. I don't want to install the patches without the option to back out. Anyway I did a df -k and found that my root mount point is in 948MB whereas my /export/home is... (5 Replies)
Discussion started by: dangral
5 Replies

9. UNIX for Advanced & Expert Users

filesystems resizing

I want to resize my filesystem partitions. Reason is that I have 11GB of disk space unused by Unix which divvy reveals. Is there a way I could resize my filesystems without doing a reinstallation. The secondary problem is that the boot image is too large for a diskette (5MB). I'm running SCO... (10 Replies)
Discussion started by: sshokunbi
10 Replies

Featured Tech Videos