Linux服務器由于應用變更或需求的緣故,有可能出現(xiàn)分區(qū)空間不足的情況,此時往往需要進行擴容(要增加分區(qū)的空間),而采用LVM的好處就是可以在不需停機的情況下可以方便地調(diào)整各個分區(qū)大小。如下所示,分區(qū)/u05由于備份集保留的時間調(diào)整,RMAN備份時出現(xiàn)空間不足的情況,如下所示,
[root@getlnx01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
97G 37G 55G 41% /
/dev/mapper/VolGroup01-LogVol00
79G 33G 43G 44% /u01
/dev/mapper/VolGroup02-LogVol00
197G 168G 19G 90% /u02
/dev/mapper/VolGroup03-LogVol00
197G 127G 60G 68% /u03
/dev/mapper/VolGroup04-LogVol00
138G 126G 5.6G 96% /u04
/dev/mapper/VolGroup05-LogVol00
178G 104G 65G 62% /u05
/dev/sda1 99M 23M 71M 25% /boot
tmpfs 12G 0 12G 0% /dev/shm
[root@getlnx01 ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup05" using metadata type lvm2
Found volume group "VolGroup04" using metadata type lvm2
Found volume group "VolGroup03" using metadata type lvm2
Found volume group "VolGroup02" using metadata type lvm2
Found volume group "VolGroup01" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
[root@getlnx01 ~]#
我在添加了一塊虛擬磁盤后(虛擬機),此時使用fdisk -l查不到剛剛添加的新磁盤,此時需要運行命令echo "- - -" > /sys/class/scsi_host/host0/scan重新掃描該接口下的SCSI磁盤設備。
關于該命令它是通過/sys下的屬性設置運行SCSI掃描。echo "- - -" > scan "- - -"代表channel,target和LUN編號。以上命令會導致hba4下所有channel,target以及可見LUN被掃描。
[root@getlnx01 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@getlnx01 ~]# fdisk -l
Disk /dev/sda: 55.8 GB, 55834574848 bytes
255 heads, 63 sectors/track, 6788 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6788 54420187+ 8e Linux LVM
Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 10443 83883366 5 Extended
/dev/sdb5 1 10443 83883334+ 83 Linux
Disk /dev/sdd: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 26108 209712478+ 5 Extended
/dev/sdd5 1 26108 209712447 83 Linux
Disk /dev/sdc: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 26108 209712478+ 5 Extended
/dev/sdc5 1 26108 209712447 83 Linux
Disk /dev/sdf: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 7832 62910508+ 5 Extended
/dev/sdf5 1 7832 62910477 83 Linux
Disk /dev/sde: 150.3 GB, 150323855360 bytes
255 heads, 63 sectors/track, 18275 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
新聞熱點
疑難解答
圖片精選