客户发现当lun大于2TB时,在vxvm 中识别的空间大小不正确。
=======================================
[root@linux-29 ~]# vxdisk -eo alldgs list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR
df8000_0 auto - - error sdb std fc RAID_5 <<<<<< large disk
[root@linux-29 ~]# /etc/vx/bin/vxdisksetup -fi df8000_0
VxVM vxparms ERROR V-5-1-6536 error reading partitions
VxVM vxdisksetup ERROR V-5-2-43 df8000_0: Invalid disk device for vxdisksetup
[root@linux-29 ~]# parted /dev/sdb
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: HITACHI DF600F (scsi)
Disk /dev/sdb: 2362GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all
data on this disk will be lost. Do you want to continue?
parted: invalid token: gpt
Yes/No? yes
New disk label type? [gpt]?
(parted) print
Model: HITACHI DF600F (scsi)
Disk /dev/sdb: 2362GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart primary reiserfs 0 2100G
(parted) print
Model: HITACHI DF600F (scsi)
Disk /dev/sdb: 2362GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 2100GB 2100GB primary
(parted) quit
Information: Don't forget to update /etc/fstab, if necessary.
[root@linux-29 ~]# /etc/vx/bin/vxdisksetup -fi df8000_0 format=cdsdisk
[root@linux-29 ~]# vxdg init cdsdg df8000_0
[root@linux-29 ~]# vxprint -ht
Disk group: cdsdg
DG NAME NCONFIG NLOG MINORS GROUP-ID
...
dg cdsdg default default 22000 1293719681.39.linux-29
dm df8000_0 df8000_0 auto 65536 2147214224 - <<<<<<<<<<<<<<<
这个大小不是真实大小!
[root@linux-29 ~]# vxassist -g cdsdg maxsize
Maximum volume size: 2147213312 (1048444Mb)
[root@linux-29 ~]# rpm -aq|grep vxvm
VRTSvxvm-5.1.001.000-RP1_RHEL5
根据000008575, 在SF5.1SP1中,可以支持最大2TB的 CDS disk。要想 vxvm正确识别盘的空间,可以将其格式化为sliced,步骤如下:
[root@linux-29 ~]# /etc/vx/bin/vxdisksetup -fi df8000_0 format=sliced
[root@linux-29 ~]# vxdisk -eo alldgs list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR
df8000_0 auto:sliced - - online sdb std fc RAID_5 <<<<<< large disk
[root@linux-29 ~]# vxdisk list df8000_0
Device: df8000_0
devicetag: df8000_0
type: auto
hostid:
disk: name= id=1293718366.22.linux-29
group: name= id=
info: format=sliced,privoffset=1,pubslice=2,privslice=1
flags: online ready private autoconfig autoimport
pubpaths: block=/dev/vx/dmp/df8000_0s2 char=/dev/vx/rdmp/df8000_0s2
privpaths: block=/dev/vx/dmp/df8000_0s1 char=/dev/vx/rdmp/df8000_0s1
guid: -
udid: HITACHI%5FDF600F%5F85015582%5F0000
site: -
version: 2.1
iosize: min=512 (bytes) max=1024 (blocks)
public: slice=2 offset=0 len=4613657334 disk_offset=66048
private: slice=1 offset=1 len=65535 disk_offset=256
update: time=1293718366 seqno=0.2
ssb: actual_seqno=0.0
headers: 0 248
configs: count=1 len=51575
logs: count=1 len=4096
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 disabled
config priv 000249-051592[051344]: copy=01 offset=000231 disabled
log priv 051593-055688[004096]: copy=01 offset=000000 disabled
Multipathing information:
numpaths: 1
sdb state=enabled
[root@linux-29 ~]# vxdg init abc df8000_0
VxVM vxdg ERROR V-5-1-6478 Device df8000_0 cannot be added to a CDS disk group
[root@linux-29 ~]# vxdg init abc df8000_0 cds=off
[root@linux-29 ~]# vxassist -g abc maxsize
Maximum volume size: 4613656576 (2252762Mb)
[root@linux-29 ~]# vxprint -ht
Disk group: abc
...
dg abc default default 7000 1293718405.26.linux-29
dm df8000_0 df8000_0 auto 65535 4613657328 - <<<<<<<<<<<<<<认出真实大小
[root@linux-29 ~]# vxassist -g abc make vol 2100g
[root@linux-29 ~]# mkfs -t vxfs /dev/vx/rdsk/abc/vol
version 7 layout
4404019200 sectors, 275251200 blocks of size 8192, log size 32768 blocks
largefiles supported
[root@linux-29 ~]# mount -t vxfs /dev/vx/dsk/abc/vol /mnt
[root@linux-29 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
467080344 8413288 434558000 2% /
/dev/sda1 101086 16900 78967 18% /boot
tmpfs 1956076 0 1956076 0% /dev/shm
/dev/vx/dsk/abc/vol 2202009600 330856 2184478136 1% /mnt