Adding new disk to DELL PowerEdge Expandable RAID Controller 2 under Red Hat Linux OS
| Topic ID: 1480 | |
| Created By: | 2007-JAN-10 19:17:21 [Vitaliy] |
| Updated By: | 2007-JAN-10 21:47:37 [Vitaliy] |
| Status: | Open |
| Severity: | Normal |
| Read Only: | No |
|
4958
2007-JAN-10 19:17:21
|
||||
|
Adding new disk to DELL PowerEdge Expandable RAID Controller 2 under Red Hat Linux OS
##
## Before Adding New DISK
##
[root@hostname1 root]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda8 2063504 380732 1577952 20% /
/dev/sda3 194449 21854 162555 12% /boot
none 514224 0 514224 0% /dev/shm
/dev/sda7 1035660 32872 950180 4% /tmp
/dev/sda5 10072456 6957544 2603244 73% /usr
/dev/sda9 10072456 138240 9422548 2% /var
/dev/sda2 2585332 322788 2131216 14% /home
/dev/sda10 9851308 2357524 6993364 26% /u01
/dev/sda11 32621748 27620824 3343824 90% /u02
[root@hostname1 root]#
[root@hostname1 root]# more /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
/proc /proc proc rw 0 0
none /dev/pts devpts rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/sda3 /boot ext2 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/sda7 /tmp ext3 rw 0 0
/dev/sda5 /usr ext3 rw 0 0
/dev/sda9 /var ext3 rw 0 0
/dev/sda2 /home ext3 rw 0 0
/dev/sda10 /u01 ext3 rw 0 0
/dev/sda11 /u02 ext3 rw 0 0
[root@hostname1 root]#
[root@hostname1 root]# more /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext2 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
/dev/sda6 swap swap defaults 0 0
/dev/sda2 /home ext3 defaults 1 2
/dev/sda10 /u01 ext3 defaults 1 2
/dev/sda11 /u02 ext3 defaults 1 2
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
[root@hostname1 root]#
[root@hostname1 root]# more /etc/mtab
/dev/sda8 / ext3 rw 0 0
none /proc proc rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/sda3 /boot ext2 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/sda7 /tmp ext3 rw 0 0
/dev/sda5 /usr ext3 rw 0 0
/dev/sda9 /var ext3 rw 0 0
/dev/sda2 /home ext3 rw 0 0
/dev/sda10 /u01 ext3 rw 0 0
/dev/sda11 /u02 ext3 rw 0 0
[root@hostname1 root]# fdisk -l
Disk /dev/sda: 73.3 GB, 73398878208 bytes
255 heads, 63 sectors/track, 8923 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 332 2626627+ 83 Linux
/dev/sda3 * 333 357 200812+ 83 Linux
/dev/sda4 358 8923 68806395 f Win95 Ext'd (LBA)
/dev/sda5 358 1631 10233373+ 83 Linux
/dev/sda6 1632 1885 2040223+ 82 Linux swap
/dev/sda7 1886 2016 1052226 83 Linux
/dev/sda8 2017 2277 2096451 83 Linux
/dev/sda9 2278 3551 10233373+ 83 Linux
/dev/sda10 3552 4797 10008463+ 83 Linux
/dev/sda11 4798 8923 33142063+ 83 Linux
##
## Adding New DISK
##
## First fire-up PowerEdge Command Line Interface
##
[root@hostname1 net]# afacli
--------------------------------------------------------------------------------
DELL PowerEdge Expandable RAID Controller 2 Command Line Interface
Copyright 1998-2002 Adaptec, Inc. All rights reserved
--------------------------------------------------------------------------------
FASTCMD> controller list
Executing: controller list
Adapter Name Adapter Type Availability Clustering
------------ ------------ ------------ ------------
afa0 PERC 3/Di read/write No
FASTCMD> open afa0
Executing: open "afa0"
AFA0> disk list
Executing: disk list
B:ID:L Device Type Blocks Bytes/Block Usage Shared Rate
------ -------------- --------- ----------- ---------------- ------ ----
0:00:0 Disk 143374650 512 Initialized NO 160
0:01:0 Disk 143374650 512 Initialized NO 160
0:02:0 Disk 71687340 512 Not Initialized NO 160
AFA0> disk initialize 0:02:0
Too many parameters
AFA0> disk initialize 02
Executing: disk initialize (ID=2)
AFA0>
AFA0> disk list
Executing: disk list
B:ID:L Device Type Blocks Bytes/Block Usage Shared Rate
------ -------------- --------- ----------- ---------------- ------ ----
0:00:0 Disk 143374650 512 Initialized NO 160
0:01:0 Disk 143374650 512 Initialized NO 160
0:02:0 Disk 71687340 512 Initialized NO 160
AFA0>
## the next step after the disk is Initialized is to create a new container
##
AFA0> container list
Executing: container list
Num Total Oth Chunk Scsi Partition
Label Type Size Ctr Size Usage B:ID:L Offset:Size
----- ------ ------ --- ------ ------- ------ -------------
0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB
/dev/sda 0:01:0 64.0KB:68.3GB
## to create new container you need to know the size of the
## free space on the disk
##
AFA0> disk show space
Executing: disk show space
Scsi B:ID:L Usage Size
----------- ---------- -------------
0:00:0 Container 64.0KB:68.3GB
0:00:0 Free 68.3GB:7.50KB
0:01:0 Container 64.0KB:68.3GB
0:01:0 Free 68.3GB:7.50KB
0:02:0 Free 64.0KB:34.1GB <== here's the new disk free space
AFA0>
## since I only have one disk I will create a simple volume (not a mirror)
##
AFA0> container create volume ((0,2,0), 34816M)
Executing: container create volume ((BUS=0,ID=2,LUN=0),36,507,222,016 )
Container 1 created at /dev/sdb
AFA0>
AFA0> container list
Executing: container list
Num Total Oth Chunk Scsi Partition
Label Type Size Ctr Size Usage B:ID:L Offset:Size
----- ------ ------ --- ------ ------- ------ -------------
0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB
/dev/sda 0:01:0 64.0KB:68.3GB
1 Volume 34.0GB Valid 0:02:0 64.0KB:34.0GB <=== newly created container
/dev/sdb
AFA0> exit
Executing: exit
[root@hostname1 root]#
## now Linux fdisk can "see" new Disk (see below Disk /dev/sdb)
##
[root@hostname1 root]# fdisk -l
Disk /dev/sda: 73.3 GB, 73398878208 bytes
255 heads, 63 sectors/track, 8923 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 332 2626627+ 83 Linux
/dev/sda3 * 333 357 200812+ 83 Linux
/dev/sda4 358 8923 68806395 f Win95 Ext'd (LBA)
/dev/sda5 358 1631 10233373+ 83 Linux
/dev/sda6 1632 1885 2040223+ 82 Linux swap
/dev/sda7 1886 2016 1052226 83 Linux
/dev/sda8 2017 2277 2096451 83 Linux
/dev/sda9 2278 3551 10233373+ 83 Linux
/dev/sda10 3552 4797 10008463+ 83 Linux
/dev/sda11 4798 8923 33142063+ 83 Linux
Disk /dev/sdb: 36.5 GB, 36507222016 bytes <====== new disk
255 heads, 63 sectors/track, 4438 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
## next -- create partition on top of the new disk
##
[root@hostname1 root]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 4438.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 36.5 GB, 36507222016 bytes
255 heads, 63 sectors/track, 4438 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1 ( you enter p then 1)
First cylinder (1-4438, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4438, default 4438):
Using default value 4438
## verify new partition is created
##
Command (m for help): p
Disk /dev/sdb: 36.5 GB, 36507222016 bytes
255 heads, 63 sectors/track, 4438 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 4438 35648203+ 83 Linux
## this is very important -- use "w" to commit your changes
##
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@hostname1 root]#
## now if we go back to controller command line we should see
## new partition
##
FASTCMD> controller list
Executing: controller list
Adapter Name Adapter Type Availability Clustering
------------ ------------ ------------ ------------
afa0 PERC 3/Di read/write No
FASTCMD> open afa0
Executing: open "afa0"
AFA0>
AFA0> disk show partition
Executing: disk show partition
Scsi Partition Container MultiLevel
B:ID:L Offset:Size Num Type Num Type R/W
------ ------------- --- ------ --- ------ ---
0:00:0 64.0KB:68.3GB 0 Mirror 0 None RW
0:01:0 64.0KB:68.3GB 0 Mirror 0 None RW
0:02:0 64.0KB:34.0GB 1 Volume 0 None RW
AFA0> disk show space
Executing: disk show space
Scsi B:ID:L Usage Size
----------- ---------- -------------
0:00:0 Container 64.0KB:68.3GB
0:00:0 Free 68.3GB:7.50KB
0:01:0 Container 64.0KB:68.3GB
0:01:0 Free 68.3GB:7.50KB
0:02:0 Container 64.0KB:34.0GB
0:02:0 Free 34.0GB: 182MB
AFA0> container list
Executing: container list
Num Total Oth Chunk Scsi Partition
Label Type Size Ctr Size Usage B:ID:L Offset:Size
----- ------ ------ --- ------ ------- ------ -------------
0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB
/dev/sda 0:01:0 64.0KB:68.3GB
1 Volume 34.0GB Valid 0:02:0 64.0KB:34.0GB
/dev/sdb
AFA0> exit
## time to reboot
##
[root@hostname1 root]# reboot
Broadcast message from root (pts/0) (Fri Jan 5 19:33:40 2007):
The system is going down for reboot NOW!
## after reboot verify partition via fdisk
##
[root@hostname1 root]# fdisk -l
Disk /dev/sda: 73.3 GB, 73398878208 bytes
255 heads, 63 sectors/track, 8923 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 332 2626627+ 83 Linux
/dev/sda3 * 333 357 200812+ 83 Linux
/dev/sda4 358 8923 68806395 f Win95 Ext'd (LBA)
/dev/sda5 358 1631 10233373+ 83 Linux
/dev/sda6 1632 1885 2040223+ 82 Linux swap
/dev/sda7 1886 2016 1052226 83 Linux
/dev/sda8 2017 2277 2096451 83 Linux
/dev/sda9 2278 3551 10233373+ 83 Linux
/dev/sda10 3552 4797 10008463+ 83 Linux
/dev/sda11 4798 8923 33142063+ 83 Linux
Disk /dev/sdb: 36.5 GB, 36507222016 bytes
255 heads, 63 sectors/track, 4438 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 4438 35648203+ 83 Linux
[root@hostname1 root]#
## create new mount point
##
[root@hostname1 root]# mkdir /u03
## make new filesystem using /dev/sdb1 partition (we got this from fdisk -l above)
##
[root@hostname1 root]# mke2fs /dev/sdb1
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4456448 inodes, 8912050 blocks
445602 blocks (5.00%) reserved for the super user
First data block=0
272 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
## run tune2fs so that we can mount the new file system in ext3 mode
##
[root@hostname1 root]# tune2fs -j /dev/sdb1
tune2fs 1.32 (09-Nov-2002)
Creating journal inode: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@hostname1 root]#
## finally mount the new filesystem on the /u03 mountpoint
##
[root@hostname1 root]# mount -t ext3 /dev/sdb1 /u03
[root@hostname1 root]#
## enable auto mount in /etc/fstab (to mount on reboot)
##
[root@hostname1 root]# vi /etc/fstab
ADD:
-----
/dev/sdb1 /u03 ext3 defaults 1 2
## test new setup by reboot
##
[root@hostname1 root]# reboot
Broadcast message from root (pts/0) (Fri Jan 5 19:40:17 2007):
The system is going down for reboot NOW!
##
## After Adding New DISK
##
login as: root
Sent username "root"
root@hostname1.domain.com's password:
Last login: Fri Jan 5 19:43:37 2007 from whocares
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda8 2063504 380736 1577948 20% /
/dev/sda3 194449 21854 162555 12% /boot
none 514224 0 514224 0% /dev/shm
/dev/sda7 1035660 32888 950164 4% /tmp
/dev/sda5 10072456 6957544 2603244 73% /usr
/dev/sda9 10072456 138396 9422392 2% /var
/dev/sda2 2585332 322788 2131216 14% /home
/dev/sda10 9851308 2357524 6993364 26% /u01
/dev/sda11 32621748 27620824 3343824 90% /u02
/dev/sdb1 35088776 32828 33273540 1% /u03
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]# more /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
/proc /proc proc rw 0 0
none /dev/pts devpts rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/sda3 /boot ext2 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/sda7 /tmp ext3 rw 0 0
/dev/sda5 /usr ext3 rw 0 0
/dev/sda9 /var ext3 rw 0 0
/dev/sda2 /home ext3 rw 0 0
/dev/sda10 /u01 ext3 rw 0 0
/dev/sda11 /u02 ext3 rw 0 0
/dev/sdb1 /u03 ext3 rw 0 0
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]# more /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext2 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
/dev/sda6 swap swap defaults 0 0
/dev/sda2 /home ext3 defaults 1 2
/dev/sda10 /u01 ext3 defaults 1 2
/dev/sda11 /u02 ext3 defaults 1 2
/dev/sdb1 /u03 ext3 defaults 1 2
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]# more /etc/mtab
/dev/sda8 / ext3 rw 0 0
none /proc proc rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/sda3 /boot ext2 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/sda7 /tmp ext3 rw 0 0
/dev/sda5 /usr ext3 rw 0 0
/dev/sda9 /var ext3 rw 0 0
/dev/sda2 /home ext3 rw 0 0
/dev/sda10 /u01 ext3 rw 0 0
/dev/sda11 /u02 ext3 rw 0 0
/dev/sdb1 /u03 ext3 rw 0 0
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]#
[root@hostname1 root]# fdisk -l
Disk /dev/sda: 73.3 GB, 73398878208 bytes
255 heads, 63 sectors/track, 8923 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
--------------------------------------------------------------------------------
DELL PowerEdge Expandable RAID Controller 2 Command Line Interface
Copyright 1998-2002 Adaptec, Inc. All rights reserved
--------------------------------------------------------------------------------
FASTCMD> open afa0
Executing: open "afa0"
AFA0> disk show partition
Executing: disk show partition
Scsi Partition Container MultiLevel
B:ID:L Offset:Size Num Type Num Type R/W
------ ------------- --- ------ --- ------ ---
0:00:0 64.0KB:68.3GB 0 Mirror 0 None RW
0:01:0 64.0KB:68.3GB 0 Mirror 0 None RW
0:02:0 64.0KB:34.0GB 1 Volume 0 None RW
AFA0> container list
Executing: container list
Num Total Oth Chunk Scsi Partition
Label Type Size Ctr Size Usage B:ID:L Offset:Size
----- ------ ------ --- ------ ------- ------ -------------
0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB
/dev/sda 0:01:0 64.0KB:68.3GB
1 Volume 34.0GB Open 0:02:0 64.0KB:34.0GB
/dev/sdb
AFA0> exit
Executing: exit
[root@hostname1 root]#
REFERENCE:
http://mypage.bluewin.ch/a-z/dazdaz/linux_dell_afacli.html
http://docs.us.dell.com/support/edocs/storage/57kgr/cli/en/index.htm
http://www.performancewiki.com/linux-tuning.html
[edited by: Vitaliy at 21:47 (CST) on Jan. 10, 2007]