12f6e
![]() |
|
|
|
|
|||||||
| Installing & Upgrading Installing and upgrading FreeBSD. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I have installed FreeBSD 9 on a HP Microserver. The system has 4 bays which I'll use for data disk and i have moved an operating system disk into the optical bay from which I am booting.
The layout of the disk is that the 4 bays are ada0 to ada3 and the optical drive bay is ada4. I can't change this as this is a BIOS assignment. I can chose to boot from the optical drive bay via the BIOS. So everything boots and works except if I change the configuration of the 4 drive bays, eg take out one disk: If i take out one disk ada4 becomes ada3 so what happens the BSD Boot Loader still boots but it than can't find the root file system because it assumes it's on /dev/ada4p2 (p1 is boot loader) but it's now on /dev/ada3p2. Is there a way that I can tell the boot loader to boot from partition 2 instead of the full path so it wouldn't matter what disk naming the boot disk has? Any other way I could solve this problem? NOTE: Of course I won't constantly swapping disk but i am worried in an event that one disk fails the last thing I need is dealing with a system that won't boot anymore because the boot partition has move to /dev/ada? Thanks for any advise! Last edited by phoenix; August 22nd, 2012 at 00:58. Reason: Please format your posts! |
|
#2
|
||||
|
||||
|
Use glabel to mark partitions/disks with labels or GPT names if You use GPT partitions when working with UFS, or use zpool name when using ZFS.
That way You are nit 'hit' with disk name changes.
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com |
|
#3
|
||||
|
||||
|
+1 on labels. Pick some consistent names, you might want to move some disks to another machine for example.
Code:
root@molly:~# mount /dev/ufs/mollyroot on / (ufs, local) devfs on /dev (devfs, local, multilabel) tmpfs on /tmp (tmpfs, local) procfs on /proc (procfs, local) fdescfs on /dev/fd (fdescfs) /dev/ufs/mollyvar on /var (ufs, local, soft-updates) /dev/ufs/mollyusr on /usr (ufs, local, soft-updates) /dev/ufs/mollyusrhome on /usr/home (ufs, local, soft-updates)
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#4
|
||||
|
||||
|
Besides the +2 on labels I would also recommend that you boot these servers from USB sticks.
We have quite a few of those configures as ZFS storage servers, booting from a UFS USB stick and they work flawlessly.
__________________
Powered by BareBSD |
|
#5
|
||||
|
||||
|
Filesystem labels and GPT labels can be added without repartitioning. glabel(8) generic labels need one block of metadata at the end of the space, requiring partition re-sizing to use correctly.
|
| The Following User Says Thank You to wblock@ For This Useful Post: | ||
gkontos (August 19th, 2012) | ||
|
#6
|
|||
|
|||
|
Quote:
Any impact on performance doing this to a USB stick at 480Mbs? Regarding the labels, that's fine I can do that. Can somebody point me in the right direction what file I need to update to tell FreeBSD to boot from the "label" instead of the physical device? |
|
#7
|
|||
|
|||
|
/etc/fstab
I usually tunefs -L or one of the other ways, boot to single-user, check that the labels are in a subdir in /dev (/dev/ufs, /dev/label, or... mount them manually, then write it to fstab and backup the fstab. Howsoever, I am only usually doing it from experience and not reliably enough to even detail precisely how it is accomplished. |
|
#8
|
||||
|
||||
|
The first link in post #5 shows how to do it with UFS. ZFS should be very similar.
|
|
#9
|
||||
|
||||
|
Quote:
__________________
Powered by BareBSD |
|
#10
|
|||
|
|||
|
I have been playing a bit more and tried PC-BSD. Decided I don't like it but I found it did some interesting thing when installing.
Apparently PC-BSD does that partition labelling automatically on install and it creates a fstab like this: Code:
/dev/label/rootfs0 / /dev/labal/swap0 none /dev/label/var0 /var /dev/label/usr0 /usr Not sure if this is the right place but maybe this is something to consider for the FreeBSD install process as well so hardware changes on the server won't trip over FreeBSD from booting? Last edited by phoenix; August 22nd, 2012 at 01:00. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Preparing 7.2 USB boot disk with Mac OS X Disk Utility | DirtyGerman | Installing & Upgrading | 8 | November 7th, 2011 12:00 |
| [Solved] After formating a sata disk, all disk names change from /dev/ad0# to /dev/ad#p1 | bbmak0 | General | 12 | October 24th, 2011 18:14 |
| ZFS: Adding disk and changing to RAIDZ2 | bsus | General | 6 | July 5th, 2011 16:56 |
| [Solved] ahci disk device names | Ghirai | System Hardware | 7 | July 10th, 2010 18:52 |
| Please HELP! made mistake in boot.config | Just_Johnny | General | 2 | June 13th, 2010 00:51 |