Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
Can someone tell, me how can I add some more unalocated space from disk to an existing ext3 partition. I am using suse 10.2. I tried to use Partitioner, but ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162

    How to extend existing ext3 paritiion?

    Can someone tell, me how can I add some more unalocated space from disk to an existing ext3 partition. I am using suse 10.2. I tried to use Partitioner, but there is no such option available. Thanx for help.

  2. #2
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    You first need to extend the LV that it is sitting on. That can be done as follows:

    # lvextend -L+1G /dev/testvg/testlv

    "testvg" = volume group
    "testlv" = logical volume

    This will ADD an additional "1G" (one gig) to the "testlv" logical volume. After the LV has been extended, you have to extend the filesystem out over the new space. That can be done as follows:

    # umount /dev/testvg/testlv
    # resize2fs /dev/testvg/testlv
    # mount /dev/testvg/testlv /home

    Assuming that this LV is for your "/home" filesystem.

  3. #3
    Linux Newbie
    Join Date
    Jan 2007
    Posts
    110
    I would just run the Live CD of Gparted 3.3 or Parted Magic 1.4 to resize the partitions.

  4. #4
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    Assuming he is even using LVM...

  5. #5
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    Quote Originally Posted by saikee
    I would just run the Live CD of Gparted 3.3 or Parted Magic 1.4 to resize the partitions.
    If you use a 3rd party "Live" CD, you would have to bring down the entire system. Doing it via LVM with the commands I mentioned above would be way faster and there would be no server downtime.

  6. #6
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    Quote Originally Posted by kahoona
    If you use a 3rd party "Live" CD, you would have to bring down the entire system. Doing it via LVM with the commands I mentioned above would be way faster and there would be no server downtime.
    What makes you so sure that he's using LVM to begin with? If he's not, he needs to increase the size of the partition first, and then run resize2fs.

  7. #7
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanx for replies guys. I thought noone knows the answer to this problem at first It is true, I don't use LVM, and as far as I know I can't create it once the system is installed. So I gues, I will have to use that mentioned tools. Thanx again for your time.

  8. #8
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    If your / already resides on regular partitioning, I know of no way to convert this to LVM short of backing up your files, wiping the drive, setting it up as LVM, and restoring your files.

    If you are comfortable using command line utilities, open fdisk on the drive. Take note of where the partition you want to extend starts. Delete the partition. Recreate it at the same starting point, but extend the ending point into the free space you have. Now when you go back into your system, if you run
    Code:
    resize2fs /dev/xxxX
    where xxxX is the drive and partition number, resize2fs will automatically extend the filesystem into the free space in the partition. This is all outlined in man pages, I believe the resize2fs man page. If you are not comfortable performing this, use the GParted bootdisk already mentioned in this thread.

  9. #9
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanx again guys.

  10. #10
    Linux Newbie
    Join Date
    Jan 2007
    Posts
    110
    likwid,

    Your method of extending the partition, first by deleting it, then recreate it bigger starting at the same point of the hard disk and then using resize2fs sounds interesting.

    Presumably the filing index is just being expanded using the same inode size without affecting the existing tracking system and the files inside.

    Just wonder how reliable this method from your experience. I could keep on reading the man pages but it would be interesting to know the results in practice.

Page 1 of 2 1 2 LastLast

Posting Permissions

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