Re: Disk Partiotioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2004-11-29 at 06:32 -0600, Gustavo Seabra wrote:
> Kevin J. Cummings wrote:
> 
> > Gustavo Seabra wrote:
> >
> >> C. Linus Hicks wrote:
> >>
> >>> On Mon, 2004-11-22 at 10:47 -0600, Gustavo Seabra wrote:
> >>>  
> >>>
> >>>> That was my second mistake ;-) I didn't use LVM... The way I saw it 
> >>>> is, since I only have one HD, why should I need LVM? Now, from your 
> >>>> post, it seems that LVM has advantages even for single HD, is that 
> >>>> right?
> >>>>
> >>>> By the way, since I didn't use LVM, and wat to increase the size of 
> >>>> / (root) taking space from /home, am I just screwed?
> >>>>   
> >>>
> >>>
> >>>
> >>> Not necessarilly, it depends mostly on your partition layout. What
> >>> partitions have you defined - please give device (disk) names and mount
> >>> points.
> >>>
> >>> If you are in a situation where you can either temporarily delete a
> >>> partition after having backed it up, or shrink an existing one to 
> >>> create
> >>> a new one, then you should have some options available to you.
> >>>
> >>> Do a "man resize2fs" and read that.
> >>>
> >>>  
> >>>
> >> Sorry, I just found a way to get the info. Here is the result of df -h:
> >> Filesystem            Size  Used Avail Use% Mounted on
> >> /dev/sda3             4.9G  4.2G  427M  91% /
> >> /dev/sda1              99M   17M   78M  18% /boot
> >> none                  125M     0  125M   0% /dev/shm
> >> /dev/sda2              12G  683M   11G   7% /home
> >
> >
> > Instead of "df -h", "fdisk -l" would have been more useful.  We want 
> > to see the actual partition layout of the partition table....
> >
> >> What I'd like to do is to take a couple of Gigs from /home and put 
> >> them into / (root). I believe I can backup and erase /home without 
> >> problems, but how can I put this space into root?
> >
> >
> > *IF* sda2 and sda3 are contiguous in the partition table (probably, 
> > but not guarenteed without looking at the actual allocation info) you 
> > might be able to resize(move) sda3 to the upper regions, re-size the 
> > partition sda3, then merge the new space onto the end of sda2.  If you 
> > are lucky, you should then be able to expand sda2 into the re-claimed 
> > space.  Not easy, but it should be straightforward if you know the 
> > right commands.
> > If you have no experience doing this, I'd heartily recommend backing 
> > up the data in both sda2 & sda3 before attempting this for a first time!
> >
> >> Thanks
> >
> >
> > Good Luck!
> >
> Thanks for you reply, and sorry it took me so long to answer. It took me 
> some time to realize I needed the - in the su command to get this to 
> work. But here it is:
> [root@patroclus ~]# fdisk -l
> 
> Disk /dev/sda: 18.2 GB, 18210037760 bytes
> 255 heads, 63 sectors/track, 2213 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        1511    12032685   83  Linux
> /dev/sda3            1512        2148     5116702+  83  Linux
> /dev/sda4            2149        2213      522112+   5  Extended
> /dev/sda5            2149        2213      522081   82  Linux swap
> 

Looking at this information and your request above, I would recommend
the following.

1. Backup anything in the / partition that you want to keep. This
includes config files, customizations, mail, web site data, etc.

If you want to do a full backup/restore you may be able to do that by
using tar and creating a file in /home of all the data in / (but not
including /home and space permitting)

2. Boot from some live distro such as knoppix, and use qtparted to
resize sda2 smaller by the amount you want.
Then remove and recreate sda3 to fill the new larger space.

3. Reinstall, or restore the data for sda3.

These 3 steps should handle what you are asking for


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux