UFS trying to merge to a raid system

OP
OP
tony33

tony33

Member

Reaction score: 2
Messages: 92

Is there only online resources to walk me thru?

I just did gpart destory da1 and it deleted the drive.

i then did

Code:
gpart create -s  mbr da1

gpart bootcode -b /boot/mbr da1

gpart add -t freebsd       da1
gpart set -a active -i 1  da1

gpart create -s bsd da0s1

gpart bootcode  -b     /boot/boot da1s1
da1 is the single new drive. however, i can see the files i had on it before they came back.
if i mount the drive to a folder i can see the files are still there from last time.

I do a shtudown -p now and then take the old drive out and put the new drive in the first slot.

i started the server and again no boot device detected.

i shut down the darn thing and put the old drive back and the new one in the 2nd slot.

i boot back into the os and now waiting on what to do next.

I need material to read online on how i can make the new drive bootable and how I can copy over the old drive to the new drive.

as of now t he new drive still isn't bootable.
 

VladiBG

Aspiring Daemon

Reaction score: 237
Messages: 587

you can't use MBR on drives bigger than 2TB (2^32 × 512 bytes)
 

Wozzeck.Live

Member

Reaction score: 99
Messages: 71

# tunefs -j disable /
People should know that alternate gjournal is more reliable that UFS Journaling, and is fully compatible with UFS snapshot, so no need to deactivate it to dump or restore. So one can use sysutils/freebsd-snapshot, to automatically manage and create snaphots for both UFS+gjournal and ZFS

I just don't understand why people insist to use this UFS Journaling, which is a real b...shit, since gjournal has many advantages. It is just a little slower but 1000% more reliable than UFS Journaling. I have lost in the past two complete systems and various USB drives following some failures with UFS journaling, with Gjournal I have never lost any filesystem.... all systems have always been recoverable even following severe failures.

Morevover, deactivating journal may be dangerous if the journal hasn't been flushed before... so this is another reason to prefer gjournal, because no need to deactivate it.
 

VladiBG

Aspiring Daemon

Reaction score: 237
Messages: 587

Backup your data, format the disk using gpt and restore your data.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,371
Messages: 29,907

Code:
gpart create -s mbr da1 
gpart bootcode -b /boot/mbr da1 
gpart add -t freebsd da1 
gpart set -a active -i 1 da1 
gpart create -s bsd da0s1
You forgot to create the freebsd-ufs partition inside the BSD slice. And you're mixing da0 and da1. Be super careful with mixing those up as you're likely to destroy existing data on another disk.
Code:
gpart create -s mbr da1
gpart add -t freebsd da1
gpart create -s bsd da1s1
gpart add -t freebsd-ufs da1s1
newfs /dev/da1s1a
# making it bootable:
gpart set -a active -i 1 da1
gpart bootcode -b /boot/boot0 da1
gpart bootcode -b /boot/boot da1s1
Look at the examples at the bottom of gpart(8). It tells you exactly what to do:
Code:
   MBR
     In this example, we will format ada0 with the MBR scheme and create a
     single partition which we subdivide using a traditional BSD disklabel.
{...}
 
OP
OP
tony33

tony33

Member

Reaction score: 2
Messages: 92

I figured it out... had to config my raid contoller when I add more than one hard drive. the raid bios had to be config.

I just need to know how to update. I found out my server supports MBR only. I tried using GPT in a zfs file system and it kept failing trying to boot into freebsd. like it would boot but would always ask me for the exact path to kernal. i can manually type it in and it would work and boot to os but will have many errors failing to find key files.
I was able to only get a bootable system using MBR zfs setup in a raid 1 system.

Now, I have the original drive and I will first do a dump backup of the slice / partician . I will also backup all the files and put both the dump images and backupfiles in an external usb hard drive.

I already install freebsd 12 on the new drives but I am confused how I can transfer the files t o the new system?

I want the system to still use the old users and permissions and the actual files. I don't want to have to install stuff and then config stuff back to how it used to be because it took me years. I mean I have a firewall setup to block ip's that have been ddosing me for 5 years. I need have that filewall setup perfectly and have a file filled with a list of ip blocks to block. I haven't been doodling with that for a while so now I forgot how to use ipfw and It's just before to just copy the files over and copy the config files over.

The problem with this is that it will take a long time for me to know what files I would need to transfer over. I would like to just transfer all files including the os to overwrite them. The reason for this is I don't know what files hold the user names and passwords and groups and permission.

Oh and before the hard drives It was working. It just that I needed to config the raid bios. I just want to know if there's a way I can copyover all the file s from the old hard drive to the new ones is it really worth to go the zfs route? my board doesn't support gpt i mean system uses old bios system. I just want to transfer all the files from old drive to the new one and have it acting the same as the old system? i don't want to have to go in and config and setup things again.
 
Top