add new disk

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

add new disk

Orestes LeaL R.
Hi guys, yesterday I was adding a new virtual disk (in vmware workstation)  
to my 4.8
virtual but I can't do it because the procedure to format and make a new  
partition
seems diferent for 4.6 or 4.3 compared to 4.8, any help?

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Nick Holland
On 12/20/10 10:45, Orestes Leal R. wrote:
> Hi guys, yesterday I was adding a new virtual disk (in vmware
> workstation) to my 4.8
> virtual but I can't do it because the procedure to format and make a new
> partition
> seems diferent for 4.6 or 4.3 compared to 4.8, any help?

no, not really different (though some things are more precise now)

So...the basics:
What did you do?
What did you expect to happen?
What did you see happen?

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Orestes LeaL R.
everything from update the MBR, dislabel, etc, seems to work, but when I  
do newfs /dev/NameOfPartition
It says

/dev/NameOfPartition: Block Device

and anything else, and later can't mount the partition off course.

> On 12/20/10 10:45, Orestes Leal R. wrote:
> Hi guys, yesterday I was adding a new virtual disk (in vmware
> workstation) to my 4.8
> virtual but I can't do it because the procedure to format and make a new
> partition
> seems diferent for 4.6 or 4.3 compared to 4.8, any help?
>  no, not really different (though some things are more precise now)
>  So...the basics:
> What did you do?
> What did you expect to happen?
> What did you see happen?
>  Nick.
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Otto Moerbeek
On Mon, Dec 20, 2010 at 11:43:52AM -0600, Orestes Leal R. wrote:

> everything from update the MBR, dislabel, etc, seems to work, but
> when I do newfs /dev/NameOfPartition
> It says
>
> /dev/NameOfPartition: Block Device

I can guess what you did, but please show the exact commands next
time.

To answer your question: run newfs on the raw device. We added a check
since it is wrong to run it on a block device. That only works if you
are lucky. This is mentioned in the man page.

        -Otto

>
> and anything else, and later can't mount the partition off course.
>
> >On 12/20/10 10:45, Orestes Leal R. wrote:
> >Hi guys, yesterday I was adding a new virtual disk (in vmware
> >workstation) to my 4.8
> >virtual but I can't do it because the procedure to format and make a new
> >partition
> >seems diferent for 4.6 or 4.3 compared to 4.8, any help?
> > no, not really different (though some things are more precise now)
> > So...the basics:
> >What did you do?
> >What did you expect to happen?
> >What did you see happen?
> > Nick.
> >
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Nick Holland
In reply to this post by Orestes LeaL R.
On 12/20/10 12:43, Orestes Leal R. wrote:
> everything from update the MBR, dislabel, etc, seems to work, but when I
> do newfs /dev/NameOfPartition
> It says
>
> /dev/NameOfPartition: Block Device

geez.  Definite security issue there, definitely can't let us find out
what disk you are trying to newfs (incorrectly).  And yes, what you are
hiding IS your problem.

> and anything else, and later can't mount the partition off course.

Like Otto said, "man newfs"

Hint: the opposite of "block" is "raw".
Double hint: as Otto indicated and I hinted at, what you were doing
before was wrong.  They don't let you do that anymore.

Nick.

>
>> On 12/20/10 10:45, Orestes Leal R. wrote:
>> Hi guys, yesterday I was adding a new virtual disk (in vmware
>> workstation) to my 4.8
>> virtual but I can't do it because the procedure to format and make a new
>> partition
>> seems diferent for 4.6 or 4.3 compared to 4.8, any help?
>> no, not really different (though some things are more precise now)
>> So...the basics:
>> What did you do?
>> What did you expect to happen?
>> What did you see happen?
>> Nick.

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Orestes LeaL R.
In reply to this post by Otto Moerbeek
I do all that commands in my home machine, tomorrow I will show the  
commands,
but anyway, these commands work for 4.3 but NO in 4.8, thanks a lot,

LeaL


