Configure new disk

From DISI
Revision as of 17:40, 21 November 2012 by Frodo (talk | contribs)
Jump to navigation Jump to search

Configure new disk

High level description

  • 0.1) remove the disk in the db array as a spare from the system array (this was a workaround for something strange)
  • 0.2) assign the spare disk in the work array as a spare
  • 1) create new raid 1+0 arrays for each chassis then assign slot 25 as a spare
  • 2) assign each to a physical volume
  • 3) create a volume group for each
  • 4) create a logical volume for each
  • 5) create a file system on the logical volume
  • 6) Add to fstab & mount
  • 7) Add to nfs exports and restart nfsd

Steps 0.1 though 1 are done using the HP controller proprietary software. the rest are done as root on the command line

Note

  • 1) there is a spare assigned to array A
  • 2) everything is working off of the controller in "slot 1" (the good one)
  • 3) the dell box does not know how to distinguish drives (the IDs are all the same)
  • 4) we have lots of spares

Command line description

As root on fawlty:

/opt/compaq/hpacucli/bld/hpacucli

then inspect the current configuration:

ctrl all show config

To remove the spare let's just remove all spares (we haven't assigned any important ones yet) run the following command:

ctrl slot=1 array A remove spares=all

create arrays (logical disk with all the disks in a specific chassis)

ctrl slot=1 create type=ld drives=1E:1:1-1E:1:24 raid=1+0
ctrl slot=1 create type=ld drives=4E:1:1-4E:1:24 raid=1+0

(for the second array)

add spares

ctrl slot=1 array A add spares=3E:1:25
ctrl slot=1 array D add spares=1E:1:25
ctrl slot=1 array E add spares=3E:1:25

create physical volume

pvcreate /dev/sdd
pvcreate /dev/sde

create volume group

vgcreate nfs_store_vg /dev/sde
vgcreate nfs_db_vg /dev/sdd


create logical volume

lvcreate -n nfs_db_lv -l 100%FREE nfs_db_vg
lvcreate -n nfs_store_lv -l 100%FREE nfs_store_vg

create file system on logical volume

mkfs.xfs -L nfs_db /dev/mapper/nfs_db_vg-nfs_db_lv
mkfs.xfs -L nfs_store /dev/mapper/nfs_store_vg-nfs_store_lv

add fstab and mount

LABEL=nfs_db                /nfs/db                          xfs        rw,noatime,quota 0 0
LABEL=nfs_store                /nfs/store                  xfs        rw,noatime,quota 0 0

then

mkdir -pv /nfs/db
mkdir -pv /nfs/store
mount -at xfs

nfsexports, restart nfsd

/nfs/db 10.10.0.0/16(rw,sync,fsid=1002) 142.150.84.128/27(rw,sync,fsid=1002) 
/nfs/store 10.10.0.0/16(rw,sync,fsid=1003) 142.150.84.128/27(rw,sync,fsid=1003)

then

service nfs reload

mount everywhere

instructions here