Re: How to predict drive number change for 7.3-8.1 upgrade?
Michael Sperber sper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Best regards Oliver -- Oliver Fromme, secnetix GmbH Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd I have stopped reading Stephen King novels. Now I just read C code instead. -- Richard A. O'Keefe ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Oliver Fromme o...@lurza.secnetix.de writes: Michael Sperber sper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Ah, excellent - that's what I was looking for. Thanks! -- Regards, Mike ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Michael Sperber wrote: Oliver Frommeo...@lurza.secnetix.de writes: Michael Sperbersper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Ah, excellent - that's what I was looking for. Thanks! beware of drago^Wchanging of adX numbers each time you add/remove drive ;) It's better to label filesystems, imho ;) -- SY, Marat
Re: How to predict drive number change for 7.3-8.1 upgrade?
Marat N.Afanasyev ama...@ksu.ru writes: Michael Sperber wrote: Oliver Frommeo...@lurza.secnetix.de writes: Michael Sperbersper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Ah, excellent - that's what I was looking for. Thanks! beware of drago^Wchanging of adX numbers each time you add/remove drive ;) It's better to label filesystems, imho ;) This is a rented server, so I no drive will ever be removed or added. On the other hand, if I understand it correctly, I'll need to unmount the root partition in order to label it - right? -- Regards, Mike ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Michael Sperber wrote: Marat N.Afanasyevama...@ksu.ru writes: Michael Sperber wrote: Oliver Frommeo...@lurza.secnetix.de writes: Michael Sperbersper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Ah, excellent - that's what I was looking for. Thanks! beware of drago^Wchanging of adX numbers each time you add/remove drive ;) It's better to label filesystems, imho ;) This is a rented server, so I no drive will ever be removed or added. On the other hand, if I understand it correctly, I'll need to unmount the root partition in order to label it - right? you may try the following commands: sysctl kern.geom.debugflags=16 foreach fs (your-filesystems) glabel label your-$fs-label your-$fs-device end echo geom_label_load=YES /boot/loader.conf reboot and see if the labels appear in /dev/label -- SY, Marat
Re: How to predict drive number change for 7.3-8.1 upgrade?
Marat N.Afanasyev ama...@ksu.ru writes: you may try the following commands: sysctl kern.geom.debugflags=16 foreach fs (your-filesystems) glabel label your-$fs-label your-$fs-device end echo geom_label_load=YES /boot/loader.conf reboot and see if the labels appear in /dev/label Is this safe to do? The man page for glabel seems to imply that glabel should be used before newfs, and tunefs after newfs. -- Regards, Mike ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Dnia piątek 17 wrzesień 2010 o 16:35:52 Michael Sperber napisał(a): Marat N.Afanasyev ama...@ksu.ru writes: you may try the following commands: sysctl kern.geom.debugflags=16 foreach fs (your-filesystems) glabel label your-$fs-label your-$fs-device end echo geom_label_load=YES /boot/loader.conf reboot and see if the labels appear in /dev/label Is this safe to do? The man page for glabel seems to imply that glabel should be used before newfs, and tunefs after newfs. It's because geom class uses the last sector of the provider to keep his metadata, so if you will overwrite this sector then you lose this metadata(in this case label). So to not lose this metadata you should use geom_label first and then newfs on the /dev/label/... I think that using ufs label should be sufficient, glabel supports them too (under /dev/ufs directory). Maciek ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
On Fri, Sep 17, 2010 at 5:38 AM, Oliver Fromme o...@lurza.secnetix.de wrote: Michael Sperber sper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Problem with doing that (no ATA_STATIC_ID) is that if you change the order that your PCI devices are enumerated, you will change the order in which your disks are probed, and all your numbers change again. :) And there's an option for this in every BIOS I've worked with. Plus, moving addon controllers from one slot to another will also re-number your devices. The best, long-term, solution is to label your devices/filesystems so that the name never changes, no matter what happsn to the underlying device nodes. There are multiple ways to do so, depending on whether you want to label the disk, the slice, the partition, or the filesystem: - glabe; - gpart labels - filesystem labels -- Freddie Cash fjwc...@gmail.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Freddie Cash fjwc...@gmail.com wrote: On Fri, Sep 17, 2010 at 5:38 AM, Oliver Fromme o...@lurza.secnetix.de wrote: Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting. Then your first disk will be ad0, no matter what controller and channel it is connected to. Be sure to update your /etc/fstab file. Problem with doing that (no ATA_STATIC_ID) is that if you change the order that your PCI devices are enumerated, you will change the order in which your disks are probed, and all your numbers change again. :) And there's an option for this in every BIOS I've worked with. Plus, moving addon controllers from one slot to another will also re-number your devices. He wrote that it is a rented server with just one drive. I don't see how the drive number could ever change under these circustances. So removing ATA_STATIC_ID is really the easiest solution. Best regards Oliver -- Oliver Fromme, secnetix GmbH Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd The last good thing written in C was Franz Schubert's Symphony number 9. -- Erwin Dieterich ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
On Fri, September 17, 2010 13:10, Freddie Cash wrote: On Fri, Sep 17, 2010 at 5:38 AM, Oliver Fromme o...@lurza.secnetix.de wrote: Michael Sperber sper...@deinprogramm.de wrote:  I just upgraded my desktop system from 7.3 to 8.1, and the main hard  drive, which was /dev/ad6 before is now /dev/ad10.  Consequently, the  initial boot failed when trying to mount the root file system from ad6.   The desktop system is now fixed, but I also have a rented server with  only a serial console, and I worry that the upgrade is going to leave me  with a dead machine.  Is there any way to predict how the drive number  changes?  (Why does it change at all?)  If so, what's the proper way to  tell the system the initial root device *before* rebooting? Remove options ATA_STATIC_ID from your kernel config before building the new kernel and rebooting.  Then your first disk will be ad0, no matter what controller and channel it is connected to.  Be sure to update your /etc/fstab file. Problem with doing that (no ATA_STATIC_ID) is that if you change the order that your PCI devices are enumerated, you will change the order in which your disks are probed, and all your numbers change again. :) And there's an option for this in every BIOS I've worked with. Plus, moving addon controllers from one slot to another will also re-number your devices. The best, long-term, solution is to label your devices/filesystems so that the name never changes, no matter what happsn to the underlying device nodes. There are multiple ways to do so, depending on whether you want to label the disk, the slice, the partition, or the filesystem: - glabe; - gpart labels - filesystem labels I have the same issue, a virtual machine rented in some datacenter. I'd like to know a way that is safe, as I did already on another box the glabel way without newfs on the label (but the underlying device). never got problems thought, but I figure this way is better for aditional disks, not / and system slices. thanks, matheus -- We will call you cygnus, The God of balance you shall be A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://en.wikipedia.org/wiki/Posting_style ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Michael Sperber wrote: Marat N.Afanasyevama...@ksu.ru writes: you may try the following commands: sysctl kern.geom.debugflags=16 foreach fs (your-filesystems) glabel label your-$fs-label your-$fs-device end echo geom_label_load=YES /boot/loader.conf reboot and see if the labels appear in /dev/label Is this safe to do? The man page for glabel seems to imply that glabel should be used before newfs, and tunefs after newfs. probably safe, but I didn't try this. there's another option: you may consider to create gmirror device that allows you to shoot two ducks with one arrow: 1) make your system fail-safe 2) all your devices will be in form /dev/mirror/devXsYl regardless of underlying adX-s. to do this all you need is a second hard drive large enough to serve as copy of your boot drive -- SY, Marat
Re: How to predict drive number change for 7.3-8.1 upgrade?
Am 16.09.2010 um 11:05 schrieb Michael Sperber: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? If you have a serial console, you can always enter the root device at the prompt, so you can recover there. If you can figure out the new device name, you can simply change the fstab entry for /; that's where loader picks up the root device that it hands to the kernel. Long-term, the best option is to label your filesystems or partitions, and use the label entries in fstab instead of the device names. I don't remember what 7.3 offers in terms of labels, but glabel should be available. Check tunefs if it offers the -L volname option, that's even better. Stefan -- Stefan Bethke s...@lassitu.de Fon +49 151 14070811 ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
On Thu, Sep 16, 2010 at 11:05:06AM +0200, Michael Sperber wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? This has to do with ATA device naming schemes, and changes in the ATA driver, in addition to capabilities of the chipset. For example, FreeBSD 7.x may have seen only 2 PATA or SATA ports on your system, but with 8.x (and improved drivers) it may see 4, or possibly 2 of each (2 PATA, 2 SATA). The device numbers shift/change as a result. AFAIK, there is no failsafe way to predict what the device numbers will be. I've dealt with this problem many times, and this is how I do it: Print out or copy/paste the contents of /etc/fstab prior to upgrade. If you have serial console on your remote server, then you have little to worry about -- you know what drive name/model/size is associated with ad6 on 7.x. When you upgrade, boot the 8.x kernel and into single-user mode. While the kernel boots, you'll see the device names in the kernel output, and will then be prompted for the root filesystem. Enter the correct ufs reference string with the correct device number. After that, just mount the /usr, /tmp, and /var filesystems by hand using the correct device number. Once you have that, you should be able to edit /etc/fstab and change the device numbers (you might have to do mount -o rw -u / to make it read-writeable). Reboot the machine and go into single-user, and you should find that the root filesystem is mounted + mount -a should work fine + everything work going forward. If you find that the device numbers are changing randomly after every reboot, that's a separate problem and should be dealt with separately. -- | Jeremy Chadwick j...@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
On Thu, Sep 16, 2010 at 4:05 PM, Michael Sperber sper...@deinprogramm.de wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. doesn't 7.3 have ufs label? -- O ascii ribbon campaign - stop html mail - www.asciiribbon.org ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
Michael Sperber wrote: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? you may try to label your slices/labels and mount /dev/label/root instead of /dev/adXsYa see man 8 glabel -- SY, Marat
Re: How to predict drive number change for 7.3-8.1 upgrade?
Stefan Bethke s...@lassitu.de writes: Am 16.09.2010 um 11:05 schrieb Michael Sperber: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? If you have a serial console, you can always enter the root device at the prompt, so you can recover there. I know. But given the serial-console problems recently reported here, I was a bit reluctant to take the risk. Long-term, the best option is to label your filesystems or partitions, and use the label entries in fstab instead of the device names. I don't remember what 7.3 offers in terms of labels, but glabel should be available. Check tunefs if it offers the -L volname option, that's even better. That sounds like a good idea. Thanks! -- Regards, Mike ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: How to predict drive number change for 7.3-8.1 upgrade?
On Thu, Sep 16, 2010 at 11:40:43AM +0200, Michael Sperber wrote: Stefan Bethke s...@lassitu.de writes: Am 16.09.2010 um 11:05 schrieb Michael Sperber: I just upgraded my desktop system from 7.3 to 8.1, and the main hard drive, which was /dev/ad6 before is now /dev/ad10. Consequently, the initial boot failed when trying to mount the root file system from ad6. The desktop system is now fixed, but I also have a rented server with only a serial console, and I worry that the upgrade is going to leave me with a dead machine. Is there any way to predict how the drive number changes? (Why does it change at all?) If so, what's the proper way to tell the system the initial root device *before* rebooting? If you have a serial console, you can always enter the root device at the prompt, so you can recover there. I know. But given the serial-console problems recently reported here, I was a bit reluctant to take the risk. I assume you're referring to the issue reported by Oliver Fromme. That issue may -- not 100% certain at this point -- be related to the DCD line on a serial port being used/honoured by uart(4). We have numerous systems using RELENG_8 with reliable/working serial console, but as I stated in the other thread, our wiring/equipment and adapters differ from Oliver's. I still have not tested the patch Ed provided due to my day (night) job keeping me busy the past 24-48 hours. I'll see if I can get to testing it tonight. The only reason I'm testing the patch, by the way, is to see if *our* stuff suddenly breaks -- and if it does, I can still roll it back remotely (via serial console). Soapbox, for what it's worth: Serial console unreliability and OS installs are both reasons why I rent co-location space that's local to me (within driving distance). I cannot imagine having servers in another state or country which only have serial console (e.g. PXE is not configured in the BIOS, BIOS lacks serial redirection, no remote rebooter/power-cycle unit, no dial-in modem, etc.). Depending on how mission-critical your setup is, I would highly recommend investing the time and money into a setup that does allow access to the servers when serial console breaks -- an KVM-over-IP device would be ideal, since it gives you VGA console via VNC or a Java client. In my case I'm just a single guy with a bunch of servers, and run what I do as a (expensive) hobby. KVM-over-IP devices are unreasonably overpriced (like most enterprise-grade things), and I tend to shy away from HP/Compaq ProLiant hardware (which have LOM/LOM2) since over the years I've seen too many problems with them posted on the FreeBSD lists (mainly relating to storage device driver problems), not to mention the support contract costs... -- | Jeremy Chadwick j...@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org