Groupping restored partitions into slices

Snow Mountains snow.mountains.4 at gmail.com
Tue Nov 6 01:55:20 UTC 2012


Hi folks,

Short version: Is it possible to group existing partitions into slices
without affecting data?

Long version:

I had a disk sliced/partitioned like this:

ad4s1
  ad4s1a
  ad4s1b (swap)
  ad4s1d
  ad4s1e
  ad4s1f
ad4s2 (storage)
ad4s3
  ad4s3a
  ad4s3b (swap)
  ad4s3d
  ad4s3e
  ad4s3f

Then, I accidentally deleted *something* (wrong use of boot0cfg),
which left me with /dev/ad4 only!

scan_ffs correctly detected where all 9 data partitions begin. I
created new bsdlabel table, wrote it to ad4, so I now have

ad4a (former ad4s1a)
ad4b (former ad4s1b - swap)
ad4d (former ad4s1d)
ad4e (former ad4s1e)
ad4f (former ad4s1f)
ad4g (former ad4s2)
ad4h (former ad4s3a)
and beginning sectors of the rest (former ad4s3d-f). Of course, I
can't make more than 8 labels.

I can mount all of them and I see my data. I can even 'swapon ad4b'.

Now, the question: how can I restore s1, s2 and s3? As you can guess,
s1 and s3 were working systems.

Processing all this from FreeBSD-8/amd64 on another disc.

Thanks!
Sergi M


More information about the freebsd-questions mailing list