>
> I can guess what you did, but please show the exact commands next
> time.
>
> To answer your question: run newfs on the raw device. We added a check
> since it is wrong to run it on a block device. That only works if you
> are lucky. This is mentioned in the man page.
>
> -Otto
>
>>
>> and anything else, and later can't mount the partition off course.
>>
>> >On 12/20/10 10:45, Orestes Leal R. wrote:
>> >Hi guys, yesterday I was adding a new virtual disk (in vmware
>> >workstation) to my 4.8
>> >virtual but I can't do it because the procedure to format and make a  
>> new
>> >partition
>> >seems diferent for 4.6 or 4.3 compared to 4.8, any help?
>> > no, not really different (though some things are more precise now)
>> > So...the basics:
>> >What did you do?
>> >What did you expect to happen?
>> >What did you see happen?
>> > Nick.
>> >
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Orestes LeaL R.
In reply to this post by Nick Holland
This was the procedure I follow in 4.3 sucessfully, the same I did in 4.8  
and doesn't work:

-bash-3.2# fdisk -i sd1

         -----------------------------------------------------
         ------ ATTENTION - UPDATING MASTER BOOT RECORD ------
         -----------------------------------------------------

Do you wish to write new MBR and partition table? [n]
MBR is unchanged
-bash-3.2# fdisk -i sd1

         -----------------------------------------------------
         ------ ATTENTION - UPDATING MASTER BOOT RECORD ------
         -----------------------------------------------------

Do you wish to write new MBR and partition table? [n] y
-bash-3.2# disklabel -E sd1
# Inside MBR partition 3: type A6 start 32 size 2097120
Treating sectors 32-2097152 as the OpenBSD portion of the disk.
You can use the 'b' command to change this.

Initial label editor (enter '?' for help at any prompt)
> a a
offset: [32]
size: [2097120]
FS type: [4.2BSD]
> q
Write new label?: [y] y
-bash-3.2# newfs /dev/sd1a
newfs: : /dev/sd1a: not a character-special device

/dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
  32, 414688, 829344, 1244000, 1658656, 2073312,

>>> no, not really different (though some things are more precise now)
>>> So...the basics:
>>> What did you do?
>>> What did you expect to happen?
>>> What did you see happen?
>>> Nick.
>
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Otto Moerbeek
On Tue, Dec 21, 2010 at 08:09:58AM -0600, Orestes Leal R. wrote:

> This was the procedure I follow in 4.3 sucessfully, the same I did
> in 4.8 and doesn't work:
>
> -bash-3.2# fdisk -i sd1
>
>         -----------------------------------------------------
>         ------ ATTENTION - UPDATING MASTER BOOT RECORD ------
>         -----------------------------------------------------
>
> Do you wish to write new MBR and partition table? [n]
> MBR is unchanged
> -bash-3.2# fdisk -i sd1
>
>         -----------------------------------------------------
>         ------ ATTENTION - UPDATING MASTER BOOT RECORD ------
>         -----------------------------------------------------
>
> Do you wish to write new MBR and partition table? [n] y
> -bash-3.2# disklabel -E sd1
> # Inside MBR partition 3: type A6 start 32 size 2097120
> Treating sectors 32-2097152 as the OpenBSD portion of the disk.
> You can use the 'b' command to change this.
>
> Initial label editor (enter '?' for help at any prompt)
> >a a
> offset: [32]
> size: [2097120]
> FS type: [4.2BSD]
> >q
> Write new label?: [y] y
> -bash-3.2# newfs /dev/sd1a
> newfs: : /dev/sd1a: not a character-special device

This is not 4.8. This warning has been "upgraded" to an error now.
Read my previous reply and follow the advise in it.

        -Otto

