我创建了一个包含单个 ext3 分区的逻辑卷 ( scandata
)。它是其卷组中唯一的逻辑卷 ( case4t
)。所述卷组由 3 个物理卷组成,它们是单个块设备上的三个主分区 ( /dev/sdb
)。
当我创建它时,我可以通过块设备挂载该分区/dev/mapper/case4t-scandatap1
。
自上次重启以来,上述块设备文件已经消失。
值得注意的是——我不确定——我的上司(一位大学教授)通过运行 来提示这次重启sudo chmod -R [his name] /usr/bin
,这会清除其路径上的所有 suid,从而阻止我们两个执行sudo
-ing。该问题已通过以下方式(暂时)得到纠正:此操作。
现在我就不再闲聊,开始终端转储:
$ 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 打印
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 打印
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
我在系统日志上得到的全部信息是:[170059.538137] VFS: Can't find ext3 filesystem on dev dm-0.
提前感谢您提供的任何帮助,
Brian
PS 我使用的是 Ubuntu GNU/Linux 2.6.28-11-server (Jaunty)(我知道它已经过时了 - 在清单上)。
答案1
哎呀!只是我粗心大意了。我只是跑了partprobe
,然后update-initramfs
现在一切都好了。
答案2
对于我来说,激活它的作用是:vgchange -a y
。之后/dev/$vgname/*
和/dev/mapper/$vgname-*
设备立即出现。
编辑:还需要在启动时安装它,而不是在 in 中。激活后使用use_lvmetad = 1
可能0
与此有关,也可能无关。/etc/lvm/lvm.conf
update-initramfs -u