UFS How to migrate installed FreeBSD from HDD to SSD?

gpw928 That's true.
Your new SSD is half the size of your original boot disk. How much free space do you have on your existing system disk? You must have at least ~500GB free...
I have about 420 GB of free memory in the main HDD. But there's no problem. My external HDD is 1TB and most of it is free. I'll transfer additional files on it.


sudo camcontrol devlist
Code:
<Samsung SSD 870 EVO 500GB SVT01B6Q>  at scbus0 target 0 lun 0 (pass0,ada0)
<Hitachi HUA722010CLA331 JP4OA3NH>  at scbus1 target 0 lun 0 (pass1,ada1)
<AHCI SGPIO Enclosure 2.00 0001>   at scbus2 target 0 lun 0 (pass2,ses0)
<Seagate FreeAgent GoFlex 210>     at scbus3 target 0 lun 0 (da0,pass3)

Code:
sudo camcontrol identify ada0

Code:
pass0: <Samsung SSD 870 EVO 500GB SVT01B6Q> ACS-4 ATA SATA 3.x device
pass0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)

protocol              ACS-4 ATA SATA 3.x
device model          Samsung SSD 870 EVO 500GB
firmware revision     SVT01B6Q
serial number         S6PYNF0RB14051E
WWN                   5002538f41b16d58
additional product id         
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         268435455 sectors
LBA48 supported       976773168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6
media RPM             non-rotating
Zoned-Device Commands no

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes    yes
write cache                    yes    yes
flush cache                    yes    yes
Native Command Queuing (NCQ)   yes        32 tags
NCQ Priority Information       no
NCQ Non-Data Command           no
NCQ Streaming                  no
Receive & Send FPDMA Queued    yes
NCQ Autosense                  no
SMART                          yes    yes
security                       yes    no
power management               yes    yes
microcode download             yes    yes
advanced power management      no    no
automatic acoustic management  no    no
media status notification      no    no
power-up in Standby            no    no
write-read-verify              yes    no    0/0x0
unload                         no    no
general purpose logging        yes    yes
free-fall                      no    no
sense data reporting           no    no
extended power conditions      no    no
device statistics notification no    no
Data Set Management (DSM/TRIM) yes
DSM - max 512byte blocks       yes              8
DSM - deterministic read       yes              zeroed
Trusted Computing              yes
encrypts all user data         yes
Sanitize                       no
Host Protected Area (HPA)      yes      no      976773168/976773168
HPA - Security                 yes      no
Accessible Max Address Config  no
 
Beastie7 I exactly did what you did and and only one folder called .snap has been created in /mnt that that there's nothing in it.
Please see log:
Code:
hbsd@freebsd:~ $ sudo su
Password:
[root@freebsd /usr/home/hbsd]# gpart create -s GPT ada0
ada0 created
[root@freebsd /usr/home/hbsd]# gpart add -t freebsd-ufs -a 1M ada0
ada0p1 added
[root@freebsd /usr/home/hbsd]# newfs -U /dev/ada0
/dev/ada0: 476940.0MB (976773168 sectors) block size 32768, fragment size 4096
    using 763 cylinder groups of 625.22MB, 20007 blks, 80128 inodes.
    with soft updates
