逻辑卷上没有设备文件分区(Linux LVM)

我创build了一个包含单个ext3分区的逻辑卷( scandata )。 它是卷组中唯一的逻辑卷( case4t )。 所述卷组由3个物理卷组成,这三个物理卷是单个块设备( /dev/sdb )上的三个主分区。

当我创build它时,我可以通过块设备/dev/mapper/case4t-scandatap1挂载分区。

自上次重启以来,上述的块设备文件已经消失。

我可能会注意到 – 我不确定 – 我的上级(大学教授)通过运行sudo chmod -R [his name] /usr/bin提示重新引导,从而消除了path上的所有干系,我们俩都来自sudo -ing。 这个问题已经(暂时)通过这一行动得到纠正。

现在我将削减喋喋不休,开始terminal转储:

$ sudo pvs; sudo vgs; sudo lvs

  Logging initialised at Sat Jan 8 11:42:34 2011 Set umask to 0077 Scanning for physical volume names PV VG Fmt Attr PSize PFree /dev/sdb1 case4t lvm2 a- 819.32G 0 /dev/sdb2 case4t lvm2 a- 866.40G 0 /dev/sdb3 case4t lvm2 a- 47.09G 0 Wiping internal VG cache Logging initialised at Sat Jan 8 11:42:34 2011 Set umask to 0077 Finding all volume groups Finding volume group "case4t" VG #PV #LV #SN Attr VSize VFree case4t 3 1 0 wz--n- 1.69T 0 Wiping internal VG cache Logging initialised at Sat Jan 8 11:42:34 2011 Set umask to 0077 Finding all logical volumes LV VG Attr LSize Origin Snap% Move Log Copy% Convert scandata case4t -wi-a- 1.69T Wiping internal VG cache 

$ sudo vgchange -ay

 Logging initialised at Sat Jan 8 11:43:14 2011 Set umask to 0077 Finding all volume groups Finding volume group "case4t" 1 logical volume(s) in volume group "case4t" already active 1 existing logical volume(s) in volume group "case4t" monitored Found volume group "case4t" Activated logical volumes in volume group "case4t" 1 logical volume(s) in volume group "case4t" now active Wiping internal VG cache 

$ ls / dev | grep case4t

 case4t 

$ ls / dev / mapper

 case4t-scandata control 

$ sudo fdisk -l / dev / case4t / scandata

 Disk /dev/case4t/scandata: 1860.5 GB, 1860584865792 bytes 255 heads, 63 sectors/track, 226203 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00049bf5 Device Boot Start End Blocks Id System /dev/case4t/scandata1 1 226203 1816975566 83 Linux 

$ sudo parted / dev / case4t / scandata print

 Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/case4t-scandata: 1861GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1861GB 1861GB primary ext3 

$ sudo fdisk -l / dev / sdb

 Disk /dev/sdb: 1860.5 GB, 1860593254400 bytes 255 heads, 63 sectors/track, 226204 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000081 Device Boot Start End Blocks Id System /dev/sdb1 1 106955 859116006 83 Linux /dev/sdb2 113103 226204 908491815 83 Linux /dev/sdb3 106956 113102 49375777+ 83 Linux Partition table entries are not in disk order 

$ sudo parted / dev / sdb print

 Model: DELL PERC 6/i (scsi) Disk /dev/sdb: 1861GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 880GB 880GB primary reiserfs 3 880GB 930GB 50.6GB primary 2 930GB 1861GB 930GB primary 

我觉得有点奇怪的是,上面的分区被称为reiserfs,或者如果它是重要的 – 它以前是reiserfs,但是LVM认为它是一个PV。

重申一次, /dev/mapper/case4t-scandatap1 (我以前使用过)和/dev/case4t/scandata1 (由fdisk打印)都不存在。 和/dev/case4t/scandata (无分区号)无法挂载:

$ sudo mount -t ext3 / dev / case4t / scandata / mnt / new

 mount: wrong fs type, bad option, bad superblock on /dev/mapper/case4t-scandata, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so 

我在syslog上得到的是: [170059.538137] VFS: Can't find ext3 filesystem on dev dm-0.

提前感谢您提供的任何帮助,
布赖恩

PS我在Ubuntu GNU / Linux 2.6.28-11-server(Jaunty)(过时,我知道 – 这是在洗衣清单)。

Do'h! 我只是一个粗心的错误。 我只是运行partprobe ,然后update-initramfs ,现在一切都桃色。

对我来说,它做到了: vgchange -ay 。 之后, /dev/$vgname/*/dev/mapper/$vgname-*设备立即显示出来。

编辑:在/etc/lvm/lvm.conf还需要use_lvmetad = 1而不是0来使其在启动时挂载。 激活后使用update-initramfs -u可能会或可能没有与它有关。