- 论坛徽章:
- 0
|
特别要感谢doging老师的耐心讲解
特别要感谢doging老师的一次又一次耐心讲解,
wuqing老师的友情提示,
东方蜘蛛老师的指点
yuhuohu老师提示散分地友情出演
以及很多未提到的本贴中各位热情参与的朋友和老师们,谢谢你们
正因为有了你们,成功了。
不过在T1上如果所有分区都用给数据,未分出空余分区给metadb的情况下,
就大概没治了吧?这种情况各位有什么建议么?
在 /export/home2(c0t1d0s6)数据保留的情况下, 把另外的硬盘的剩余空间c0t0d0s3拉过来扩容
成功。分区情况:
c0t0d0: 剩余空间分区 s3 49.2G
metadb分区 s4 149M
c0t1d0: 剩余空间分区 s6 68.25G
metadb分区 s7 104M
0.已挂载s6
#df -h
Filesystem size used avail capacity Mounted on
。。。
/dev/dsk/c0t1d0s6 67G 64M 66G 1% /export/home2
。。。
# pwd
/export/home2
# ls
lost+found test
# more test
abcdefg 123456789
q
1。建立metadb备份
# metadb -a -f -c 2 c0t0d0s7
# metadb -a -f -c 2 c0t0d0s4
# metadb
flags first blk block count
a u 16 8192 /dev/dsk/c0t1d0s7
a u 8208 8192 /dev/dsk/c0t1d0s7
a u 16 8192 /dev/dsk/c0t0d0s4
a u 8208 8192 /dev/dsk/c0t0d0s4
# metastat
2。建立条状串连(T1的s6数据必须在挂载状态)
# metainit -f d0 2 1 c0t1d0s6 1 c0t0d0s3
d0: Concat/Stripe is setup
# metastat
d0: Concat/Stripe
Size: 246320256 blocks (117 GB)
Stripe 0:
Device Start Block Dbase Reloc
c0t1d0s6 0 No Yes
Stripe 1:
Device Start Block Dbase Reloc
c0t0d0s3 0 No Yes
Device Relocation Information:
Device Reloc Device ID
c0t1d0 Yes id1,sd@n5000cca0007a5690
c0t0d0 Yes id1,sd@n5000cca00083a334
查看建立以后空间大小改变没
# df -h
Filesystem size used avail capacity Mounted on
。。。
/dev/dsk/c0t1d0s6 67G 64M 66G 1% /export/home2
。。。
3。更新dev src 条状串联
# umount /export/home2
# mount /dev/md/dsk/d0 /export/home2
# df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 67G 64M 66G 1% /export/home2
大小未变,按照预定计划,把T0的s3头部连在了T1的s6的尾部
# ls -lp
total 8
drwxr-xr-x 3 root root 512 Apr 24 2009 home/
drwxr-xr-x 2 root root 512 Jan 7 10:23 home1/
drwxr-xr-x 3 root root 512 Jan 7 13:09 home2/
drwxr-xr-x 2 root root 512 Mar 31 2009 install/
# cd home2
# ls
lost+found test
# more test
abcdefg 123456789
q
数据都保留了
# cd /export
# ls
home home1 home2 install
# pwd
/export
4.扩容在线设备
# growfs -M /export/home2 /dev/md/rdsk/d0
Warning: 4992 sector(s) in last cylinder unallocated
/dev/md/rdsk/d0: 246320256 sectors in 40092 cylinders of 48 tracks, 128 sectors
120273.6MB in 2506 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:
245366816, 245465248, 245563680, 245662112, 245760544, 245858976, 245957408,
246055840, 246154272, 246252704
完成
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 15G 10G 4.3G 71% /
。。。
/dev/md/dsk/d0 116G 64M 115G 1% /export/home2
。。。
# pwd
/export
# cd home2
# ls
lost+found test
# more test
abcdefg 123456789
q
为了能reboot后自动挂载,修改原mount point 和 device
# vi /etc/vfstab
"/etc/vfstab" 13 lines, 493 characters
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
。。。
/dev/md/dsk/d0 /dev/md/rdsk/d0 /export/home2 ufs 3 yes -
。。。
~
"/etc/vfstab" 13 lines, 486 characters |
评分
-
查看全部评分
|