Specifications

4) RAID card settings: Native Command Queuing (NCQ)
is supposed to offer better performance by letting the drive
electronics reorder commands for optimized disk access. I
have found that NCQ is not always enabled by default on
the 3ware controllers. It can be turned on manually using
the queuing check box in the Controller Settings page of
3dm or via tw_cli:
# tw_cli /c0/u0 set qpolicy = on
The current setting can be verified on a per-drive basis via
3dm or by using tw_cli:
# tw_cli /c0/p5 show ncq
/c0/p5 NCQ Supported = Yes
/c0/p5 NCQ Enabled = Yes
5) Linux kernel settings: 3ware’s knowledge base has arti-
cles that mention several kernel settings that are supposed
to improve performance over the defaults, but I have not
tried any of those myself.
6) Operational issues: despite all 16 disks being the same
type and firmware version, some of them failed to display their
model number properly in the various 3ware interfaces. For
example, most of the disk model numbers are displayed cor-
rectly—for example, ST31000340AS. But, several show “ST3
INVALID PFM” in the model field. You can see this in the
tw_cli interface. For instance, port 4 displays the model
number properly, but port 5 does not:
# tw_cli /c0/p4 show model
/c0/p4 Model = ST31000340AS
# tw_cli /c0/p5 show model
/c0/p5 Model = ST3_INVALID_PFM
This situation would be intolerable in a system with a mix
of drive types, as it would be difficult to determine which drive
type was plugged in to which port. I was able to determine
that the problem was with the drive firmware version and
upgraded all the drives that exhibited this behavior.
As the system already was in active use before I deter-
mined that the firmware was the issue, I needed a way to
upgrade each drive while keeping the system running. I could
not simply upgrade the drives while they were part of an
active disk array, as Seagate claims the upgrade could destroy
data. I used the 3ware interface to remove the problem drive,
which then forced the hot spare to replace it. The RAID con-
troller automatically started to rebuild the RAID 5 array using
the hot spare. I then physically removed the drive from the
chassis and upgraded the drive firmware using another com-
puter. After the upgrade, I re-inserted the drive and desig-
nated it as the new hot spare. The array rebuild operation
took something like six hours to complete, and as I could
remove and upgrade only one drive at a time, I was limited
to one drive upgrade a day.
Conclusion
I have been using this system in production for several months
and have consumed only a fraction of the available space:
# df -t xfs
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 13566738304 2245371020 11321367284 17% /backup
I am quite happy with the result, as I have plenty of room
to add more systems to the backup schedule, and I am confi-
dent I will not lose any backups due to hardware failures.
I
Eric Pearce is the IT Lead for AmberPoint, Inc, an SOA governance software company based in
Oakland, California. He has authored several books on UNIX and Windows system administration
for O’Reilly & Associates.
The script command is used to log an entire session. Type the
command
script
at the command prompt, and script then copies
everything you type and its response to the file typescript. Script
starts a sub-shell; when you want to stop saving the session, end
the sub-shell (normally with Ctrl-D or by typing
exit
).
A very useful feature of the script command is that it can
output timing information to a separate file. The script and
the timing information then can be used to replay the script.
The following example creates a script and timing data
(timing data is always written to standard error):
$ script -t 2> timinginfo
Script started, file is typescript
$ ls
Desktop test scripts redbooks
$ pwd
/home/jagadish
$ hostname
homepc
$ exit
exit
Script done, file is typescript
The entire terminal session then can be replayed later (with
exact timing) using the
scriptreplay
command:
$ scriptreplay timinginfo
$ ls
Desktop test scripts redbooks
$ pwd
/home/jagadish
$ hostname
homepc
$ exit
exit
Script is a useful tool for training and educational purposes.
—JAGADISH KAVUTURU
TECH TIP
Capture and Play Back Your Session
www.linuxjournal.com august 2008 | 67