Subject: Re: Resizing netbsd disk partition
To: None <netbsd-users@NetBSD.org>
From: Anzi <anzi.new@dnainternet.net>
List: netbsd-users
Date: 01/16/2007 19:06:03
Anzi wrote:
> Manuel Bouyer wrote:
>
>> On Mon, Jan 15, 2007 at 03:03:58PM +0200, Anzi wrote:
>>
>>
>>> Hello all
>>>
>>> I have a netbsd 3.1 machine running some xen stuff. Unfortunately I
>>> made the original disk partitioning poorly and disk is running out.
>>> The question is how can (if possible) I resize the netbsd partion
>>> (grow netbsd partition at the end of disk) without reinstalling
>>> everything?
>>>
>>> Or is there a way to access partions outside the netbsd partition
>>> (disklabel)?
>>>
>>
>>
>> Yes, in disklabel you can define partition outside the netbsd partition.
>> To make things more consistent you can also extent the NetBSD partition:
>> fdisk -u
>> then disklabel -e to extend the 'c' partition by the same amount.
>>
>>
>>
> I run fdisk -u wd0 and changed partition to extend to end of disk. Now
> I am wondering what is "same amount" that I should write to disklabel :)
>
> I'm really confused about disklabel, I haven't played with netbsd /
> unixes that much, only Linuxes. So how can I calculate the correct
> amount?
>
> tried something and got:
>
> "disklabel: partition c: partition extends past end of unit"
>
>
I found some more info about bsd disklabel, so I assume that I can add a
partition called 'e' with following lines to disklabel .
'e' would fill out the rest of the partition ( size and offset marked
with stars)?
|# size offset fstype [fsize bsize bps/cpg]
e: * * 4.2BSD 2048 16384 16
#
Is this correct? if it is this is pretty good to configure compared to windows partitions...
or maybe like this (don't know whether the offset should be there):
|
|# size offset fstype [fsize bsize bps/cpg]
e: 10G * 4.2BSD 2048 16384 16 |
| f: 10G * 4.2BSD 2048 16384 16 |
|
#
|
|
|