>
> /dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> super-block backups (for fsck -b #) at:
>  32, 414688, 829344, 1244000, 1658656, 2073312,
>
> >>>no, not really different (though some things are more precise now)
> >>>So...the basics:
> >>>What did you do?
> >>>What did you expect to happen?
> >>>What did you see happen?
> >>>Nick.
> >
> >
> >
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Orestes LeaL R.
Otto, this is not 4.8 it's 4.3, so this is a error now and not a warning,
what I must changte in the comnand line to make it work with 4.8?

LeaL


>
> This is not 4.8. This warning has been "upgraded" to an error now.
> Read my previous reply and follow the advise in it.
>
> -Otto
>
>>
>> /dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
>> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
>> super-block backups (for fsck -b #) at:
>>  32, 414688, 829344, 1244000, 1658656, 2073312,
>>
>> >>>no, not really different (though some things are more precise now)
>> >>>So...the basics:
>> >>>What did you do?
>> >>>What did you expect to happen?
>> >>>What did you see happen?
>> >>>Nick.
>> >
>> >
>> >
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Tomas Bodzar-4
Do you need it in Braille?

Couple of people said to you what to do. Use raw device and not block
device. Is it so hard to read man page for newfs to see that in
DESCRIPTION part?


On Tue, Dec 21, 2010 at 3:25 PM, Orestes Leal R.
<[hidden email]> wrote:

> Otto, this is not 4.8 it's 4.3, so this is a error now and not a warning,
> what I must changte in the comnand line to make it work with 4.8?
>
> LeaL
>
>
>>
>> This is not 4.8. This warning has been "upgraded" to an error now.
>> Read my previous reply and follow the advise in it.
>>
>> B  B  B  B -Otto
>>
>>>
>>> /dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
>>> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
>>> super-block backups (for fsck -b #) at:
>>> B 32, 414688, 829344, 1244000, 1658656, 2073312,
>>>
>>> >>>no, not really different (though some things are more precise now)
>>> >>>So...the basics:
>>> >>>What did you do?
>>> >>>What did you expect to happen?
>>> >>>What did you see happen?
>>> >>>Nick.
>>> >
>>> >
>>> >
>>>
>>>
>>> --
>>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>
>>
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Kenneth R Westerback
In reply to this post by Orestes LeaL R.
On Tue, Dec 21, 2010 at 08:25:35AM -0600, Orestes Leal R. wrote:
> Otto, this is not 4.8 it's 4.3, so this is a error now and not a warning,
> what I must changte in the comnand line to make it work with 4.8?
>
> LeaL

newfs /dev/rsd1a

.... Ken

>
>
> >
> >This is not 4.8. This warning has been "upgraded" to an error now.
> >Read my previous reply and follow the advise in it.
> >
> > -Otto
> >
> >>
> >>/dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
> >>6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> >>super-block backups (for fsck -b #) at:
> >> 32, 414688, 829344, 1244000, 1658656, 2073312,
> >>
> >>>>>no, not really different (though some things are more precise now)
> >>>>>So...the basics:
> >>>>>What did you do?
> >>>>>What did you expect to happen?
> >>>>>What did you see happen?
> >>>>>Nick.
> >>>
> >>>
> >>>
> >>
> >>
> >>--
> >>Using Opera's revolutionary email client: http://www.opera.com/mail/
> >
> >
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Orestes LeaL R.
In reply to this post by Tomas Bodzar-4
No, I don't, I'm at work and here don't have a 4.8 box, only 4.6,
By raw you mean use /dev/sd0 instead /dev/sd0a for example?



> Do you need it in Braille?
>
> Couple of people said to you what to do. Use raw device and not block
> device. Is it so hard to read man page for newfs to see that in
> DESCRIPTION part?
>
>
> On Tue, Dec 21, 2010 at 3:25 PM, Orestes Leal R.
> <[hidden email]> wrote:
>> Otto, this is not 4.8 it's 4.3, so this is a error now and not a  
>> warning,
>> what I must changte in the comnand line to make it work with 4.8?
>>
>> LeaL
>>
>>
>>>
>>> This is not 4.8. This warning has been "upgraded" to an error now.
>>> Read my previous reply and follow the advise in it.
>>>
>>>        -Otto
>>>
>>>>
>>>> /dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
>>>> 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
>>>> super-block backups (for fsck -b #) at:
>>>>  32, 414688, 829344, 1244000, 1658656, 2073312,
>>>>
>>>> >>>no, not really different (though some things are more precise now)
>>>> >>>So...the basics:
>>>> >>>What did you do?
>>>> >>>What did you expect to happen?
>>>> >>>What did you see happen?
>>>> >>>Nick.
>>>> >
>>>> >
>>>> >
>>>>
>>>>
>>>> --
>>>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>>
>>>
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>
>>
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

roberth-5
In reply to this post by Orestes LeaL R.
On Tue, 21 Dec 2010 08:25:35 -0600
"Orestes Leal R." <[hidden email]> wrote:

> Otto, this is not 4.8 it's 4.3, so this is a error now and not a
> warning, what I must changte in the comnand line to make it work with
> 4.8?

*sigh*
you have been told what is wrong before, but lets end this.

"newfs /dev/sd1a" was wrong but was handled gracefully.
and it is still wrong but now it bombs out.

newfs works on raw devices. raw devices start with 'r'.

the right command simply is "newfs /dev/rsd1a".
                                        ^

now that it was spelled out, it might be easier for you to read up on
this in the manpages.

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Raimo Niskanen-7
In reply to this post by Orestes LeaL R.
On Tue, Dec 21, 2010 at 08:48:14AM -0600, Orestes Leal R. wrote:
> No, I don't, I'm at work and here don't have a 4.8 box, only 4.6,
> By raw you mean use /dev/sd0 instead /dev/sd0a for example?

http://www.openbsd.org/cgi-bin/man.cgi?query=newfs
 Search for 'raw' or read the second paragraph in the section "DESCRIPTION".

Or do you not have Internet at work?

>
>
>
> >Do you need it in Braille?
> >
> >Couple of people said to you what to do. Use raw device and not block
> >device. Is it so hard to read man page for newfs to see that in
> >DESCRIPTION part?
> >
> >
> >On Tue, Dec 21, 2010 at 3:25 PM, Orestes Leal R.
> ><[hidden email]> wrote:
> >>Otto, this is not 4.8 it's 4.3, so this is a error now and not a  
> >>warning,
> >>what I must changte in the comnand line to make it work with 4.8?
> >>
> >>LeaL
> >>
> >>
> >>>
> >>>This is not 4.8. This warning has been "upgraded" to an error now.
> >>>Read my previous reply and follow the advise in it.
> >>>
> >>>       -Otto
> >>>
> >>>>
> >>>>/dev/sd1a: 1024.0MB in 2097120 sectors of 512 bytes
> >>>>6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
> >>>>super-block backups (for fsck -b #) at:
> >>>> 32, 414688, 829344, 1244000, 1658656, 2073312,
> >>>>
> >>>>>>>no, not really different (though some things are more precise now)
> >>>>>>>So...the basics:
> >>>>>>>What did you do?
> >>>>>>>What did you expect to happen?
> >>>>>>>What did you see happen?
> >>>>>>>Nick.
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>--
> >>>>Using Opera's revolutionary email client: http://www.opera.com/mail/
> >>>
> >>>
> >>
> >>
> >>--
> >>Using Opera's revolutionary email client: http://www.opera.com/mail/
> >>
> >>
> >
> >
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

Orestes LeaL R.
In reply to this post by roberth-5
Thanks robert, that's a simple explanation, thanks,

LeaL


> *sigh*
> you have been told what is wrong before, but lets end this.
> "newfs /dev/sd1a" was wrong but was handled gracefully.
> and it is still wrong but now it bombs out.
> newfs works on raw devices. raw devices start with 'r'.
> the right command simply is "newfs /dev/rsd1a".
>                                         ^
> now that it was spelled out, it might be easier for you to read up on
> this in the manpages.

Reply | Threaded
Open this post in threaded view
|

Re: add new disk

William Boshuck
In reply to this post by roberth-5
On Tue, Dec 21, 2010 at 02:59:12PM +0100, roberth wrote:

> On Tue, 21 Dec 2010 08:25:35 -0600
> "Orestes Leal R." <[hidden email]> wrote:
>
> > Otto, this is not 4.8 it's 4.3, so this is a error now and not a
> > warning, what I must changte in the comnand line to make it work with
> > 4.8?
>
> *sigh*
> you have been told what is wrong before, but lets end this.
>
> "newfs /dev/sd1a" was wrong but was handled gracefully.
> and it is still wrong but now it bombs out.
>
> newfs works on raw devices. raw devices start with 'r'.
>
> the right command simply is "newfs /dev/rsd1a".

Or just

newfs sd1a

which is also in the man page,
and in Section 14.4 of the FAQ.