# Where is my data?



## dram (Jun 21, 2012)

Hello, *I* am using FreeBSD 8.3 on a VPS. At one moment, my VPS had reset. On boot *I* didn't see my hard disk, and my DATA (important data). Now *I*'m using VPN and single user mode because *I* can't log in with SSH, FTP.

http://imageshack.us/photo/my-images/20/testftl.jpg/.

How to get my data back? Help me please.

Best Regards, dram.


----------



## wblock@ (Jun 21, 2012)

There are probably FreeBSD partitions in that first slice.  We can only guess that it came up in single user mode.  If that is true, then use fsck(8) to check and fix the filesystems, then leave the single user mode.

```
# fsck -y -t ufs
# exit
```

The first thing to do after that is to make some backups.


----------



## dram (Jun 22, 2012)

Single user mode >

```
Enter full patch name of Shell or Return for /bin/sh : [enter]

> fsck -y -t ufs
> exit
```

> again in single mode
`# df -h`
img
http://imageshack.us/content_round.php?page=done&l=img407/5430/54992295.png

Again `# fsck -y -t ufs`
http://imageshack.us/photo/my-images/444/83054758.png/

And got 
	
	



```
** file system is clean **
```
http://imageshack.us/photo/my-images/401/45449046.png/

And *df -h* return me

http://imageshack.us/content_round.php?page=done&l=img407/5430/54992295.png




Other idea?


----------



## dram (Jun 22, 2012)

*I*'ve got unknow*n* class 'root' when *I* want to login with ssh.


----------



## kpa (Jun 22, 2012)

Does the file /etc/login.conf exist? Try if you can run this from the single user mode:

`# cap_mkdb /etc/login.conf`


----------



## dram (Jun 22, 2012)

Nope.


----------



## SirDice (Jun 22, 2012)

Dram, please stop double posting and [thread=8816]format your posts[/thread].


----------



## dram (Jun 22, 2012)

@up sorry

If *I* had to use `# cap_mkdb /etc/login.conf` *I*'ve got 
	
	



```
cap_mkdb not found
```

In *df -h* *I* lost my part which have 56 GB.


----------



## dram (Jun 22, 2012)

*W*hen *I* write

```
mount /dev/ad0s1e

mount /dev/ad0s1f

mount /dev/ad0s1d
```

Then *I*'ve got my old files! *B*ut when *I* restart VPS *I* lost ;( My VPD do*es*n*'*t mount disk automatical*l*y.


----------



## SirDice (Jun 22, 2012)

dram said:
			
		

> Sorry for double post  i don't know to edit


Read your sign up email!


----------



## dram (Jun 22, 2012)

http://imageshack.us/photo/my-images/853/32552812.png/

*A*fter a reboot *I* have only two disk.

989 MB
1.0 K


----------



## wblock@ (Jun 22, 2012)

Look at /etc/fstab and see if it is set to automount the additional filesystems.


----------