super-block backups (for fsck_ffs -b #) at:
 192, 1280640, 2561088, 3841536, 5121984, 6402432, 7682880, 8963328, 10243776, 11524224,
 12804672, 14085120, 15365568, 16646016, 17926464, 19206912, 20487360, 21767808, 23048256,
 24328704, 25609152, 26889600, 28170048, 29450496, 30730944, 32011392, 33291840, 34572288,
 35852736, 37133184, 38413632, 39694080, 40974528, 42254976, 43535424, 44815872, 46096320,
 47376768, 48657216, 49937664, 51218112, 52498560, 53779008, 55059456, 56339904, 57620352,
 58900800, 60181248, 61461696, 62742144, 64022592, 65303040, 66583488, 67863936, 69144384,
 70424832, 71705280, 72985728, 74266176, 75546624, 76827072, 78107520, 79387968, 80668416,
 81948864, 83229312, 84509760, 85790208, 87070656, 88351104, 89631552, 90912000, 92192448,
 93472896, 94753344, 96033792, 97314240, 98594688, 99875136, 101155584, 102436032,
 103716480, 104996928, 106277376, 107557824, 108838272, 110118720, 111399168, 112679616,
 113960064, 115240512, 116520960, 117801408, 119081856, 120362304, 121642752, 122923200,
 124203648, 125484096, 126764544, 128044992, 129325440, 130605888, 131886336, 133166784,
 134447232, 135727680, 137008128, 138288576, 139569024, 140849472, 142129920, 143410368,
 144690816, 145971264, 147251712, 148532160, 149812608, 151093056, 152373504, 153653952,
 154934400, 156214848, 157495296, 158775744, 160056192, 161336640, 162617088, 163897536,
 165177984, 166458432, 167738880, 169019328, 170299776, 171580224, 172860672, 174141120,
 175421568, 176702016, 177982464, 179262912, 180543360, 181823808, 183104256, 184384704,
 185665152, 186945600, 188226048, 189506496, 190786944, 192067392, 193347840, 194628288,
 195908736, 197189184, 198469632, 199750080, 201030528, 202310976, 203591424, 204871872,
 206152320, 207432768, 208713216, 209993664, 211274112, 212554560, 213835008, 215115456,
 216395904, 217676352, 218956800, 220237248, 221517696, 222798144, 224078592, 225359040,
 226639488, 227919936, 229200384, 230480832, 231761280, 233041728, 234322176, 235602624,
 236883072, 238163520, 239443968, 240724416, 242004864, 243285312, 244565760, 245846208,
 247126656, 248407104, 249687552, 250968000, 252248448, 253528896, 254809344, 256089792,
 257370240, 258650688, 259931136, 261211584, 262492032, 263772480, 265052928, 266333376,
 267613824, 268894272, 270174720, 271455168, 272735616, 274016064, 275296512, 276576960,
 277857408, 279137856, 280418304, 281698752, 282979200, 284259648, 285540096, 286820544,
 288100992, 289381440, 290661888, 291942336, 293222784, 294503232, 295783680, 297064128,
 298344576, 299625024, 300905472, 302185920, 303466368, 304746816, 306027264, 307307712,
 308588160, 309868608, 311149056, 312429504, 313709952, 314990400, 316270848, 317551296,
 318831744, 320112192, 321392640, 322673088, 323953536, 325233984, 326514432, 327794880,
 329075328, 330355776, 331636224, 332916672, 334197120, 335477568, 336758016, 338038464,
 339318912, 340599360, 341879808, 343160256, 344440704, 345721152, 347001600, 348282048,
 349562496, 350842944, 352123392, 353403840, 354684288, 355964736, 357245184, 358525632,
 359806080, 361086528, 362366976, 363647424, 364927872, 366208320, 367488768, 368769216,
 370049664, 371330112, 372610560, 373891008, 375171456, 376451904, 377732352, 379012800,
 380293248, 381573696, 382854144, 384134592, 385415040, 386695488, 387975936, 389256384,
 390536832, 391817280, 393097728, 394378176, 395658624, 396939072, 398219520, 399499968,
 400780416, 402060864, 403341312, 404621760, 405902208, 407182656, 408463104, 409743552,
 411024000, 412304448, 413584896, 414865344, 416145792, 417426240, 418706688, 419987136,
 421267584, 422548032, 423828480, 425108928, 426389376, 427669824, 428950272, 430230720,
 431511168, 432791616, 434072064, 435352512, 436632960, 437913408, 439193856, 440474304,
 441754752, 443035200, 444315648, 445596096, 446876544, 448156992, 449437440, 450717888,
 451998336, 453278784, 454559232, 455839680, 457120128, 458400576, 459681024, 460961472,
 462241920, 463522368, 464802816, 466083264, 467363712, 468644160, 469924608, 471205056,
 472485504, 473765952, 475046400, 476326848, 477607296, 478887744, 480168192, 481448640,
 482729088, 484009536, 485289984, 486570432, 487850880, 489131328, 490411776, 491692224,
 492972672, 494253120, 495533568, 496814016, 498094464, 499374912, 500655360, 501935808,
 503216256, 504496704, 505777152, 507057600, 508338048, 509618496, 510898944, 512179392,
 513459840, 514740288, 516020736, 517301184, 518581632, 519862080, 521142528, 522422976,
 523703424, 524983872, 526264320, 527544768, 528825216, 530105664, 531386112, 532666560,
 533947008, 535227456, 536507904, 537788352, 539068800, 540349248, 541629696, 542910144,
 544190592, 545471040, 546751488, 548031936, 549312384, 550592832, 551873280, 553153728,
 554434176, 555714624, 556995072, 558275520, 559555968, 560836416, 562116864, 563397312,
 564677760, 565958208, 567238656, 568519104, 569799552, 571080000, 572360448, 573640896,
 574921344, 576201792, 577482240, 578762688, 580043136, 581323584, 582604032, 583884480,
 585164928, 586445376, 587725824, 589006272, 590286720, 591567168, 592847616, 594128064,
 595408512, 596688960, 597969408, 599249856, 600530304, 601810752, 603091200, 604371648,
 605652096, 606932544, 608212992, 609493440, 610773888, 612054336, 613334784, 614615232,
 615895680, 617176128, 618456576, 619737024, 621017472, 622297920, 623578368, 624858816,
 626139264, 627419712, 628700160, 629980608, 631261056, 632541504, 633821952, 635102400,
 636382848, 637663296, 638943744, 640224192, 641504640, 642785088, 644065536, 645345984,
 646626432, 647906880, 649187328, 650467776, 651748224, 653028672, 654309120, 655589568,
 656870016, 658150464, 659430912, 660711360, 661991808, 663272256, 664552704, 665833152,
 667113600, 668394048, 669674496, 670954944, 672235392, 673515840, 674796288, 676076736,
 677357184, 678637632, 679918080, 681198528, 682478976, 683759424, 685039872, 686320320,
 687600768, 688881216, 690161664, 691442112, 692722560, 694003008, 695283456, 696563904,
 697844352, 699124800, 700405248, 701685696, 702966144, 704246592, 705527040, 706807488,
 708087936, 709368384, 710648832, 711929280, 713209728, 714490176, 715770624, 717051072,
 718331520, 719611968, 720892416, 722172864, 723453312, 724733760, 726014208, 727294656,
 728575104, 729855552, 731136000, 732416448, 733696896, 734977344, 736257792, 737538240,
 738818688, 740099136, 741379584, 742660032, 743940480, 745220928, 746501376, 747781824,
 749062272, 750342720, 751623168, 752903616, 754184064, 755464512, 756744960, 758025408,
 759305856, 760586304, 761866752, 763147200, 764427648, 765708096, 766988544, 768268992,
 769549440, 770829888, 772110336, 773390784, 774671232, 775951680, 777232128, 778512576,
 779793024, 781073472, 782353920, 783634368, 784914816, 786195264, 787475712, 788756160,
 790036608, 791317056, 792597504, 793877952, 795158400, 796438848, 797719296, 798999744,
 800280192, 801560640, 802841088, 804121536, 805401984, 806682432, 807962880, 809243328,
 810523776, 811804224, 813084672, 814365120, 815645568, 816926016, 818206464, 819486912,
 820767360, 822047808, 823328256, 824608704, 825889152, 827169600, 828450048, 829730496,
 831010944, 832291392, 833571840, 834852288, 836132736, 837413184, 838693632, 839974080,
 841254528, 842534976, 843815424, 845095872, 846376320, 847656768, 848937216, 850217664,
 851498112, 852778560, 854059008, 855339456, 856619904, 857900352, 859180800, 860461248,
 861741696, 863022144, 864302592, 865583040, 866863488, 868143936, 869424384, 870704832,
 871985280, 873265728, 874546176, 875826624, 877107072, 878387520, 879667968, 880948416,
 882228864, 883509312, 884789760, 886070208, 887350656, 888631104, 889911552, 891192000,
 892472448, 893752896, 895033344, 896313792, 897594240, 898874688, 900155136, 901435584,
 902716032, 903996480, 905276928, 906557376, 907837824, 909118272, 910398720, 911679168,
 912959616, 914240064, 915520512, 916800960, 918081408, 919361856, 920642304, 921922752,
 923203200, 924483648, 925764096, 927044544, 928324992, 929605440, 930885888, 932166336,
 933446784, 934727232, 936007680, 937288128, 938568576, 939849024, 941129472, 942409920,
 943690368, 944970816, 946251264, 947531712, 948812160, 950092608, 951373056, 952653504,
 953933952, 955214400, 956494848, 957775296, 959055744, 960336192, 961616640, 962897088,
 964177536, 965457984, 966738432, 968018880, 969299328, 970579776, 971860224, 973140672,
 974421120, 975701568
[root@freebsd /usr/home/hbsd]# mount /dev/ada0 /mnt

the .snap is your snapshot directory dump uses to store a live file system before dumping it. it dumps the snapshot.

try gpart list, and read what it says. if it's properly partition and formatted. fire up a basic file manager and do the rest.

if it didn't mount, try phishfrys suggestion with the appropriate slice included.
 
gpart list
Code:
gpart list
Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 1953525167
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: ada1s1
   Mediasize: 1000204853248 (932G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32768
   Mode: r1w1e2
   efimedia: HD(1,MBR,0x90909090,0x40,0x74706d70)
   attrib: active
   rawtype: 165
   length: 1000204853248
   offset: 32768
   type: freebsd
   index: 1
   end: 1953525167
   start: 64
Consumers:
1. Name: ada1
   Mediasize: 1000204886016 (932G)
   Sectorsize: 512
   Mode: r1w1e3

Geom name: ada1s1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 1953525103
first: 0
entries: 8
scheme: BSD
Providers:
1. Name: ada1s1a
   Mediasize: 996432412672 (928G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32768
   Mode: r1w1e1
   rawtype: 7
   length: 996432412672
   offset: 0
   type: freebsd-ufs
   index: 1
   end: 1946157055
   start: 0
2. Name: ada1s1b
   Mediasize: 3772440576 (3.5G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 996432445440
   Mode: r0w0e0
   rawtype: 1
   length: 3772440576
   offset: 996432412672
   type: freebsd-swap
   index: 2
   end: 1953525103
   start: 1946157056
Consumers:
1. Name: ada1s1
   Mediasize: 1000204853248 (932G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 32768
   Mode: r1w1e2

Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 1953525166
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: da0s1
   Mediasize: 1000203836928 (932G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r1w1e1
   efimedia: HD(1,MBR,0xca7ac819,0x800,0x747065af)
   rawtype: 165
   length: 1000203836928
   offset: 1048576
   type: freebsd
   index: 1
   end: 1953525166
   start: 2048
Consumers:
1. Name: da0
   Mediasize: 1000204885504 (932G)
   Sectorsize: 512
   Mode: r1w1e2
 
My belief is that ada1s1a is a system partition or unused.
ada1s1b may contain your files.

So unmount 'a' and try this:
umount /mnt
mount /dev/ada1s1b /mnt
 
Unless they'd like to be promoted to Colonel Data Corruption; I wouldn't touch a running system drive. I thought the objective was to dump ada1 to ada0, then boot from ada0.
 
I sure don't see the advantage of an empty 928GB 'a' partition and a 3.5TB 'b' partition.
On new drive I would correct that.
Small system partition and rest OS.
 
There's a file system been placed directly on ada0. See the posting from Today at 11:26 AM.

hbsd, you need to stop taking little bits of advice from all quarters, sit down, and make a written plan to:
  1. decide on the partition method;
  2. create the partitions and file systems on the SSD;
  3. install the required boot block(s) on the SSD;
  4. copy some data to your external drive;
  5. copy the remaining data to your SSD;
  6. modify /etc/fstab on the SSD to reflect the new boot device;
  7. modify the BIOS boot order.
When you have a plan for all that, bring it back for comment before you take any more actions...

I have provided most of the references you need to read and understand in my last posting.

 
There is already a very nice instruction here on the forum how to do this. It's from Vigole and I put this to a test a while
ago. I wanted to move a FreeBSD UFS installation to a new computer and it works very good.

Here the link: https://forums.freebsd.org/threads/...oot-from-it-if-my-current-system-fails.76474/

Just follow the instructions from vigole it's the second entry and backup your current system. When done put the new ssd in and install a new system as normal. When done make a copy of /etc/fstab
and than restore your data and settings to the new ssd. Takes a while but it's easy to do.
When done restore the /etc/fstab file. Reboot and all should be good and much faster on the ssd.
 
Phishfry
gpart show -p ada1
Code:
$ gpart show -p ada1

=>        63  1953525105    ada1  MBR  (932G)
          63           1          - free -  (512B)
          64  1953525104  ada1s1  freebsd  [active]  (932G)

gpart show -p ada1s1
Code:
$ gpart show -p ada1s1

=>         0  1953525104   ada1s1  BSD  (932G)
           0  1946157056  ada1s1a  freebsd-ufs  (928G)
  1946157056     7368048  ada1s1b  freebsd-swap  (3.5G)

umount /mnt
mount /dev/ada1s1b /mnt
Code:
umount: /mnt: not a file system root directory
mount: /dev/ada1s1b: No such file or directory
 
I really don't know how to thank you guys. Once again, I will do the steps from the beginning and read each and every comment of this post again and I'll inform the result. Sorry to bother, my friends....
 
I finally mounted SSD with mbr file system! I used Absolute FreeBSD, 3rd Edition: The Complete Guide to FreeBSD book to do this. It's a amazing book. In other words, it's like the newer FreeBSD handbook. as you can ada0 is my ssd drive. I will transfer the files to SSD later. Thank you so much again for helping me out...

2022-03-09-151011_1024x768_scrot.png
 
Back
Top