Configure new disk: Difference between revisions

From DISI
Jump to navigation Jump to search
(Created page with "=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...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 36: Line 36:
  ctrl slot=1 create type=ld drives=4E:1:1-4E: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)
(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
create physical volume
  command
  pvcreate /dev/sdd
pvcreate /dev/sde


create volume group
create volume group
  command here
  vgcreate nfs_store_vg /dev/sde
vgcreate nfs_db_vg /dev/sdd
 


create logical volume  
create logical volume  
  command here
  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
create file system on logical volume
  command here
  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
add fstab and mount
  instructions here
  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
nfsexports, restart nfsd
  instructions here
  /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
mount everywhere
Line 60: Line 77:




[[Category:Internal]]
[[Category:Sysadmin]]

Latest revision as of 20:16, 14 February 2014

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