LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   How to shrink root file system (LVM) in Linux Fedora 9? (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/how-to-shrink-root-file-system-lvm-in-linux-fedora-9-a-4175461875/)

ravisingh1 05-14-2013 03:21 AM

How to shrink root file system (LVM) in Linux Fedora 9?
 
My root file system is of type LVM. i wanna shrink it but unable to do so.
When i give the below command:
Code:

resize2fs /dev/mapper/VolGroup00-VolLog00 10000M
it messages that online shrink can't can't be done as the logical volume is mounted on /. i switched to single user mode by giving command:
Code:

shutdown -i 1 now
There also, it messages the same. it says that online resizing(shrinking) is not available.

i tried by giving a few commands below but my system messaged that command doesn't exist. ( not sure whether these commands are really there or not, just a try)
Code:

ext2online /dev/mapper/VolGroup00-VolLog00 10000M
ext2resize /dev/mapper/VolGroup00-VolLog00 10000M
 /

What i intend to do is: i w'd reduce the LVM and the space avalialble after that , i w'd make one more logical volume in which i w'd install Ubuntu 12.10. i hope i can install this way keeping Fedora as well as windows.

pan64 05-14-2013 05:49 AM

I'm not really familiar with LVM, but it looks like you cannot shrink the root of the current os. Therefore you need to boot a live cd or similar...

ravisingh1 05-14-2013 08:06 AM

that's fine, that is what my intention is to boot a usb (unetbootin) but I need free space and I can get by reducing the size of the LVM

John VV 05-14-2013 12:52 PM

You are aware that fedora 9 is 9 versions and 4 years out of date

it went End Of Life way back in 2009
There have been NO security updates to Fedora 9 in 4 years
please stay current and install Fedora 18

szboardstretcher 05-14-2013 01:12 PM

Its hugely out of date, but a recent boot cd and new LV tools should suit you just fine.

ravisingh1 05-14-2013 11:08 PM

