# snapshot is corrupt



## adripillo (Apr 8, 2014)

Hello, I am having a problem from time to time, lets say each 2 or 3 weeks when I am trying to update the ports I receive a message that says "snapshot is corrupt" so I need to do: 

`rm /var/db/portsnap/tag && portsnap fetch extract`

Why It is happen so often? I am using FreeBSD 9.2


----------



## SirDice (Apr 8, 2014)

adripillo said:
			
		

> Hello, I am having a problem from time to time, lets say each 2 or 3 weeks when I am trying to update the ports I receive a message that says "snapshot is corrupt"


Bad blocks on a disk could do that. Or a very inconsistent filesystem due to power outages perhaps. Did you check the disk itself?


----------



## adripillo (Apr 8, 2014)

SirDice said:
			
		

> adripillo said:
> 
> 
> 
> ...



No, I did not. We had some electricity problems some months ago. Do u know a good way to check the disk? Thanks for reply


----------



## SirDice (Apr 8, 2014)

If it's UFS I can recommend booting to single user mode and running a full fsck(8) on everything. For ZFS a `zpool scrub` may find or correct some issues. The health of the disk itself can usually be tested with sysutils/smartmontools.


----------



## adripillo (Apr 8, 2014)

SirDice said:
			
		

> If it's UFS I can recommend booting to single user mode and running a full fsck(8) on everything. For ZFS a `zpool scrub` may find or correct some issues. The health of the disk itself can usually be tested with sysutils/smartmontools.



Ok, thanks


----------

