From owner-freebsd-current@FreeBSD.ORG Sat Aug 7 01:39:02 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 854C316A4CF for ; Sat, 7 Aug 2004 01:39:02 +0000 (GMT) Received: from out012.verizon.net (out012pub.verizon.net [206.46.170.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3044243D45 for ; Sat, 7 Aug 2004 01:39:02 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from [10.0.3.231] ([141.153.201.221]) by out012.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040807013901.FOCR22270.out012.verizon.net@[10.0.3.231]> for ; Fri, 6 Aug 2004 20:39:01 -0500 From: "Alexandre \"Sunny\" Kovalenko" To: freebsd-current@freebsd.org Content-Type: text/plain Message-Id: <1091842707.719.20.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 06 Aug 2004 21:38:27 -0400 Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out012.verizon.net from [141.153.201.221] at Fri, 6 Aug 2004 20:39:00 -0500 Subject: newfs on partition mounted read-only X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2004 01:39:02 -0000 Good people, due to my own fatfingerness, I have managed to run newfs on mounted NTFS partition and, to my surprise, discovered that newfs went ahead and initialized partition without as much as giving me a warning. At first I thought that to be specific to NTFS, but experiments have shown that UFS2 filesystem, if mounted read-only, would meet the same fate. UFS2 mounted read/write would stop 'newfs' in its tracks. My system is current as of August 3, 22:47 EST. Since it is not frequent task, I unfortunately, could not point to the working version. If there are patches to be tested, I will be glad to oblige -- I do not think one extra newfs will hurt my NTFS partition any ;) I have included session transcripts for both newfs's just in case there is something obvious I am missing. I am not sure kernel config or dmesg are relevant to the problem, but they could be provided if needed. Both NTFS and umass (device I was playing with UFS2 on) are built as modules. Softupdates are enabled. RabbitsDen# mount /dev/ad0s2a on / (ufs, NFS exported, local) devfs on /dev (devfs, local) /dev/ad0s1 on /C (ntfs, local, read-only) linprocfs on /usr/compat/linux/proc (linprocfs, local) procfs on /proc (procfs, local) RabbitsDen# newfs /dev/ad0s1 /dev/ad0s1: 10236.7MB (20964760 sectors) block size 16384, fragment size 2048 using 56 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792, 6398144, 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608, 9408960, 9785312, 10161664, 10538016, 10914368, 11290720, 11667072, 12043424, 12419776, 12796128, 13172480, 13548832, 13925184, 14301536, 14677888, 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352, 17688704, 18065056, 18441408, 18817760, 19194112, 19570464, 19946816, 20323168, 20699520 RabbitsDen# mount /dev/ad0s2a on / (ufs, NFS exported, local) devfs on /dev (devfs, local) /dev/ad0s1 on /C (ntfs, local, read-only) linprocfs on /usr/compat/linux/proc (linprocfs, local) procfs on /proc (procfs, local) /dev/da0s1 on /mnt (ufs, local, read-only) RabbitsDen# newfs /dev/da0s1 /dev/da0s1: 250.0MB (511968 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 62.50MB, 4000 blks, 8000 inodes. super-block backups (for fsck -b #) at: 160, 128160, 256160, 384160 RabbitsDen# --- Alexandre "Sunny" Kovalenko.