# Help with 'gpart show'



## balanga (Aug 10, 2014)

When I run

`gpart show`

I get 
	
	



```
root@Balanga:~ # gpart show
=>       34  312581741  ada0  GPT  (149G)
         34          6        - free -  (3.0K)
         40        128     1  freebsd-boot  (64K)
        168  304086904     2  freebsd-ufs  (145G)
  304087072    8388608     3  freebsd-swap  (4.0G)
  312475680     106095        - free -  (52M)

=>       34  500118125  ada1  GPT  (238G)
         34        128     1  freebsd-boot  (64K)
        162  490733440     2  freebsd-ufs  (234G)
  490733602    8388608     3  freebsd-swap  (4.0G)
  499122210     995949        - free -  (486M)

=>       34  500118125  diskid/DISK-000000001311036F2FDC  GPT  (238G)
         34        128                                 1  freebsd-boot  (64K)
        162  490733440                                 2  freebsd-ufs  (234G)
  490733602    8388608                                 3  freebsd-swap  (4.0G)
  499122210     995949                                    - free -  (486M)
```

Can someone explain what this is telling me?

ada0 must be my 160GB Intel SSD disk.
The other two entries look to be related to the same device which must be my mSATA drive which had Windows installed and I hadn't intended to install FreeBSD on. Why are the figures duplicated and can someone tell me what they mean?


----------



## bsdkeith (Aug 10, 2014)

I'm not an expert, but what you are looking at is your 2 disks, ada0 and ada1, the 1,2,and 3, refer to the partitions on those disks.
(It does rather look like you have 2 BSD installs there.)
It is advisable not to use swap on SSD disks, and also to use noatime in your fstab file.


----------



## wblock@ (Aug 10, 2014)

bsdkeith said:
			
		

> It is advisable not to use swap on SSD disks, and also to use noatime in your fstab file.



I use swap on SSDs, and have never bothered with noatime (Using a Solid State Drive with FreeBSD).  The concern was with wearing out flash memory by writing it too many times.  SSDs do internal wear leveling to keep one section of flash from wearing out early, and most will survive long past the time they are useful.

There are numerous SSD write endurance articles for more detail.  This one is fairly involved: http://techreport.com/review/25889/the-ssd-endurance-experiment-500tb-update.


----------



## obsigna (Aug 10, 2014)

balanga said:
			
		

> ... Why are the figures duplicated and can someone tell me what they mean?


In order to de-duplicate the figures, add to /boot/loader.conf the following entry:

```
kern.geom.label.disk_ident.enable="0"
```
After restart, the second info block for the disk ada1 should have disappeared.


----------



## kpa (Aug 10, 2014)

obsigna said:
			
		

> balanga said:
> 
> 
> 
> ...



No, if this was the duplication due to the GEOM ID the second disk would show up as gptid/*****. The ada1 disk here must be a real disk and it now has FreeBSD installed on it from the looks of it (which is what the OP didn't want).

The suggestion to use the kern.geom.label.disk_ident.enable="0" setting in /boot/loader.conf is a good one though, it can avoid some hairy device identification issues when ZFS is used.


----------



## obsigna (Aug 10, 2014)

kpa said:
			
		

> No, if this was the duplication due to the GEOM ID the second disk would show up as gptid/*****. The ada1 disk here must be a real disk and it now has FreeBSD installed on it from the looks of it (which is what the OP didn't want).



Please have a closer look on the output of `gpart show` in the original message.

The third block which is labeled with diskid/DISK-000000001311036F2FDC *is a duplicate* of the second block labeled with ada1, it only got another label. This duplicate will disappear by adding kern.geom.label.disk_ident.enable="0" to /boot/loader.conf.


----------



## kpa (Aug 10, 2014)

Aah ok, I didn't spot the scrollbar to scroll down the listing and I missed the 3rd block with the gptid entry.


----------

