# HD repair



## overblue (Mar 18, 2016)

I'm trying to get an I/O intensive app running on FreeBSD, I have almost wasted a cheap SSD and killed an old HD. I can't throw any more money at this so only old hardware, I connected an old 2.5" HD from a 2010 Macbook. I thought the disk was ok, I upgraded it to an SSD a couple of years ago but after connecting to the FreeBSD machine I was not so sure.

I wanted to use this drive but I also wanted to back up any data before that.
This is what I get from `dmesg`:


```
$ grep "ada1" /var/run/dmesg.boot  
ada1 at ata2 bus 0 scbus1 target 1 lun 0
ada1: <Hitachi HTS545032B9SA02 PB3AC60W> ATA8-ACS SATA 1.x device
ada1: Serial Number 100514PBSC00AYKT5J9M
ada1: 150.000MB/s transfers (SATA, UDMA5, PIO 8192bytes)
ada1: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C)
ada1: Previously was known as ad5
GEOM: ada1: the secondary GPT header is not in the last LBA.
GEOM_PART: integrity check failed (ada1, GPT)
```


----------



## chrbr (Mar 18, 2016)

Dear overblue,
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-growing.html says

```
Note:
If the disk was formatted with the GPT partitioning scheme, it may show as “corrupted” because the GPT backup partition 
table is no longer at the end of the drive. Fix the backup partition table with gpart:

# gpart recover ada0
ada0 recovered
```
I hope this answers your question. Please check also sysutils/smartmontools if you like to have information about the status of your disks.


----------



## overblue (Mar 18, 2016)

chrbr thanks for the quick reply, the smartmontools I already had installed.
The `gpart recover` is failing with:

```
# gpart recover ada1
gpart: arg0 'ada1': Invalid argument
```
I'm going to try to find another HD, thanks.


----------

