sun服务器文件系统扩容,应用服务器侧扩容LUN(Solaris)

执行cfgadm -al命令扫描映射到主机的LUN。

root@solaris:~# cfgadm -al

Ap_Id Type Receptacle Occupant Condition

c2 scsi-sas connected configured unknown

c2::dsk/c2t6d0 CD-ROM connected configured unknown

c4 scsi-sas connected configured unknown

c4::w5000cca0258a82e5,0 disk-path connected configured unknown

c5 scsi-sas connected unconfigured unknown

c6 scsi-sas connected configured unknown

c6::w5000cca02570b521,0 disk-path connected configured unknown

c7 scsi-sas connected unconfigured unknown

c10 fc-private connected configured unknown

c10::20080022a10bc14f disk connected configured unknown

c11 fc connected unconfigured unknown

usb0/1 unknown empty unconfigured ok

usb0/2 unknown empty unconfigured ok

usb0/3 unknown empty unconfigured ok

usb1/1 unknown empty unconfigured ok

usb1/2 unknown empty unconfigured ok

usb2/1 unknown empty unconfigured ok

usb2/2 usb-hub connected configured ok

usb2/2.1 unknown empty unconfigured ok

usb2/2.2 unknown empty unconfigured ok

usb2/2.3 usb-hub connected configured ok

usb2/2.3.1 unknown empty unconfigured ok

usb2/2.3.2 usb-storage connected configured ok

usb2/2.3.3 usb-communi connected configured ok

usb2/2.4 usb-device connected configured ok

usb2/3 unknown empty unconfigured ok

usb2/4 usb-hub connected configured ok

usb2/4.1 unknown empty unconfigured ok

usb2/4.2 unknown empty unconfigured ok

usb2/4.3 unknown empty unconfigured ok

usb2/4.4 unknown empty unconfigured ok

usb2/5 unknown empty unconfigured ok

执行umount /mnt/命令卸载待扩容LUN在应用服务器上对应的磁盘。

/mnt/为待扩容LUN对应磁盘的挂载目录。

ebc2630080ad5be7299f5ea976a21d86.png说明:

若待扩容LUN对应磁盘未挂载,可跳过此操作。

执行format命令,浏览当前应用服务器识别到的所有磁盘信息。

root@solaris:~# format

Searching for disks...done

AVAILABLE DISK SELECTIONS:

0. c0t5000CCA0258A82E4d0 solaris

/scsi_vhci/disk@g5000cca0258a82e4

/dev/chassis//SYS/HDD0/disk

1. c0t5000CCA02570B520d0 solaris

/scsi_vhci/disk@g5000cca02570b520

/dev/chassis//SYS/HDD4/disk

2. c10t5d0

/pci@400/pci@2/pci@0/pci@a/SUNW,qlc@0/fp@0,0/ssd@w20080022a10bc14f,0

3. c10t5d1

/pci@400/pci@2/pci@0/pci@a/SUNW,qlc@0/fp@0,0/ssd@w20080022a10bc14f,1

Specify disk (enter its number):

在上面的回显中,c10t5d1为待扩容LUN映射给应用服务器的盘符。

在“Specify disk (enter its number)”后输入c10t5d1盘符对应的ID“3”。

Specify disk (enter its number): 3

selecting c10t5d1

[disk formatted]

Note: detected additional allowable expansion storage space that can be

added to current SMI label's computed capacity.

Select to adjust the label capacity.

FORMAT MENU:

disk - select a disk

type - select (define) a disk type

partition - select (define) a partition table

current - describe the current disk

format - format and analyze the disk

repair - repair a defective sector

label - write label to the disk

analyze - surface analysis

defect - defect list management

backup - search for backup labels

verify - read and display labels

save - save new disk/partition definitions

inquiry - show disk ID

volname - set 8-character volume name

! - execute , then return

quit

format>

执行type命令查看磁盘类型。

format> type

AVAILABLE DRIVE TYPES:

0. Auto configure

1. Quantum ProDrive 80S

2. Quantum ProDrive 105S

3. CDC Wren IV 94171-344

4. SUN0104

5. SUN0207

6. SUN0327

