Re: Why fdisk can't open root disk with MBR for writing?
On Fri, 14 Sep 2012, Yuri wrote: On 09/14/2012 19:23, Warren Block wrote: Did you actually try gpart? GEOM prevents writes to providers that are in use, but gpart should handle it correctly if the problem is just that fdisk doesn't understand GEOM. # gpart set -a active -i 1 ada0 If that fails, the provider is in use, usually mounted. The safety can be disabled, but it's better to figure out what has it in use. Yes it is the hard drive with mounted /. But changing the active slice should be safe in any case. gpart worked. This safety feature is protecting people from themselves. Sounds very familiar. gpart allowed it, so it's not the safety feature but merely that fdisk is aging and can't deal well with GEOM. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Why fdisk can't open root disk with MBR for writing?
Hi Yuri hackers, Garrett Cooper wrote: On Fri, Sep 14, 2012 at 5:19 PM, Yuri y...@rawbw.com wrote: I am trying to change the active partition in MBR. This should be a matter of changing only two bits (clearing one in one byte and setting another one in another byte). However, fdisk complains: fdisk: Failed to write MBR. Try to use gpart(8). truss reveals that fdisk failed to open the root disk for writing: open(/dev/ad4,O_RDWR,00) ERR#1 'Operation not permitted' open(/dev/ad4,O_RDONLY,00) = 3 (0x3) ... ... pwrite(0x3,0x34048200,0x200,0x0,0x0,0x0) ERR#9 'Bad file descriptor' Failed to write MBR. Try to use gpart(8) The question is: why the disk can't be open RW under root? The secondary issue is the bug in fdisk: once -a option is supplied and it can't open it RW it should just say so, and not suggest using gpart because gpart will probably have the same issue. 1. What version of FreeBSD? 2. What do you have set for kern.geom.debug_flags? 3. Is /dev/ad4 (or any partitions / slices under it) currently in use? Thanks! -Garrett I have been applying this diff to my man fdisk: http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sbin/fdisk/ *** 8.0-RELEASE/src/sbin/fdisk/fdisk.8 Sat Mar 14 22:32:16 2009 --- new-generic/src/sbin/fdisk/fdisk.8 Sat Mar 14 22:35:10 2009 *** *** 462,464 --- 462,468 The .Xr bsdlabel 8 command must be used for this. + .Pp + When running multi user, you cannot write unless you first run this: + .br + sysctl kern.geom.debugflags=16 I never submitted it as a send-pr, anyone think I should submit it to help save people ? Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with . Send plain text. Not: HTML, multipart/alternative, base64, quoted-printable. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash
On Fri, 14 Sep 2012 20:37:40 -0500, Mark Saad nones...@longcount.org wrote: How do you have suj on 8.3 ? Are you using a patch ? I don't have suj on 8.3 Also can you retest 9 with the following sysctlkern.timecounter.hardware=Acpi-fast Yes, I'll attempt that as soon as possible. We're under a tight deadline to migrate critical resources off of VMWare now so I don't know how soon I can test. Also in esxi what setup options do you have for the vm's ? I'm not sure what ones I have off the top of my head, but VMWare support has previously poured over ever option to make sure nothing was misconfigured. Lastly do you have esxi setup to talk to a ntp server ? If so can you confirm that it's working ? I mean the esxi host not the vm . Yes, and yes. We've got a reliable NTP infrastructure at work and ESXi is definitely using it. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash
On Sep 15, 2012, at 11:36 AM, Mark Felder f...@feld.me wrote: On Fri, 14 Sep 2012 20:37:40 -0500, Mark Saad nones...@longcount.org wrote: How do you have suj on 8.3 ? Are you using a patch ? I don't have suj on 8.3 I misread the prior emails Also can you retest 9 with the following sysctlkern.timecounter.hardware=Acpi-fast Yes, I'll attempt that as soon as possible. We're under a tight deadline to migrate critical resources off of VMWare now so I don't know how soon I can test. Also in esxi what setup options do you have for the vm's ? I'm not sure what ones I have off the top of my head, but VMWare support has previously poured over ever option to make sure nothing was misconfigured. It's not that I doubt that , in my experience their support is not equipped to answer questions that don't start with in my windows vm I have this issue ... Lastly do you have esxi setup to talk to a ntp server ? If so can you confirm that it's working ? I mean the esxi host not the vm . Yes, and yes. We've got a reliable NTP infrastructure at work and ESXi is definitely using it. Just checking this can cause odd issues . What hardware is the esxi host server ? What are you using for the vm disks? Is the storage pool on local disks , iscsi , fiber channel , or nfs . --- Mark saad | mark.s...@longcount.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Why fdisk can't open root disk with MBR for writing?
On Sat, 15 Sep 2012, Julian H. Stacey wrote: I have been applying this diff to my man fdisk: http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sbin/fdisk/ *** 8.0-RELEASE/src/sbin/fdisk/fdisk.8 Sat Mar 14 22:32:16 2009 --- new-generic/src/sbin/fdisk/fdisk.8 Sat Mar 14 22:35:10 2009 *** *** 462,464 --- 462,468 The .Xr bsdlabel 8 command must be used for this. + .Pp + When running multi user, you cannot write unless you first run this: + .br + sysctl kern.geom.debugflags=16 I never submitted it as a send-pr, anyone think I should submit it to help save people ? We have had a long discussion about kern.geom.debugflags starting here: http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028090.html My understanding from that discussion is that your patch should not be accepted. -Ben Kaduk ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Why fdisk can't open root disk with MBR for writing?
On Sat, Sep 15, 2012 at 11:49 AM, Benjamin Kaduk ka...@mit.edu wrote: On Sat, 15 Sep 2012, Julian H. Stacey wrote: I have been applying this diff to my man fdisk: http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sbin/fdisk/ *** 8.0-RELEASE/src/sbin/fdisk/fdisk.8 Sat Mar 14 22:32:16 2009 --- new-generic/src/sbin/fdisk/fdisk.8 Sat Mar 14 22:35:10 2009 *** *** 462,464 --- 462,468 The .Xr bsdlabel 8 command must be used for this. + .Pp + When running multi user, you cannot write unless you first run this: + .br + sysctl kern.geom.debugflags=16 I never submitted it as a send-pr, anyone think I should submit it to help save people ? We have had a long discussion about kern.geom.debugflags starting here: http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028090.html My understanding from that discussion is that your patch should not be accepted. Correct. Either fdisk should be fixed or updated to point out that gpart should be used. There is some useful utility for fdisk still, but it's waning. Thanks, -Garrett ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org