Re: add new disk

Previous thread: instable vpn after upgrading to 4.8 by Axel Rau on Monday, December 20, 2010 - 4:50 am. (3 messages)

Next thread: 11 Day - South African Tour - New Year Special by Bushveld Safaris, Tours and Transfers on Monday, December 20, 2010 - 6:22 am. (1 message)
From: Orestes Leal R.
Subject: add new disk
Date: Monday, December 20, 2010 - 8:46 am

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?

From: Nick Holland
Date: Monday, December 20, 2010 - 9:22 am

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.

From: Orestes Leal R.
Date: Monday, December 20, 2010 - 10:43 am

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

/dev/NameOfPartition: Block Device



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

From: Otto Moerbeek
Date: Monday, December 20, 2010 - 10:00 am

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.


From: Orestes Leal R.
Date: Monday, December 20, 2010 - 1:46 pm

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,



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

From: Nick Holland
Date: Monday, December 20, 2010 - 12:08 pm

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 

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.


From: Orestes Leal R.
Date: Tuesday, December 21, 2010 - 7:09 am

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.

offset: [32]
size: [2097120]
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:


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

From: Otto Moerbeek
Date: Tuesday, December 21, 2010 - 6:30 am

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


From: Orestes Leal R.
Date: Tuesday, December 21, 2010 - 7:25 am

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?



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

From: Tomas Bodzar
Date: Tuesday, December 21, 2010 - 6:48 am

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.

From: Orestes Leal R.
Date: Tuesday, December 21, 2010 - 7:48 am

No, I don't, I'm at work and here don't have a 4.8 box, only 4.6,


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

From: Raimo Niskanen
Date: Tuesday, December 21, 2010 - 7:04 am

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


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

From: Kenneth R Westerback
Date: Tuesday, December 21, 2010 - 6:56 am

newfs /dev/rsd1a


From: roberth
Date: Tuesday, December 21, 2010 - 6:59 am

On Tue, 21 Dec 2010 08:25:35 -0600

*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.

From: Orestes Leal R.
Date: Tuesday, December 21, 2010 - 8:03 am

Thanks robert, that's a simple explanation, thanks,


From: William Boshuck
Date: Tuesday, December 21, 2010 - 8:38 am

Or just

newfs sd1a

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

Previous thread: instable vpn after upgrading to 4.8 by Axel Rau on Monday, December 20, 2010 - 4:50 am. (3 messages)

Next thread: 11 Day - South African Tour - New Year Special by Bushveld Safaris, Tours and Transfers on Monday, December 20, 2010 - 6:22 am. (1 message)