7. SUN0340

8. SUN0424

9. SUN0535

10. SUN0669

11. SUN1.0G

12. SUN1.05

13. SUN1.3G

14. SUN2.1G

15. SUN2.9G

16. Zip 100

17. Zip 250

18. Peerless 10GB

19. SUN300G

20. HUAWEI-XXXXXX-2201

21. other

Specify disk type (enter its number)[20]:

在“Specify disk type (enter its number)[20]:”后输入“0”可对磁盘进行自动更新,重新定义磁盘类型,同时刷新磁盘容量。

Specify disk type (enter its number)[20]: 0

c10t5d1: configured with capacity of 59.98GB

selecting c10t5d1

[disk formatted]

操作完成后,磁盘容量将变为LUN扩容后的容量,即60GB。

先执行partition命令,再执行print命令查看磁盘的分区情况。

format> partition

PARTITION MENU:

0 - change `0' partition

1 - change `1' partition

2 - change `2' partition

3 - change `3' partition

4 - change `4' partition

5 - change `5' partition

6 - change `6' partition

7 - change `7' partition

select - select a predefined table

modify - modify a predefined partition table

name - name the current table

print - display the current table

label - write partition map and label to the disk

! - execute , then return

quit

partition> print

Current partition table (default):

Total disk cylinders available: 7678 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

0 root wm 0 - 15 128.00MB (16/0/0) 262144

1 swap wu 16 - 31 128.00MB (16/0/0) 262144

2 backup wu 0 - 7677 59.98GB (7678/0/0) 125796352

3 unassigned wm 0 0 (0/0/0) 0

4 unassigned wm 0 0 (0/0/0) 0

5 unassigned wm 0 0 (0/0/0) 0

6 usr wm 32 - 7677 59.73GB (7646/0/0) 125272064

7 unassigned wm 0 0 (0/0/0) 0

ebc2630080ad5be7299f5ea976a21d86.png说明:

通常,“Part”编号为“2”的分区代表映射给应用服务器的整个磁盘。

先执行l命令,再输入“y”,给扩容LUN打上标签。

partition> l

Ready to label disk, continue? y

执行mount /dev/dsk/c10t5d1s6 /mnt/命令挂载磁盘。

执行growfs -M /mnt /dev/rdsk/c10t5d1s6命令可对待扩容LUN上的文件系统进行扩容。

root@solaris:~# growfs -M /mnt /dev/rdsk/c10t5d1s6

/dev/rdsk/c10t5d1s6: 125272064 sectors in 20390 cylinders of 48 tracks, 128 sectors

61168.0MB in 1275 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)

super-block backups (for fsck -F ufs -o b=#) at:

32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,

Initializing cylinder groups:

.........................

super-block backups for last 10 cylinder groups at:

124360864, 124459296, 124557728, 124656160, 124754592, 124853024, 124951456,

125049888, 125148320, 125246752

执行df -k命令可查看文件系统的容量。

root@solaris:~# df -k

Filesystem 1024-blocks Used Available Capacity Mounted on

rpool/ROOT/solaris 103219200 2269688 79378520 3% /

/devices 0 0 0 0% /devices

/dev 0 0 0 0% /dev

ctfs 0 0 0 0% /system/contract

proc 0 0 0 0% /proc

mnttab 0 0 0 0% /etc/mnttab

swap 30640088 2272 30637816 1% /system/volatile

objfs 0 0 0 0% /system/object

sharefs 0 0 0 0% /etc/dfs/sharetab

fd 0 0 0 0% /dev/fd

rpool/ROOT/solaris/var

103219200 200868 79378520 1% /var

swap 30637816 0 30637816 0% /tmp

rpool/VARSHARE 103219200 48 79378520 1% /var/share

rpool/export 103219200 32 79378520 1% /export

rpool/export/home 103219200 31 79378520 1% /export/home

rpool 103219200 73 79378520 1% /rpool

/dev/dsk/c2t6d0s2 694700 694700 0 100% /media/Oracle_Solaris-11_1-Text-SPARC

/dev/dsk/c10t5d1s6 61687396 61185 61120192 1% /mnt

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值