Re: Moving to a larger disk
- In reply to: Odhiambo Washington : "Re: Moving to a larger disk"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 21 May 2023 12:27:14 UTC
On 5/20/23 23:07, Odhiambo Washington wrote: > On Sun, May 21, 2023 at 5:35 AM David Christensen wrote: >> On 5/20/23 01:16, Odhiambo Washington wrote: >>> On Sat, May 20, 2023 at 2:55 AM David Christensen wrote: >>>> On 5/19/23 00:39, Odhiambo Washington wrote: >>>>> It's been years since I ever did this so allow me to post so that I can >>>>> gather ideas - newer ideas :) >>>>> >>>>> I have a 1TB disk, with UFS fs. >>>>> I'd like to migrate to a 2TB SSD and retire/repurpose the 1TB disk. >>>>> >>>>> ``` >>>>> [10:27 ~ ]$ df -h >>>>> Filesystem Size Used Avail Capacity Mounted on >>>>> /dev/ada0p2 899G 269G 558G 33% / >>>>> devfs 1.0K 1.0K 0B 100% /dev >>>>> fdescfs 1.0K 1.0K 0B 100% /dev/fd >>>>> procfs 4.0K 4.0K 0B 100% /proc >>>>> linprocfs 4.0K 4.0K 0B 100% /compat/linux/proc >>>>> linsysfs 4.0K 4.0K 0B 100% /compat/linux/sys >>>>> tmpfs 7.0G 4.0K 7.0G 0% /compat/linux/dev/shm >>>>> devfs 1.0K 1.0K 0B 100% /compat/linux/dev >>>>> fdescfs 1.0K 1.0K 0B 100% /compat/linux/dev/fd >>>>> ``` >>>>> >>>>> What is the easiest/best method to migrate? >>>> What is the purpose of the computer? What environment(s)? >>>> >>>> >>>> What is the make, model, and/or part number of your computer? What CPU? >>>> What memory? What storage devices are installed? What storage >> device >>>> bays and interface ports are available? >>>> >>>> >>>> Please run the following commands and copy/paste console session into >>>> reply: >>>> >>>> # freebsd-version ; uname -a >>>> >>>> # geom disk list | perl -pe 's/(lunid|ident): (.+)/$1: ********/' >>>> >>>> # geom part show -p >>>> >>>> >>>> Please tell us about your sysadmin and disaster planning -- e.g. version >>>> control, configuration management, images, backups, archives? Media? > I currently have two 1TB disks mounted as primary and secondary. Every > Saturday I would clone the primary disk onto the second disk with the > following: > clone -d -y / /disk2 > I also have an external disk which is a replica of the primary disk and > which is where I make backups using rsync. I will assume that your computer is not a laptop, you do not take it remote, has a wired network connection, and your OS, applications, and live data are all on the primary 1 TB HDD. > Having said that, I use UFS fs. Okay. > 1root@gw:/usr/home/wash # uname -a > FreeBSD gw.mydomain.name 13.2-RELEASE FreeBSD 13.2-RELEASE > releng/13.2-n254617-525ecfdad597 GENERIC amd64 Okay. > [09:03 ~ ]$ geom disk list | perl -pe 's/(lunid|ident): (.+)/$1: > ********/' # Taken when only one disk is connected internally, and another > via USB3 port while running 'cloning' > Geom name: ada0 > Providers: > 1. Name: ada0 > Mediasize: 1000204886016 (932G) > Sectorsize: 512 > Mode: r2w2e3 > descr: Hitachi HDS721010CLA630 > lunid: ******** > ident: ******** > rotationrate: 7200 > fwsectors: 63 > fwheads: 16 > > Geom name: cd0 > Providers: > 1. Name: cd0 > Mediasize: 0 (0B) > Sectorsize: 2048 > Mode: r0w0e0 > descr: hp DVD D DH16D7SH > ident: ******** > rotationrate: unknown > fwsectors: 0 > fwheads: 0 > > Geom name: da0 > Providers: > 1. Name: da0 > Mediasize: 2000398934016 (1.8T) > Sectorsize: 512 > Mode: r1w1e2 > descr: Samsung SSD 870 EVO 2TB > lunid: ******** > ident: ******** > rotationrate: 0 > fwsectors: 63 > fwheads: 255 Okay. > [09:03 ~ ]$ geom part show -p > => 40 1953525088 ada0 GPT (932G) > 40 409600 ada0p1 efi (200M) > 409640 1945747456 ada0p2 freebsd-ufs (928G) > 1946157096 7368032 ada0p3 freebsd-swap (3.5G) > > => 40 3907029088 da0 GPT (1.8T) > 40 532480 da0p1 efi (260M) > 532520 3900170240 da0p2 freebsd-ufs (1.8T) > 3900702760 6326272 da0p3 freebsd-swap (3.0G) > 3907029032 96 - free - (48K) I will assume you used the FreeBSD installer to build both disks. > As for the last question, I have already answered it. I have a SOHO environment with one primary FreeBSD server (ZFS, Samba, CVS) and various Windows, macOS, iOS, nad Linux clients. I use rsync(1) to back up files and directories. I use dd(1) to take images. I burn archives to DVD-R discs. I expect clone(1) produces the same result as rsync(1), but without the differential transfer feature (rsync(1) can do the same when given the right options): https://man.freebsd.org/cgi/man.cgi?clone When using rsync(1) for backups, it is critical that the files being backed up not be open when the backup starts and not be modified during the transfer; or the backup copy could be useless. rsync(1) works in my environment because I can control access. To make a correct copy of a system disk, I shut down the system, boot alternate media (a live Linux USB stick), and use a dd(1) and gzip(1) pipe to copy raw blocks to a compressed file on an external HDD. Alternatives include Clonezilla and commercial imaging tools. These can add useful features, such as resizing partitions, resizing file systems, and relocating GPT backup partition tables. I am only starting to understand issues related to UEFI Setup/ CMOS/ NVRAM boot device variables. Does your computer support booting in BIOS/ MBR/ compatibility mode? This is simpler, as it avoids the GPT backup partition table and NVRAM issues. Is it your intent to replace the primary Hitachi HDS721010CLA630 with the Samsung SSD 870 EVO 2TB? Would you consider using a small, fast SSD for the OS, apps, and home directory, and moving as much data as possible to an NAS or file server? This works well in my environment. It encourages me to create system disk images monthly and allows me to retain a multiple images for every machine. You could put the two 1 TB HDD's into the NAS as a ZFS mirror, and use the 2 TB SSD with an eSATA/SATA or USB/SATA adapter cable for images. It would be good to buy a pair of multi-TB USB HDD's for backups, and rotate them on-site and off-site. Would you consider doing a fresh install and migrating configuration files and data? David