1

I have two solaris 11.3 virtualbox images. One was rendered inoperative after a failed disk space recovery attempt. I then created a new solaris 11.3 instance with a larger drive image and would now like to mount the original disk so that I might recover some important work. Trouble is, I do not understand the naming scheme that solaris uses for its disk devices.. hoping that someone could help me to understand the naming and partitioning scheme and how to mount the old partitions for data recovery?

I have attached the old drive image to the new solaris 11.3 vm and have booted the vm. Nothing appears auto-mounted (though, there are a lot of items listed when I type 'mount').

UPDATE:

So, I have used the format tool to probe the vbox disk image and print the partitions. Looks like the disk I am interested in, is "clt1d0". There are 8 partitions on it, with partition 0 tagged as "BIOS_boot" and partition 1 tagged as "usr". It's about the right size.

So, I looked in /dev/rdsk for clt1d0* and found a number of entries that matched, that ended in "s#" or "p#". I decided that, since the prior partition print output showed partition 1 as being "interesting", I would play with clt1d0s1 (or p1).

Long story short, trying to mount that, failing and googling the results, then retrying, led me to the finding that, this is a zfs filesystem.

How do I mount a zfs file system to, say, /mnt, on my running OS, so that I may extract the needed data?

  • You have to first import the pool to be able to mount various datasets. I'll edit my answer w/more details – sleepyweasel Nov 29 '17 at 20:46
3

If the storage is visible, and the filesystems were ZFS (default on Solaris 11), you should be able just to run zpool import to see if there are any pools to import. If so, ref. the zpool man page for importing the pool to an alt pool name.

If pools were found, the names and numeric IDs would be listed.

An import is usually: zpool import < pool_name | numID >

But you can also import to another name, ie:
zpool import < pool_name | numID > NewPoolName

A quick search pulled up this Oracle doc: https://docs.oracle.com/cd/E19253-01/819-5461/gazuf/index.html

  • 1
    This was the final piece of the puzzle. I worked with your initial answer and got the darn thing mounted, but, when I imported the pool, it attempted (and failed) to mount all of the filesystems on top of the currently mounted ones. I found this page which gave the details on importing the pool, with an alternate name, to an alternate root. – Jon Nov 29 '17 at 21:01
  • One more question on this... I was able to recover my data, which was stored in (within the original vbox image) /export/home/mydir. That was mounted, via the zpool import command, to /mnt/export/home/mydir. I also found under /mnt, a folder named NewPoolName, which contained a boot folder. I did not see any other filesystems mounted. In particular, I would like to see the rest of the system, such as /etc, so that I may attempt to recover the image itself. How would I mount the remaining filesystems? – Jon Nov 30 '17 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.