WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use

由于用户希望使用SSD盘代替普通硬盘测试数据库性能,在迁移挂盘过程中中发linux  fdisk命令 不支持GPT 分区形式,整个过程记录如下:

存储盘挂在上之后,使用fdisk -l 出现warning

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT.Use GNU Parted.
Disk /dev/sdd: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 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: 0x00000000
   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1   209715199   104857599+  ee  GPT

pvcreate  失败


根据提示建议使用GNU Parted分区方式:

shxxora05:/dev # parted /dev/sdd
GNU Parted 2.3
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel GPT                                                      
Warning: The existing disk label on /dev/sdd will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes                                                               
(parted) p                                                                
Model: DGC VRAID (scsi)
Disk /dev/sdd: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: GPT

Number  Start  End  Size  File system  Name  Flags                  
(parted) mkpart
Partition name?  []? ora_ssd                                              
File system type?  [ext2]? ext3                                           
Start? 0                                                                  
End? 100G
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? ignore                                                     
(parted) p                                                                
Model: DGC VRAID (scsi)
Disk /dev/sdd: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  100GB  100GB               ora_ssd

(parted) quit


正常停库后,后续分区、挂在、迁移记录之,当做记录查阅:

#检查迁移前分区信息,并create vg/pv/lv/
oracle@shxxxora05:~> df -h
Filesystem                             Size  Used Avail Use% Mounted on
/dev/sda2                               40G   11G   27G  29% /
udev                                    16G  120K   16G   1% /dev
tmpfs                                   28G  827M   28G   3% /dev/shm
shmfs                                   28G  827M   28G   3% /dev/shm
/dev/mapper/oraclevg-oraclelv   89G   58G   27G  69% /ora

#以下均为root操作
#在ssd上创建pv

pvcreate /dev/sdd1

#在ssd上创建vg
vgcreate oracle_ssdvg /dev/sdd1

#在ssd上创建lv
lvcreate -L 100G -n oracle_ssdlv  oracle_ssdvg

#格式化ssd盘为ext3格式
mkfs.ext3 /dev/oracle_ssdvg/oracle_ssdlv

#准备迁移数据库程序文件及数据文件
cd /ora
tar -cvf /ora/u01.tar u01

#root operatoion
mount /dev/oracle_ssdvg/oracle_ssdlv /ora_ssd
cp /ora/u01.tar /ora_ssd/
cd /ora/
cp -p -R /ora/u02/ /ora_ssd/
cp -p -R /ora/u05/ /ora_ssd/

【注】-p 能保留权限

#卸载原有普通硬盘分区/ora
umount /ora

#挂在ssd分区到/ora 目录
mount /dev/oracle_ssdvg/oracle_ssdlv /ora

#Oracle用户操作
#最后启动数据库和监听及OEM等其他程序

你可能感兴趣的:(linux)