# Size after install of new system disk



## Crotalus (Sep 9, 2020)

My system disk started to throw read errors so I created a new disk using `dd`. I had a 250GB HD which I replaced with a 500GB SSD, the smallest that I could find locally. The new drive is twice the size of the old drive. I followed the instruction in the "Handbook" from section 17.3. There is a difference in the report size using `gpart show` and `df -H`.  The `df` is the size of the old drive at 238GB.


```
root@Phaedra:/ # gpart show /dev/ada1
=>       40  976773088  ada1  GPT  (466G)
         40       1024     1  freebsd-boot  (512K)
       1064  966787072     2  freebsd-ufs  (461G)
  966788136    9984992     3  freebsd-swap  (4.8G)

root@Phaedra:/ #
```
 and

```
root@Phaedra:/ # df -H
Filesystem                    Size    Used   Avail Capacity  Mounted on
/dev/ada1p2                   238G     70G    149G    32%    /
devfs                         1.0k    1.0k      0B   100%    /dev
/dev/ada4p1                   3.9T    1.1T    2.5T    30%    /storage1
/dev/ada5s1                   484G     59G    387G    13%    /storage2
/dev/ada2s1                   145G    247M    133G     0%    /storage3
/dev/ada3p1                   3.9T    1.5T    2.0T    43%    /storage4
/dev/ada0p1                   1.9T    8.2k    1.8T     0%    /storage5
fdescfs                       1.0k    1.0k      0B   100%    /dev/fd
procfs                        4.1k    4.1k      0B   100%    /proc
tmpfs                          11G    4.1k     11G     0%    /compat/linux/dev/shm
linprocfs                     4.1k    4.1k      0B   100%    /compat/linux/proc
//NOBODY@PROMETHEUS/PUBLIC    1.9T    192G    1.7T    10%    /Prometheus_public
root@Phaedra:/ #
```

Is there a problem with the disk? Everything appears to be working fine and noticeably faster.

I did all of this on another machine where there was no update access to the old system drive during the copy.


----------



## chrbr (Sep 9, 2020)

Did you run the commands to grow the file system? The example from the handbook is related to /dev/ada0p2 which should become /dev/ada1p2 on your system.

```
Grow the UFS file system to use the new capacity of the resized partition:

# growfs /dev/ada0p2
Device is mounted read-write; resizing will result in temporary write suspension for /.
It's strongly recommended to make a backup before growing the file system.
OK to grow file system on /dev/ada0p2, mounted on /, from 38GB to 47GB? [Yes/No] Yes
super-block backups (for fsck -b #) at:
 80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752,
 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432
If the file system is ZFS, the resize is      triggered by running the online subcommand with      -e:

# zpool online -e zroot /dev/ada0p2
Both the partition and the file system on it have now been resized to use the newly-available disk space.
```


----------



## Crotalus (Sep 9, 2020)

Chrbr,

I thought that I did the grow, but it appears that I did not or something did not work right.

```
root@Phaedra:/ # growfs /dev/ada1p2
Device is mounted read-write; resizing will result in temporary write suspension for /.
It's strongly recommended to make a backup before growing the file system.
OK to grow filesystem on /dev/ada1p2, mounted on /, from 229GB to 461GB? [yes/no] yes
super-block backups (for fsck_ffs -b #) at:
 480840192, 482122432, 483404672, 484686912, 485969152, 487251392, and more
```


```
root@Phaedra:/ # gpart show /dev/ada1
=>       40  976773088  ada1  GPT  (466G)
         40       1024     1  freebsd-boot  (512K)
       1064  966787072     2  freebsd-ufs  (461G)
  966788136    9984992     3  freebsd-swap  (4.8G)

root@Phaedra:/ #
```


```
root@Phaedra:/ # df -H
Filesystem                    Size    Used   Avail Capacity  Mounted on
/dev/ada1p2                   479G     70G    371G    16%    /
devfs                         1.0k    1.0k      0B   100%    /dev
/dev/ada4p1                   3.9T    1.1T    2.5T    30%    /storage1
/dev/ada5s1                   484G     59G    387G    13%    /storage2
/dev/ada2s1                   145G    247M    133G     0%    /storage3
/dev/ada3p1                   3.9T    1.5T    2.0T    43%    /storage4
/dev/ada0p1                   1.9T    8.2k    1.8T     0%    /storage5
fdescfs                       1.0k    1.0k      0B   100%    /dev/fd
procfs                        4.1k    4.1k      0B   100%    /proc
tmpfs                          25G    4.1k     25G     0%    /compat/linux/dev/shm
linprocfs                     4.1k    4.1k      0B   100%    /compat/linux/proc
//NOBODY@PROMETHEUS/PUBLIC    1.9T    192G    1.7T    10%    /Prometheus_public
```

That fixed it. Thanks


----------



## chrbr (Sep 9, 2020)

I have found myself often to copy&paste from examples. But then I forgot to modify some detail  .


----------

