Dixi quod…

>… whereas partx at least recognises the disklabel:
>
>tglase@tglase:~ $ sudo partx --show - /dev/mapper/vg--tglase-ufs4
                                        whole-disc:^^^^^^^^^^^^^^
                                         bsd-disklabel-partition:^
>NR   START      END  SECTORS  SIZE NAME UUID
> 1 2097152 67108863 65011712   31G
> 2      32  2097151  2097120 1024M
> 3       0       31       32   16K

I found a workaround… it does require manually figuring out
which of the “NR” maps to which slice, then losetup(8)ing
that — this is a bit tricky (START is relative to the entire
disc, not the partition) and ugly (losetup only uses bytes,
Kibibytes, etc. but not sectors as offset):

sudo losetup -f -o $((2097152/2))K --sizelimit $((65011712/2))K 
/dev/mapper/vg--tglase-ufs
               START=>^^^^^^^            SECTORS=>^^^^^^^^       
whole-disc:^^^^^^^^^^^^^^
                     2sec=1K:^^^^^                2sec=1K:^^^^^

Then, “sudo losetup -a” to figure out which loop device
“won”, afterwards use that, for example, with ufsutils
(= 8.2-4) installed, I can do…

sudo ffsinfo /dev/loop0 | less
sudo fsck.ufs -fy /dev/loop0

… and even…

sudo mount -t ufs -o ufstype=44bsd /dev/loop0 /mnt
ls /mnt
sudo umount /mnt

… and at the end, don’t forget to:

sudo losetup -d /dev/loop0
sudo kpartx -d -v /dev/mapper/vg--tglase-ufs


JFYI, in case this pops up with someone else. A working solution,
involving partx, partprobe, kpartx or something, would still be
welcome.

bye,
//mirabilos
-- 
[...] if maybe ext3fs wasn't a better pick, or jfs, or maybe reiserfs, oh but
what about xfs, and if only i had waited until reiser4 was ready... in the be-
ginning, there was ffs, and in the middle, there was ffs, and at the end, there
was still ffs, and the sys admins knew it was good. :)  -- Ted Unangst über *fs

Reply via email to