Answer the question
In order to leave comments, you need to log in
Mounting UFS2 on Linux?
Is a subject possible?
Google found a lot of topics on this topic, but I never found the answer anywhere.
What we have:
OS: Debian 6.0 (Squeeze) (amd64)<br/>
Core: 2.6.32-5-xen-amd64<br/>
LVM version: 2.02.66(2) (2010-05-20)<br/>
Library version: 1.02.48 (2010-05-20)<br/>
Driver version: 4.15.0<br/>
mount: wrong fs type, bad option, bad superblock on /dev/mapper/vgname-lvname,<br/>
missing codepage or helper program, or other error<br/>
In some cases useful info is found in syslog - try<br/>
dmesg | tail or so<br/>
[1549449.362263] ufs_read_super: bad magic number<br/>
mount: you must specify the filesystem type<br/>
Answer the question
In order to leave comments, you need to log in
The LVM partition must be mounted via a pseudo device losetup -f -o <byte_from_start>
losetup -f -o 32256 /dev/dm-1
mount /dev/loop0 /mnt/tmp/
In general, in order to fully answer this question, I give a list of actions that need to be performed.
First, we find out by experience what kind of dm device we need. Logically, the larger the number at the end, the later this logical volume was created. We look at what dm devices we have:
# ls /dev/dm*
/dev/dm-0 /dev/dm-1 /dev/dm-4 /dev/dm-5
Select the device we need and project it into the loop device. By default, it is mapped to the first free loop (usually loop0).
losetup -f -o 32256 /dev/dm-4
Check with the command
losetup -a
If not projected, then release this loop device.
losetup -d /dev/loop0
If everything is fine, then do:
# mount -r -t ufs -o ufstype=ufs2 /dev/loop0 /mnt/
# ls mnt
dm device can be found like this (VG is the name of the required volume
group
)
:
$ ls -l /dev/VG/
итого 0
lrwxrwxrwx 1 root root 7 Июн 8 22:21 Win2003 -> ../dm-0
lrwxrwxrwx 1 root root 7 Июн 8 22:48 Win2003Backup -> ../dm-2
lrwxrwxrwx 1 root root 7 Июн 8 22:47 Win2003Data -> ../dm-1
lrwxrwxrwx 1 root root 7 Июн 8 22:48 Win2003Users -> ../dm-3
# vgs
VG #PV #LV #SN Attr VSize VFree
VG 1 4 0 wz--n- 465,76g 185,76g
# fdisk -lu /dev/dm-1
Disk /dev/dm-1: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders, total 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f8b81c9
Device Boot Start End Blocks Id System
/dev/dm-1p1 * 63 125821079 62910508+ 7 HPFS/NTFS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question