FreeBSD: Neue Festplatte hinzufügen
Hier beschreibe ich, wie man eine neue Festplatte im System verfügbar machen kann. Falls Du daran interessiert bist, eine Festplattenpartition grösser zu machen, habe ich hier einen separaten Artikel dafür geschrieben.
Installation unter FreeBSD >= 10
Ab FreeBSD 10 wurde sysinstall
durch bsdconfig
ersetzt. Als Partition Editor wird sade
per Default benutzt. Das kann man gleich direkt aufrufen:
sade
Jetzt die neue Disk auswählen – in dem Fall ist es vtbd4 und danach Create:
lqqqqqqqqqqqqqqqqqqPartition Editorqqqqqqqqqqqqqqqqqqqqk x Create partitions for FreeBSD. No changes will be x x made until you select Finish. x xlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq^(-)kx xx vtbd2s2d 1.0 GB freebsd-ufs xx xxvtbd3 100 GB MBR xx xx vtbd3s1 100 GB BSD xx xx vtbd3s1d 100 GB freebsd-ufs xx xxvtbd4 150 GB xx xx xx xx xx xx xx xmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjx x<Create> <Delete> <Modify> <Revert> < Auto > <Finish> x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
Nun Partition Schema wählen, ich nehme hier BSD (was du bereits auf deinem System für die anderen Disks verwendest, kannst du mit gpart show
anzeigen lassen)
lqqqqqqqqqqqqPartition Schemeqqqqqqqqqqqqqqqk x Select a partition scheme for this x x volume: x x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x x x APM Apple Partition Map x x x x BSD BSD Labels x x x x GPT GUID Partition Table x x x x MBR DOS Partitions x x x x PC98 NEC PC9801 Partition Table x x x x VTOC8 Sun VTOC8 Partition Table x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
Jetzt sind wir wieder zurück im Partition Editor. Hier nochmals Create / Type, Grösse und Mountpoint angeben.
qqqqqqqqqqAdd Partitionqqqqqqqqqqqqkq lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x x x x Type: freebsd-ufs x x x x Size: 150GB x x x x Mountpoint: /backup_new x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x x x tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu x < OK > <Options> <Cancel > x
xmqqqqqqqmqqqqqqqqqqqqqqqqqqqqqqqqqqq
Mit OK Bestätigen, danach mit Finish -> Commit abschliessen.
Bei mir ist hier noch ein Fehler „no space left on Device“ gekommen, hab es dann einfach nochmal versucht, beim zweiten Mal hat es dann geklappt.
sade
hat in /etc/fstab
den Eintrag bereits gemacht:
/dev/vtbd4a /backup_new ufs rw 2 2
somt können wir die Disk jetzt einfach noch mit
mkdir /backup_new
mount -a
mounten.
.
Installation unter FreeBSD < 10
Als erstes Festplatte einbauen, danach sysinstall starten:
Fdisk
sysinstall
Dort gehen wir nach
Configure -> Fdisk
Nun die neue Disk auswählen. Ist in meinem Fall die vtbd3
lqqqqqqqqqqqqqqqqqqqqqqqqqq Select Drive(s) qqqqqqqqqqqqqqqqqqqqqqqqqqk x Please select the drive, or drives, on which you wish to perform x x this operation. If you are attempting to install a boot partition x x on a drive other than the first one or have multiple operating x x systems on your machine, you will have the option to install a boot x x manager later. To select a drive, use the arrow keys to move to it x x and press [SPACE] or [ENTER]. To de-select it, press it again. x x x x Use [TAB] to get to the buttons and leave this menu. x x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x x x [ ] vtbd0 vtbd0 x x x x [ ] vtbd1 vtbd1 x x x x [ ] vtbd2 vtbd2 x x x x [X] vtbd3 vtbd3 x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu x [ OK ] Cancel x mqqq[ Press F1 for important information regarding disk geometry! ]qqqj
Dann normal partitionieren. Ich will die ganze Disk verwenden – somit
A -> für Use entire Disk
danach
W um die Änderungen zu speichern und Q um zu beenden.
nun sysinstall komplett beenden und neustarten für um danach mit disklabel arbeiten zu können.
Label
sysinstall
hier gehen wir nun nach
Configure -> Label
Wieder die Disk auswählen
C für Create -> Size -> FS -> mountpoint (z.b. /database2)
W um zu speichern dann raus mit Q und sysinstall beenden.
Die neue Disk ist jetzt verfügbar:
df
/dev/vtbd3s1d 20307084 8 18682512 0% /database2
fstab
Jetzt nur noch in fstab eintragen
vi /etc/fstab
/dev/vtbd3s1d /database ufs rw 2 2
Fertig! Jetzt wird die Disk auch beim Systemstart neu gemounted.