[Novalug] merging 2 patitions
Jon LaBadie
novalugml@jgcomp.com
Fri Aug 15 12:18:08 EDT 2014
On Thu, Aug 14, 2014 at 06:37:07PM -0400, William Sutton wrote:
> I think it would be worth permanently relocating /home, /tmp, and /var to
> the new space. In each case, I would
One problem with that scheme is Walt's current /home is 66GB
and the unallocated space is only 71GB (not 80GB Walt). That
is one reason I suggested moving his big data (whatever it is)
to the unallocated space.
>
> On Thu, 14 Aug 2014, Jon LaBadie via Novalug wrote:
>
> >On Thu, Aug 14, 2014 at 11:45:52AM -0700, Walt Smith via Novalug wrote:
> >>
> >>hi,
> >>
> >>problem:
> >>I want to merge 2 partitions into one partition,
> >>as 80g part 1 has run out of space. It has OS and
> >>most space used is /home occupying about 66 g.
> >>
> >>CentOS 6.4 or 5, 2 gig ram ( runs pretty good for single core )
> >>HD = 160g drive ( serial onboard IF )
> >>HD = (part 1 = 80 gig ext4 )+ (part 2 /swap 4 (?) gig) + (part 3 = 80 gig)
> >>(fdisk data below)
> >>
> >>
> >>***for the avid reader:
> >>
> >>part 1 contains OS + /boot + /home ( all except swap )
> >>part 3 empty. Will simply remove /swap until done.
> >>
> >># mount
> >>/dev/sda1 on / type ext4 (rw)
> >>
> >>
> >>desire a little discussion, but no longer desire to be
> >>a partitioning expert. In particular,
> >>
> >>looks like I need to remove swap. this is easy.
> >>To extend, it looks like cylinder total is 19457,
> >>I'd use 10200 to ~18948 ? )
> >>then remake swap at 18949 ( hopefully software just lets me
> >>select num of gigs ).
> >>
> >>1. grow part 1 into part 2 and 3?
> >>( probably boot from live CD, fedora 12, or 16 or something
> >>similar most likely. )
> >>2. utility to use ?
> >>3. effect of LVM being turned on ? )
> >>I've never "used" a LVM other than selecting ON/OFF
> >>from install menu.
> >>4. effect of selinux in permissive mode.
> >>5. any other config's/options to think about ?
> >>6. The complicated way ( for me ) would be to partition
> >>the empty 80 gig, mkfs ext4 and use LVM to add it to
> >>part 1. generally, I don't want to think about this..
> >>( but a little/short info about it may be handy )
> >>7. I have a 32 gig flash drive. I suppose I could move
> >>the whole OS except home to this first ? I can backup
> >>/home to a spare 80 gig ide drive I have here..
> >>
> >>--------------------------------------------
> >># fdisk /dev/sda
> >>
> >>Disk /dev/sda: 160.0 GB, 160041885696 bytes
> >>255 heads, 63 sectors/track, 19457 cylinders
> >>Units = cylinders of 16065 * 512 = 8225280 bytes
> >>Sector size (logical/physical): 512 bytes / 512 bytes
> >>I/O size (minimum/optimal): 512 bytes / 512 bytes
> >>Disk identifier: 0xd1ed2662
> >>
> >> Device Boot Start End Blocks Id System
> >>/dev/sda1 * 1 10199 81920000 83 Linux
> >>/dev/sda2 10199 10709 4096000 82 Linux swap / Solaris
> >>
> >>---xpert mode
> >>Disk /dev/sda: 255 heads, 63 sectors, 19457 cylinders
> >>
> >>Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
> >> 1 80 32 33 0 254 63 1023 2048 163840000 83
> >> 2 00 254 63 1023 254 63 1023 163842048 8192000 82
> >> 3 00 0 0 0 0 0 0 0 0 00
> >> 4 00 0 0 0 0 0 0 0 0 00
> >>
> >>
> >>Thanks for reading and thinking about the above...
> >>will let suggestions swash around in brain...
> >>
> >
> >If /dev/sda1 was already setup as an LVM partition I'd say
> >make the unused space a physical volume and add it to the
> >same volume group. But as it is not, I don't think it is
> >worth going the LVM route unless you are trying to learn LVM.
> >
> >Two approaches to using the extra space.
> >
> >Definitely start by backing up your system to some external
> >media. However, it is less important in the first approach.
> >
> >1. With 60GB under the /home directory, some of it has to be
> >data like photo or media files. Put those onto the extra space.
> >
> >While running your current system, use gparted to add a new
> >partition with all the remaining space. Create a filesystem
> >and edit /etc/fstab to mount it at boot, perhaps on /data.
> >
> >Make appropriate directories under /data (ex. /data/Photos)
> >and set their ownership and mode for your use.
> >
> >Copy your existing data to the new space (ex. ~/Photos to
> >/data/Photos). Rename the current directory (ex. Photos
> >to _Photos). Create a symbolic link to the new data (ex.
> >ln -s /data/Photos ~/Photos).
> >
> >When you have worked with this arrangement to be confident
> >it is ok, remove the data still under your home directory,
> >_Photos in the above example.
> >
> >2. Pretty much as you outlined above. With a backup created,
> >boot into some optical or USB drive live version. I'd look
> >for "System Rescue CD".
> >
> >In gparted, delete the swap partition leaving one big unallocated
> >space. Still in gparted, extend the remaining partition to the
> >end minus space for swap. Allocate a swap partition in the
> >remaining space. It should still be /dev/sda2, so depending on
> >how partitions are designated in /etc/fstab, you may not need
> >any adjustments).
> >
> >Back in the shell use resize2fs to expand the filesystem in the
> >enlarged partition.
> >
> >jl
> >--
> >Jon H. LaBadie novalugml@jgcomp.com
> >11226 South Shore Rd (703) 787-0688 (H)
> >Reston, VA 20190 (609) 477-8330 (C)
> >**********************************************************************
> >The Novalug mailing list is hosted by firemountain.net.
> >
> >To unsubscribe or change delivery options:
> >http://www.firemountain.net/mailman/listinfo/novalug
> >
>>> End of included message <<<
--
Jon H. LaBadie novalugml@jgcomp.com
11226 South Shore Rd (703) 787-0688 (H)
Reston, VA 20190 (609) 477-8330 (C)
More information about the Novalug
mailing list