Accessing data on second drive (freeBSD 4.9)

My FreeBSD machine crashed, causing me to reinstall on an extra drive. The old drive is now my slave, of which I'd like to pull some of my old data off of. How can I access my old drive and copy some of my data from it to my new primary drive?

I tried-

mount acd3

And got an error-

"Unknown special file or file system"

I'm not even sure if acd3 is my old drive or not.


Who is Participating?

Improve company productivity with a Business Account.Sign Up

fim32Connect With a Mentor Commented:
can you show us your df -k output?

acd3 doesn't look like the name of the hard drive device, it looks like a cd drive.

generally, what you'll have to do is figure out which device it is, then mount it to a filesystem...

like make a directory called oldroot in /mnt, then:
mount /dev/ad1s1a /mnt/oldroot

or something like that, i used a sample device

ls /dev/ad* should show you what devices are available...
spamuelAuthor Commented:
Just to clarify, I did not have this drive in when I reinstalled FreeBSD. I am using WebMin, which shows the following devices:

Mounted as Type Location In use? Permanent?
Virtual Memory Virtual Memory (swap) /dev/ad2s1b Yes Yes
/ FreeBSD Unix Filesystem (ufs) /dev/ad2s1a Yes Yes
/tmp FreeBSD Unix Filesystem (ufs) /dev/ad2s1f Yes Yes
/usr FreeBSD Unix Filesystem (ufs) /dev/ad2s1g Yes Yes
/var FreeBSD Unix Filesystem (ufs) /dev/ad2s1e Yes Yes
/cdrom ISO9660 CD-ROM (cd9660) /dev/acd0c No Yes
/proc Process Image Filesystem (proc) proc Yes Yes

Listing the directory in dev gave me countless devices, not sure why that is.

Should I return to /stand/sysinstall to somehow manually add my drive?
so the disk wasn't in the system when you reinstalled, but since then you've turned off the system, added the disk, and booted back up?  on bootup, freebsd should have discovered the disk.  if you go into /stand/sysinstall, you should be able to see the partitioning of that disk (you probably don't want to make any changes, esp if you want the old data).

lising /dev/ad* should have given you a lot of devices, but you should be able to see them in groups of /dev/ad2*, which are all the slices of your current root disk, and /dev/adn*, where n is a unique disk.

if you see your old root disk as /dev/ad1*, then you should try mounting one of those slices...
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

spamuelAuthor Commented:
Ok, I had to setup telnet so I could login over my local network, now I can post my df -k stuff..

$ df -k
Filesystem  1K-blocks   Used    Avail Capacity  Mounted on
/dev/ad2s1a    128990  65626    53046    55%    /
/dev/ad2s1f    257998      8   237352     0%    /tmp
/dev/ad2s1g  13690880 813090 11782520     6%    /usr
/dev/ad2s1e    257998  26012   211348    11%    /var
procfs              4      4        0   100%    /proc

>>>so the disk wasn't in the system when you reinstalled, but since then you've turned off the system, added the disk, and booted back up

That is correct.

After trying to mount  ad1s1a, b, c etc..

I got the following error:

"Device not configured"

I also tried mounting ad3s1a and got an error "file system is not clean - run fsck"

I ran fsck, and noticed a few (NO WRITE) remarks.

Here is the other listing you asked for earlier:

$ ls /dev/ad*
/dev/ad0        /dev/ad0s1h     /dev/ad1s1d     /dev/ad2s1      /dev/ad3e
/dev/ad0a       /dev/ad0s2      /dev/ad1s1e     /dev/ad2s1a     /dev/ad3f
/dev/ad0b       /dev/ad0s3      /dev/ad1s1f     /dev/ad2s1b     /dev/ad3g
/dev/ad0c       /dev/ad0s4      /dev/ad1s1g     /dev/ad2s1c     /dev/ad3h
/dev/ad0d       /dev/ad1        /dev/ad1s1h     /dev/ad2s1d     /dev/ad3s1
/dev/ad0e       /dev/ad1a       /dev/ad1s2      /dev/ad2s1e     /dev/ad3s1a
/dev/ad0f       /dev/ad1b       /dev/ad1s3      /dev/ad2s1f     /dev/ad3s1b
/dev/ad0g       /dev/ad1c       /dev/ad1s4      /dev/ad2s1g     /dev/ad3s1c
/dev/ad0h       /dev/ad1d       /dev/ad2        /dev/ad2s1h     /dev/ad3s1d
/dev/ad0s1      /dev/ad1e       /dev/ad2a       /dev/ad2s2      /dev/ad3s1e
/dev/ad0s1a     /dev/ad1f       /dev/ad2b       /dev/ad2s3      /dev/ad3s1f
/dev/ad0s1b     /dev/ad1g       /dev/ad2c       /dev/ad2s4      /dev/ad3s1g
/dev/ad0s1c     /dev/ad1h       /dev/ad2d       /dev/ad3        /dev/ad3s1h
/dev/ad0s1d     /dev/ad1s1      /dev/ad2e       /dev/ad3a       /dev/ad3s2
/dev/ad0s1e     /dev/ad1s1a     /dev/ad2f       /dev/ad3b       /dev/ad3s3
/dev/ad0s1f     /dev/ad1s1b     /dev/ad2g       /dev/ad3c       /dev/ad3s4
/dev/ad0s1g     /dev/ad1s1c     /dev/ad2h       /dev/ad3d

My root password is the same as my old, not sure if that matters though.

out of all you tried, looks like ad3s1a has the strongest possibility?  after you fsck'd, did you try to mount it?

old root password won't make a difference.
spamuelAuthor Commented:
ok, I ran (after a quick google) fsck -y ad31sa, then mounted the drive and was able to access it, thank you! One last little problem though, my var and usr directories are empty for some reason. I also created a directory in root named www, which seems to have vanished also. Are these seperate somehow? Should I try mounting the others?
well, looking at your new disk layout (and assuming your new disk was made to match), i would guess that your old /usr and /var are in /dev/ad3s1g and /dev/ad3s1e, respectively.

no idea what would have happened to your old /www directory, is it possible (it is probably) that you actually put that directory in /var/www?

i would try mounting /dev/ad3s1g to /mnt/oldroot/usr, and /dev/ad3s1e to /mnt/oldroot/var

you may also need to fsck these partitions before viewing?

spamuelAuthor Commented:
Yahooo! I found it. I forgot I installed Plesk, which moved all my files.

Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.