Find the answer to your Linux question:
Results 1 to 2 of 2
We have a Virtual machine that is running Redhat enterprise Linux v5. Looking at the current configuration (fdisk –l) there are two partitions /dev/sda1 & other /dev/sda2 partition for swap. ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    5

    Increase primary /dev/sda1 partition

    We have a Virtual machine that is running Redhat enterprise Linux v5. Looking at the current configuration (fdisk –l) there are two partitions /dev/sda1 & other /dev/sda2 partition for swap. We recently noticed that the size of the first primary partition /dev/sda1 is increasing. We DO have more space available which is at this time unallocated. So in other words we can go ahead and create a third partition for the unallocated space and format it to use for additional space.

    My question is that our recommended strategy would be to increase the size of the primary partition /dev/sd1 instead of creating a new partition because we cannot tell our application that is growing to use a newly created third partition.

    What would be the best method or strategy to extend the primary /dev/sda1 partition without losing any data? Any tips would be nice please.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    This is probably the procedure you need to use:

    1. Tell the virtual machine manager to increase the size of disc (if possible).
    2. If you can increase the apparent physical size of the disc, then you need to boot the VM into single user mode, remount the /dev/sda1 partition as read-only.
    3. Run fdisk on /dev/sda and increase the size of the first partition.
    4. Run the command fsadm -e resize /dev/sda1 followed by fsck -f /dev/sda1 to resize and check the file system. I am assuming that this is an ext2 or ext3 file system? The commands are different for LVM storage.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...