April 22, 2006

HOWTO get extra space on partition containing Fedora Core 5

Abstract: I had created a partition to hold Fedora Core 5, this was about 4GB, as the OS extended and grew I needed more space, i went on Windows and used Partiton Magic to take some space off the windows partition, that space became unused space… this is how I allocated this space in Fedora Core 5 so that it could be used by the Fedora OS.

[(works for me in Fedora core 5, might work in others – but I have not tested it – use at your own risk, no guarantee, no warranty, your milage may vary- might solve all your problems, might blow up your computer and cause a turnip to fall on you head at an unfortunate moment – you might want to look at other sources to ensure that this is right or help with any other problems you might have). Don't type the square brackets or what's in them. The situation here is based on when I needed more disk space… firstly I went into windows and then used partition magic to create some free space on my disk (10G), this tracks through what I did, some of the things here are based on advice I got from other, so thanks for the advice.]

[Log on as root in terminal]
[type:] fdisk -l
[then:] fdisk /dev/hda

[Now options will appear, you only need to enter in the letter and press enter]

n [this option means 'new']
[Now select] p

[it may do the number automatically, if it hasn't select one which wasn't used when you typed 'fdisk -l']

[it should automatically do the start and end position – if it doesn't then you will need to look at the fdisk -l values and select the first cylinder as one after your last partition before the gap and the last one as one before the next partion after the gap]

[type:] t

83 [this is a linux partion; assuming you want an ext2/3]

w [this writes – so make sure you are happy]

[you might need to restart now…(I did)]

[now go back into terminal after restart, log on as root again…] mkfs.ext2 /dev/hda4

pvcreate /dev/hda4

vgextend VolGroup00 /dev/hda4

pvdisplay

[so now your new partition should be there and registering in the pvdisplay (physical volume display)]

[now type] lvm

[This is the logical volume manager]

[type:] vgs [this will show you the status of your logical volumes]

[this will show you the current volume groups. The default volume group is VolGroup00, this is what mine was set at, and probably yours too…]

[it may look like this]

VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 2 0 wz—n- 5G 32.00M

[OK, so when we used 'pvcreate /dev/hda4' above we created it as a physical volume, this now needs to be put in the volume group…type in]

vgextend VolGroup00 /dev/hda4

[to check back and make sure it's all cool type in:]

vgs

[Look at this against the first time you used vgs, it should now show another volume and the 'VFree' should have increased by the size of the new partition you put on earlier: /dev/hda4]

VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 2 0 wz—n- 5G 10.32G

[Now we resize the volume groups so that the free space can actually be used!... I added 10G in this example (and about that in real life) so now we need to get on it…]

[Type:]

lvextend -L +10G /dev/VolGroup00/LogVol00 /dev/hda4

[it'll now tell you that it's gone ok (I hope), if you type in:] vgs [then the free space amount should have been reduced, if it has, brill!]

[df results will be the same as before we started, so to get to the space so we can see it we need to go to the 'core'... get it?]

[Stick in the installation DVD, or if you used CDs I think you'll need the first one, boot with the cd/DVD… you might need to access your BIOS settings and make sure that the cd/dvd drive is what it boots to first – I don't know because thats the setting I have as a default anyway – if this is the case, and I think it might then you might be able to just press F12 and select it – although thats not supported on all systems I don't think]

[Press:] F5
[Then type:] linux rescue

[Select your language, I'll assume english will work if your reading this, and the keyboard system you want to use]
[you will now need to aviod mounting disks and systems so select "skip" because you want to avoid mounting or booting]

[a command line should now be in front of you]

[now type:]
lvm vgchange -a y VolGroup00

[Then:]

lvm lvchange -a y /dev/VolGroup00/LogVol00

[Then check everything is cool by using the next command, this will take a little while, but let it run:]

e2fsck -f /dev/VolGroup00/LogVol00

[Then type:]

resize2fs /dev/VolGroup00/LogVol00

[take out the cd and reboot. It should all be working now, free space should be viewable in your home folder and everything should be great :), hope it helped]


- 5 comments by 0 or more people Not publicly viewable

  1. Brad Hards

    Worked for me.

    18 Jun 2006, 09:15

  2. Albert

    Thanks, worked for me too. Though with a few caveats:
    1. The LVs seemed to activate automatically when I activated the VG ?
    2. After e2fsck, I ran resize2fs, and it asked me to run e2fsck first (??). I ran e2fsck again and same thing. I had to do resize2fs with -f (orce). Little nervous about doing that…but it worked.

    Thanks.

    06 Nov 2006, 02:19

  3. Joe

    Thanks for the feedback, I went through it again recently and I know that it could do a little clean up, although I must admit that I’ve not had the same problem as you, Albert.

    I might have to have a look through it and maybe do a little clean up, but it’s good that it worked, even if slightly imperfectly

    06 Nov 2006, 09:08

  4. collins

    Hey thank you very much for this…I have tried it once and it worked…..on fedora7 dell inspiron 6000 july 14th 2007
    many,many thanks.

    14 Jul 2007, 16:07

  5. bmb

    Thanks once again – worked quite a couple times!

    27 Oct 2007, 15:21


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

April 2006

Mo Tu We Th Fr Sa Su
Mar |  Today  | May
               1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Search this blog

Galleries

Most recent comments

  • Thanks once again worked quite a couple times! by bmb on this entry
  • nice post commenting out the 'example' line and inserting country code did it for me. thanks Pete by pete on this entry
  • In a single word SUPERB….. Hope this ll be best guide for initial phase users like us.. Thank you … by vicks on this entry
  • I did as posted I have no file /etc/clamd.conf I am now using yum install clamav. still at a loss. I… by Chris on this entry
  • You have to put a # infront of the line that begins with EXAMPLE in /etc/clamd.conf Running freshcla… by john doe on this entry

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXIX