UFS gmirror raid1 + bare bsdlabel (no mbr)

Dolence

New Member


Messages: 13

Hello!

I'm trying to follow handbook instructions (chapter 18.3.3) on setting up a software RAID1 between an existing installation on SSD da6 to a same model/capacity SSD da7. Actually, da6 is using bare BSD Label partition scheme without MBR (I know, I know...). What I did so far:

Code:
# sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16


# diskinfo -v da6 | head -n3
da6
        512             # sectorsize
        120034123776    # mediasize in bytes (112G)

# geom zero load

# gnop create -s 120034123776 gzero

 # gmirror label -v gm0 gzero.nop da7
Metadata value stored on gzero.nop.
Metadata value stored on da7.
Done.

# gmirror forget gm0

# gpart show da6
=>        0  234441648  da6  BSD  (112G)
          0  226492416    1  freebsd-ufs  (108G)
  226492416    7949231    2  freebsd-swap  (3.8G)
  234441647          1       - free -  (512B)
I'm a little confused about how to proceed from this point. I'm not sure how I should do the partitions backup/restore since my partition scheme differs from the guide.

Any help would be very appreciated. Thanks in advance!
 
OP
OP
Dolence

Dolence

New Member


Messages: 13

Now I understand why it's called "dangerously dedicated" layout. Is there any way to do this keeping this layout or maybe converting it to MBR without data loss?
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,643
Messages: 13,850

No, sorry. Backup, repartition, restore.
 
OP
OP
Dolence

Dolence

New Member


Messages: 13

No, sorry. Backup, repartition, restore.
Thanks for your fast response, wblock!

I managed to backup, reinstall the system, restore. Following the instructions now I'm stuck with this error when trying the dump/restore procedure:

Code:
# mount /dev/mirror/gm0s1a /mnt
# dump -C16 -b64 -0aL -f - /    | (cd /mnt && restore -rf -)
mksnap_ffs: Cannot create snapshot //.snap/dump_snapshot: /: Snapshots are not yet supported when running with journaled soft updates: Operation not supported
dump: Cannot create //.snap/dump_snapshot: No such file or directory

Tape is not a dump tape
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,643
Messages: 13,850

Use tunefs(8) to disable Soft Updates Journaling on that filesystem. This has to be done when it is not mounted:
tunefs -j disable /dev/mirror/gm0s1a

Since there is no data on that filesystem, you can just reformat it. The Handbook instructions use newfs -U to avoid SUJ.
 
OP
OP
Dolence

Dolence

New Member


Messages: 13

wblock@, I did the format process using newfs -U as per instructions. May it be because I used -t switch together to enable trim, since it's a SSD? I need to enable trim on disks and mirror/gm0 or just on the disks? What's the best practice in this case? Thanks again!
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,643
Messages: 13,850

I don't understand the question. -U is for soft updates, which is fine. The journaling part is only enabled if -j is added. I don't use SUJ, and don't recommend it.

That has nothing to do with trim. Trim is a UFS property, so it can only be enabled on a UFS filesystem, not on the mirror device.
 
Top