Steps of creating the GPT partitioning:
[root@system1 ~]# fdisk -l | grep -i "Disk /dev" | grep -v mapper
Disk /dev/sda: 146.7 GB, 146748211200 bytes
Disk /dev/sdc: 214.8 GB, 214754656256 bytes
Disk /dev/sdb: 536.9 GB, 536873009152 bytes
[root@system1 ~]#
Scanning and detecting newly added disk:
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host
host0/ host1/ host2/
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
[root@system1 ~]#
[root@system1 ~]# fdisk -l | grep -i "Disk /dev"
Disk /dev/sda: 146.7 GB, 146748211200 bytes
Disk /dev/sdc: 214.8 GB, 214754656256 bytes
Disk /dev/sdb: 536.9 GB, 536873009152 bytes
Disk /dev/sdd: 2418.9 GB, 2418925580288 bytes
[root@system1 ~]#
As the added disk in of more than 2 TB, you need to use "parted" command for the partitioning:
[root@system1 ~]# parted /dev/sdd
GNU Parted 2.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) print
Error: /dev/sdd: unrecognised disk label
(parted)
(parted) mklabel gpt
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2419GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted)
(parted) unit TB
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2.42TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted)
(parted) mkpart primary 0.00TB 2.42TB
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2.42TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00TB 2.42TB 2.42TB primary
(parted)
(parted) set 1 lvm on
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2.42TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00TB 2.42TB 2.42TB primary lvm
(parted)
(parted) quit
Information: You may need to update /etc/fstab.
[root@system1 ~]#
Rest of the process is as usual:
[root@system1 ~]# pvcreate /dev/sdd1
Physical volume "/dev/sdd1" successfully created
[root@system1 ~]#
[root@system1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 vg_sys1 lvm2 a--u 135.97g 12.42g
/dev/sdb1 VolGroup01 lvm2 a--u 500.00g 0
/dev/sdc1 VolGroup01 lvm2 a--u 200.00g 0
/dev/sdd1 lvm2 ---- 2.20t 2.20t
[root@system1 ~]#
[root@system1 ~]# df -h /s01
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
689G 449G 205G 69% /s01
[root@system1 ~]#
[root@system1 ~]# vgextend VolGroup01 /dev/sdd1
Volume group "VolGroup01" successfully extended
[root@system1 ~]#
[root@system1 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup01 3 1 0 wz--n- 2.88t 2.20t
vg_sys1 1 2 0 wz--n- 135.97g 12.42g
[root@system1 ~]#
[root@system1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 vg_sys1 lvm2 a--u 135.97g 12.42g
/dev/sdb1 VolGroup01 lvm2 a--u 500.00g 0
/dev/sdc1 VolGroup01 lvm2 a--u 200.00g 0
/dev/sdd1 VolGroup01 lvm2 a--u 2.20t 2.20t
[root@system1 ~]#
[root@system1 ~]# df -T /s01
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
ext4 722347096 470709100 214941016 69% /s01
[root@system1 ~]#
[root@system1 ~]# vgdisplay VolGroup01 | grep -i free
Free PE / Size 576716 / 2.20 TiB
[root@system1 ~]#
[root@system1 ~]# lvextend -l +100%FREE /dev/mapper/VolGroup01-LogVol00
Size of logical volume VolGroup01/LogVol00 changed from 699.99 GiB (179198 extents) to 2.88 TiB (755914 extents).
Logical volume LogVol00 successfully resized.
[root@system1 ~]#
[root@system1 ~]# resize2fs /dev/mapper/VolGroup01-LogVol00
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup01-LogVol00 is mounted on /s01; on-line resizing required
old desc_blocks = 44, new_desc_blocks = 185
Performing an on-line resize of /dev/mapper/VolGroup01-LogVol00 to 774055936 (4k) blocks.
The filesystem on /dev/mapper/VolGroup01-LogVol00 is now 774055936 blocks long.
[root@system1 ~]#
[root@system1 ~]# df -h /s01
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
2.9T 449G 2.3T 17% /s01
[root@system1 ~]#
[root@system1 ~]# fdisk -l | grep -i "Disk /dev" | grep -v mapper
Disk /dev/sda: 146.7 GB, 146748211200 bytes
Disk /dev/sdc: 214.8 GB, 214754656256 bytes
Disk /dev/sdb: 536.9 GB, 536873009152 bytes
[root@system1 ~]#
Scanning and detecting newly added disk:
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host
host0/ host1/ host2/
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@system1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
[root@system1 ~]#
[root@system1 ~]# fdisk -l | grep -i "Disk /dev"
Disk /dev/sda: 146.7 GB, 146748211200 bytes
Disk /dev/sdc: 214.8 GB, 214754656256 bytes
Disk /dev/sdb: 536.9 GB, 536873009152 bytes
Disk /dev/sdd: 2418.9 GB, 2418925580288 bytes
[root@system1 ~]#
As the added disk in of more than 2 TB, you need to use "parted" command for the partitioning:
[root@system1 ~]# parted /dev/sdd
GNU Parted 2.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) print
Error: /dev/sdd: unrecognised disk label
(parted)
(parted) mklabel gpt
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2419GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted)
(parted) unit TB
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2.42TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted)
(parted) mkpart primary 0.00TB 2.42TB
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2.42TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00TB 2.42TB 2.42TB primary
(parted)
(parted) set 1 lvm on
(parted)
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdd: 2.42TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00TB 2.42TB 2.42TB primary lvm
(parted)
(parted) quit
Information: You may need to update /etc/fstab.
[root@system1 ~]#
Rest of the process is as usual:
[root@system1 ~]# pvcreate /dev/sdd1
Physical volume "/dev/sdd1" successfully created
[root@system1 ~]#
[root@system1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 vg_sys1 lvm2 a--u 135.97g 12.42g
/dev/sdb1 VolGroup01 lvm2 a--u 500.00g 0
/dev/sdc1 VolGroup01 lvm2 a--u 200.00g 0
/dev/sdd1 lvm2 ---- 2.20t 2.20t
[root@system1 ~]#
[root@system1 ~]# df -h /s01
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
689G 449G 205G 69% /s01
[root@system1 ~]#
[root@system1 ~]# vgextend VolGroup01 /dev/sdd1
Volume group "VolGroup01" successfully extended
[root@system1 ~]#
[root@system1 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup01 3 1 0 wz--n- 2.88t 2.20t
vg_sys1 1 2 0 wz--n- 135.97g 12.42g
[root@system1 ~]#
[root@system1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 vg_sys1 lvm2 a--u 135.97g 12.42g
/dev/sdb1 VolGroup01 lvm2 a--u 500.00g 0
/dev/sdc1 VolGroup01 lvm2 a--u 200.00g 0
/dev/sdd1 VolGroup01 lvm2 a--u 2.20t 2.20t
[root@system1 ~]#
[root@system1 ~]# df -T /s01
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
ext4 722347096 470709100 214941016 69% /s01
[root@system1 ~]#
[root@system1 ~]# vgdisplay VolGroup01 | grep -i free
Free PE / Size 576716 / 2.20 TiB
[root@system1 ~]#
[root@system1 ~]# lvextend -l +100%FREE /dev/mapper/VolGroup01-LogVol00
Size of logical volume VolGroup01/LogVol00 changed from 699.99 GiB (179198 extents) to 2.88 TiB (755914 extents).
Logical volume LogVol00 successfully resized.
[root@system1 ~]#
[root@system1 ~]# resize2fs /dev/mapper/VolGroup01-LogVol00
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup01-LogVol00 is mounted on /s01; on-line resizing required
old desc_blocks = 44, new_desc_blocks = 185
Performing an on-line resize of /dev/mapper/VolGroup01-LogVol00 to 774055936 (4k) blocks.
The filesystem on /dev/mapper/VolGroup01-LogVol00 is now 774055936 blocks long.
[root@system1 ~]#
[root@system1 ~]# df -h /s01
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
2.9T 449G 2.3T 17% /s01
[root@system1 ~]#
No comments:
Post a Comment