# /usr unmountable



## tsnow20 (May 18, 2011)

Hello everyone! Been using FreeBSD for more than a year now as a desktop environment, originally from Linux. I've been loving FreeBSD ever since I switched.

Today however, I was fussing around with X and Gnome, and I caused it to lock up. I used CTRL + ALT + Backspace to kill X, but unfortunately, this locked the system as X was midway to closing.

After a hard reset, I got dumped to /bin/sh with the error message 
	
	



```
cannot read blk
```
 and 
	
	



```
unexpected soft update inconsistency
```
 with instructions to run fsck manually (which I did). It then reported that some sectors could not be read. I know the disk isn't bad; I can mount other partitions on the disk without issue. This happened on my /usr mount, ad6s1f.

My question is, what step can I take from here? I have my config files backed up, and my user profiles are stored elsewhere, so I could reload. However, would there be a way for me to restore /usr?

Thanks!


----------



## SirDice (May 18, 2011)

Just run `# fsck -y` in single user mode. That should fix everything.

If you still get errors post them here.


----------



## tsnow20 (May 18, 2011)

Did *fsck -y*, I got the output below


```
CANNOT READ BLK: 3013344

ad6: FAILURE - READ_DMA STATUS=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=23946112
...
THE FOLLOWING DISK SECTORS COULD NOT BE READ: 3013441, 3013442, 3013448, 3013449, 3013455, 3013456, 3013461, 3013462, 3013468, 3013469
```
The remaining phases go through without incident, and says that the file system is still dirty.


----------



## SirDice (May 18, 2011)

That doesn't look too good. Looks like you may have some bad sectors on that disk.


----------



## tsnow20 (May 18, 2011)

Weird that the bad sectors would only occur on the /usr partition though, despite having no problems until today.


----------



## tsnow20 (May 18, 2011)

Well it appears that using a forced mount still works on /usr -- I'm going to order a replacement drive. I'll use Seagate's bootable utility to see if I can't fix the issue. Will report back when I know more.


----------



## Galactic_Dominator (May 18, 2011)

tsnow20 said:
			
		

> Weird that the bad sectors would only occur on the /usr partition though, despite having no problems until today.



No, it's really not.  /usr is in general the most heavily used partition and errors will show up quicker in heavily used parts.



> I know the disk isn't bad; I can mount other partitions on the disk without issue.


I'm confused by your statements.  Do you think a slow death drive fails uniformly over its space?  If so you are incorrect, although it approaches uniformity as the degradation progresses.  Also for future reference if you see warnings about unable to read sector, there is a very high likelihood that drive is on its way to meet its maker.


----------



## SirDice (May 18, 2011)

Bad blocks normally get remapped by the drive to a spare area. When this spare area is filled up the bad blocks can't be remapped anymore and will start showing up. Then it's time to replace the drive.


----------



## Beastie (May 18, 2011)

tsnow20 said:
			
		

> Weird that the bad sectors would only occur on the /usr partition though, despite having no problems until today.


I had this disk for dual-booting Windows and FreeBSD. One day Windows froze and after a reboot it wouldn't boot anymore. FreeBSD was still able to boot for more than 6 months even though the / and /usr partitions were filled with bad sectors (their partition dumps contained many errors). All other partitions were fine.
The disk had more than 40 bad sectors scattered all over it. When I later tried to dd the disk, it finally died and the machine wouldn't even see it.

Always install sysutils/smartmontools, and from time to time run it (or use the included daemon) and check for any sign of failure.


----------