I am doing all this to install ubuntu 12.10. I am doing via unetbootin (frugal means in which rather than making a bootable usb I have kept it in my hard disk.) But the problem comes when at the time of booting (when I select unetbootin), I need to specify the place for installation. My drive is all occupied by windows 7 and fedora 9. There is enough space in Fedora9 and so I had put this post.
You see, reinstalled fedora 9 again and again via the same CD which I purchsed for the fedora. There I never faced any problem because while installing via the CD, it used to ask for an option: "install over the earlier existing fedora partition". I used to say "yes" and it used to overwrite.
Here, I am not getting the option and hence I am in doubt which one to delete, etc.
Why here I am not getting that option?
I have a thread regarding this installation in this forum (from where I have to come to this thread): LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu >
Can I use my .iso file of Ubuntu 12.10 to install directly in my hard disk?
(OR you can reach there by http://www.linuxquestions.org/questi...175457357-new/)
What I think I should do is: the earlier installation is on logical volume (LVM). As I am unable to do anything with my hard disk partition on which this LVM lies, I should select this LVM and install on that. I hope it w'd do!!!!!

Would like to ask one more question:
As I have iso file for ubuntu 12.10, so booting via usb or hard drive (using unetbootin) is same as booting via CD???

EDDY1 05-15-2013 12:44 AM

Quote:

Originally Posted by ravisingh1 (Post 4950809)
that's fine, that is what my intention is to boot a usb (unetbootin) but I need free space and I can get by reducing the size of the LVM

Is the usb is part of your lvm if not unetbootin will write directly to usb

moxieman99 05-15-2013 04:36 PM

Quote:

Originally Posted by ravisingh1 (Post 4951374)
I am doing all this to install ubuntu 12.10. I am doing via unetbootin (frugal means in which rather than making a bootable usb I have kept it in my hard disk. But the problem comes when at the time of booting (when I select unetbootin), I need to specify the place for installation. My drive is all occupied by windows 7 and fedora 9. There is enough space in Fedora9 and so I had put this post.
You see, reinstalled fedora 9 again and again via the same CD which I purchsed for the fedora. There I never faced any problem because while installing via the CD, it used to ask for an option: "install over the earlier existing fedora partition". I used to say "yes" and it used to overwrite.
Here, I am not getting the option and hence I am in doubt which one to delete, etc.
Why here I am not getting that option?
I have a thread regarding this installation in this forum (from where I have to come to this thread): LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu >
Can I use my .iso file of Ubuntu 12.10 to install directly in my hard disk?
(OR you can reach there by http://www.linuxquestions.org/questi...175457357-new/)
What I think I should do is: the earlier installation is on logical volume (LVM). As I am unable to do anything with my hard disk partition on which this LVM lies, I should select this LVM and install on that. I hope it w'd do!!!!!

Would like to ask one more question:
As I have iso file for ubuntu 12.10, so booting via usb or hard drive (using unetbootin) is same as booting via CD???

1. Move all of your data onto the Win7 partition or (better yet) onto external (or internal) storage not on the same disk (if Win7 is on same disc, copy over its data onto other storage too, just to be sure).

2. Blow away the LVM.

3. Create new partitions in place of the LVM. Do NOT use LVM as your disc structure.

4. Install new linux OSs as desired.

5. Bring back your data.

I have always been suspicious of LVM, people trying disc restores and stuff always seem to have harder times with LVMs than they do with old-fashion partitions.

Is there any reason why you think you must use LVM?

jefro 05-15-2013 06:47 PM

http://www.tcpdump.com/kb/os/linux/l...de/shrink.html

ravisingh1 05-15-2013 11:18 PM

Quote:

Originally Posted by moxieman99 (Post 4951999)
2. Blow away the LVM.

3. Create new partitions in place of the LVM. Do NOT use LVM as your disc structure.

4. Install new linux OSs as desired.

I am in doubt. As my Linux is completely on LVM , if I blow away it, then will I be able to even boot back to get the option of "Unetbootin" with the help of which I am installing Ubuntu12.10
This is the way my system starts as below:

The system prompts like this when I boot:

a) It asks for one among the 2 options:
Fedora
Other
(by default Fedora is selected)

b) If I select other, then it prompts me for one among the below 2 options:
Windows
Unetbootin

c) Now for installing ubuntu I select Unetbootin. Then I have to proceed ahead with the installation. Here only I need to specify the disk space where I want to install Ubuntu.

Also, one more thing:
I want to get windows recovery software so that if any problem comes in booting I w'd use it. My cd drive (or burner) isn't working. So, is there any way to get it in flash drive / USB?

EDDY1 05-16-2013 12:47 AM

Try using windows disk management to resize wins partition & have unetbootin install to the free space.

ravisingh1 05-16-2013 01:54 AM

Sounds very good method, Eddy1. Your 1 sentence has given way to solve a few more of mine unresolved and problematic issues.
Thanks

ravisingh1 05-16-2013 02:19 AM

Eddy, I was able to shrink the windows partition and the shrinked amount is showing as unallocated space. I can't use it now. How to go ahead? One related thread is posted here ---> LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
> Different partitions of a drive behaving differently in Windows

Also, may I know how to install unetbootin in the free space? Do I need to search for any iso image of unetbootin and install in the free space through unetbootin only?

EDDY1 05-16-2013 03:47 AM

Launch windows unetbootin in the os you downloaded the iso to, then if you don't have a usb unetbootin installs to hdd you may want to create a fat partition & save the iso there & all you would have to do is point unetbootin to it. The button to find the iso has ... on it.
http://sourceforge.net/apps/trac/une...i/installmodes

EDDY1 05-16-2013 03:58 AM

I just tried it in VBox All I did was download unetbootin made it executable, launched it, selected download debian netinstall, selected hard disk install at bottom left, rebooted & it worked. Unetbootin states that the netinstall are better for frugal because it loads completely to ram.
I also did not have to create another partition.


All times are GMT -5. The time now is 12:35 PM.