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

2006-04-28 Thread Ian Jefferson
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 noneswapsw   
0   0
/dev/ad0s1a /   ufs rw   
1   1
/dev/ad0s1e /tmpufs rw   
2   2
/dev/ad0s1f /usrufs rw   
2   2
/dev/ad0s1d /varufs rw   
2   2


Became

/dev/ad0s3b noneswapsw   
0   0
/dev/ad0s3a /   ufs rw   
1   1
/dev/ad0s3e /tmpufs rw   
2   2
/dev/ad0s3f /usrufs rw   
2   2
/dev/ad0s3d /varufs 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-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions- 
[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


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

2006-04-28 Thread Bill Moran
On Fri, 28 Apr 2006 13:24:49 -0500
"Low Kian Seong" <[EMAIL PROTECTED]> 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-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How do you resize an existing partition / slice ?

2006-04-28 Thread Low Kian Seong

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-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"