List Info

Thread: How do you resize an existing partition / slice ?




How do you resize an existing partition / slice ?
user name
2006-04-28 18:24:49
Dear all,

Like the subject shows, I would just like to know how do i
resize an
existing partition or slice, ermm with minimum loss of data
of course.

Thanks.
_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"
How do you resize an existing partition / slice ?
user name
2006-04-28 18:37:44
On Fri, 28 Apr 2006 13:24:49 -0500
"Low Kian Seong" <freebsd.lowgmail.com> wrote:

> Dear all,
> 
> Like the subject shows, I would just like to know how
do i resize an
> existing partition or slice, ermm with minimum loss of
data of course.

man growfs

However, this requires unused space at the _end_ of the
partition,
which is usually not the case with a root partition.  If
you're
using some sort of volume manager, such as hardware RAID or
Vinum,
you may be able to do it anyway.

-- 
Bill Moran
Collaborative Fusion Inc.
_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"
How do you resize an existing partition / slice ?
user name
2006-04-29 04:04:41
If you have extra disk space it's fairly straightforward to
use dump/ 
restore and re-partition.

I recently found myself desiring to re-slice my disk from a
single  
slice to 5 slices.

The basics were to dump the contents of my root, var, and
usr  
partitions to 3 files on another disk.  I booted from a
distribution  
CD and installed a new OS on slice 2 with the default
partitions.   
Slice 1 became a 1g partition for DOS if the urge struck me
later,  
Slice 2 was a new OS and slice 3 was for the old/existing
OS.

I relabeled my 2nd slice and restored the original OS to the
various  
partitions.  The only thing I forgot was to re-name the
partitions in  
the /etc/fstab on my old OS. The change in slice number went
like this:

/dev/ad0s1b             none            swap    sw          
    
0       0
/dev/ad0s1a             /               ufs     rw          
    
1       1
/dev/ad0s1e             /tmp            ufs     rw          
    
2       2
/dev/ad0s1f             /usr            ufs     rw          
    
2       2
/dev/ad0s1d             /var            ufs     rw          
    
2       2

Became

/dev/ad0s3b             none            swap    sw          
    
0       0
/dev/ad0s3a             /               ufs     rw          
    
1       1
/dev/ad0s3e             /tmp            ufs     rw          
    
2       2
/dev/ad0s3f             /usr            ufs     rw          
    
2       2
/dev/ad0s3d             /var            ufs     rw          
    
2       2


In your case if you want just the original slice you would
do  
something like:

boot from the live filesystem CD
fdisk your drive,
label (partition) your drive to the configuration you want
newfs each new partition,
mount the drive you used for backup
mount each of the new partitions of your original disk
Restore each of the partitions in turn.

Reboot from the original disk.

This looks a bit complex but is not too bad at all.  This
dump/ 
restore or even tar'ing filesystems is something we used a
long time  
ago to "image" NeXT systems.  It's been quite
reliable for me.  Your  
mileage may vary.

IJ


On Apr 29, 2006, at 3:24 AM, Low Kian Seong wrote:

> Dear all,
>
> Like the subject shows, I would just like to know how
do i resize an
> existing partition or slice, ermm with minimum loss of
data of course.
>
> Thanks.
> _______________________________________________
> freebsd-questionsfreebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
> To unsubscribe, send any mail to
"freebsd-questions- 
> unsubscribefreebsd.org"

_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )