回复 7# wenhq
我现在的问题就是不能把共享磁盘加入到initiator的LVM上 。
下面是initiator上没扩容时的LVM
etc/init.d.\>vgdisplay -v vg_iscsi
Using volume group(s) on command line
Finding volume group "vg_iscsi"
--- Volume group ---
VG Name vg_iscsi
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 18.64 GB
PE Size 4.00 MB
Total PE 4771
Alloc PE / Size 4608 / 18.00 GB
Free PE / Size 163 / 652.00 MB
VG UUID V8qwZb-KVG9-Je74-PV7z-yryh-L5ha-2JtK21
--- Logical volume ---
LV Name /dev/vg_iscsi/lv_iscsi
VG Name vg_iscsi
LV UUID pxleYU-tbQ5-sddU-dKtl-3z48-u3DZ-D9J5Xu
LV Write Access read/write
LV Status available
# open 0
LV Size 18.00 GB
Current LE 4608
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4
--- Physical volumes ---
PV Name /dev/sda1
PV UUID wZdJMk-u1md-GdSf-GKv0-dZmo-82hz-9CPx9J
PV Status allocatable
Total PE / Free PE 4771 / 163
下面是扩容后的
/etc/init.d.\>vgdisplay -v vg_iscsi
Using volume group(s) on command line
Finding volume group "vg_iscsi"
--- Volume group ---
VG Name vg_iscsi
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 46.58 GB
PE Size 4.00 MB
Total PE 11924
Alloc PE / Size 9728 / 38.00 GB
Free PE / Size 2196 / 8.58 GB
VG UUID V8qwZb-KVG9-Je74-PV7z-yryh-L5ha-2JtK21
--- Logical volume ---
LV Name /dev/vg_iscsi/lv_iscsi
VG Name vg_iscsi
LV UUID pxleYU-tbQ5-sddU-dKtl-3z48-u3DZ-D9J5Xu
LV Write Access read/write
LV Status available
# open 0
LV Size 38.00 GB
Current LE 9728
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4
--- Physical volumes ---
PV Name /dev/sda1
PV UUID wZdJMk-u1md-GdSf-GKv0-dZmo-82hz-9CPx9J
PV Status allocatable
Total PE / Free PE 4771 / 0
PV Name /dev/sdd1
PV UUID ZLSmMY-UU54-8lu4-7WFP-rBFx-qCzT-FBWTrN
PV Status allocatable
Total PE / Free PE 7153 / 2196
/etc/init.d.\>
刚扩容后是可以mount的
/etc/init.d.\>mount -t ext3 /dev/vg_iscsi/lv_iscsi /data/testscsi
/etc/init.d.\>
initiator重启后就不能再mount了
(这次的共享是分区,不是LVM,如果是LVM的话,签退再签到后就不能再mount了)
~.\>mount -t ext3 /dev/vg_iscsi/lv_iscsi /data/testscsi
mount: special device /dev/vg_iscsi/lv_iscsi does not exist
mount UUID也不行
/dev.\>mount UUID="59bbf54a-9f40-48aa-87dc-7b0b8587dd6f" -t ext3 /data/testscsi
mount: special device UUID=59bbf54a-9f40-48aa-87dc-7b0b8587dd6f does not exist
/dev.\>
查看 vg,还在啊
~.\>vgdisplay -v vg_iscsi
Using volume group(s) on command line
Finding volume group "vg_iscsi"
--- Volume group ---
VG Name vg_iscsi
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 46.58 GB
PE Size 4.00 MB
Total PE 11924
Alloc PE / Size 9728 / 38.00 GB
Free PE / Size 2196 / 8.58 GB
VG UUID V8qwZb-KVG9-Je74-PV7z-yryh-L5ha-2JtK21
--- Logical volume ---
LV Name /dev/vg_iscsi/lv_iscsi
VG Name vg_iscsi
LV UUID pxleYU-tbQ5-sddU-dKtl-3z48-u3DZ-D9J5Xu
LV Write Access read/write
LV Status NOT available
LV Size 38.00 GB
Current LE 9728
Segments 2
Allocation inherit
Read ahead sectors auto
--- Physical volumes ---
PV Name /dev/sda1
PV UUID wZdJMk-u1md-GdSf-GKv0-dZmo-82hz-9CPx9J
PV Status allocatable
Total PE / Free PE 4771 / 0
PV Name /dev/sdd1
PV UUID ZLSmMY-UU54-8lu4-7WFP-rBFx-qCzT-FBWTrN
PV Status allocatable
Total PE / Free PE 7153 / 2196
fdisk 查看 , 共享设备还在
~.\>fdisk -l
Disk /dev/hda: 858.9 GB, 858993459200 bytes
255 heads, 63 sectors/track, 104433 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 104433 838753650 8e Linux LVM
Disk /dev/sda: 2147.4 GB, 2147483648000 bytes
255 heads, 63 sectors/track, 261083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 2433 19543041 83 Linux
Disk /dev/sdb: 2147.4 GB, 2147483648000 bytes
255 heads, 63 sectors/track, 261083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 2433 19543041 83 Linux
/dev/sdb2 2434 6081 29302560 83 Linux
Disk /dev/sdc: 2147.4 GB, 2147483648000 bytes
255 heads, 63 sectors/track, 261083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 2433 19543041 83 Linux
/dev/sdc2 2434 6081 29302560 83 Linux
Disk /dev/md0: 20.0 GB, 20012007424 bytes
2 heads, 4 sectors/track, 4885744 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 30.0 GB, 30005723136 bytes
2 heads, 4 sectors/track, 7325616 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md2: 50.0 GB, 50017599488 bytes
2 heads, 4 sectors/track, 12211328 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md2 doesn't contain a valid partition table
Disk /dev/sdd: 30.0 GB, 30005789184 bytes
64 heads, 32 sectors/track, 28615 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 28615 29301744 83 Linux
Disk /dev/sde: 40.0 GB, 40007761920 bytes
64 heads, 32 sectors/track, 38154 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sde doesn't contain a valid partition table
~.\>
tune2fs 查看
~.\>tune2fs -l /dev/vg_iscsi/lv_iscsi
tune2fs 1.39 (29-May-2006)
tune2fs: No such file or directory while trying to open /dev/vg_iscsi/lv_iscsi
Couldn't find valid filesystem superblock.
不知道是为什么了,求解,谢谢。 |