robert mckennon | 1 Feb 2011 21:50
Picon

hot swap drive

believe it or not, I have never actually swapped out a hard-drive in a
raided system.
I have a HP Proliant ML350 G4p running RHEL 5.3  with a bad drive in a raid-5.

It says it's hot-swappable....  but is that the best practice, or
should I shut down and then replace the drive?

Any recommendations would be appreciated.

Rob.

---------------------------------------------------------------------
Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
Unsubscribe  list-unsubscribe@...

robert mckennon | 1 Feb 2011 21:56
Picon

Re: hot swap drive

Good point!

On Tue, Feb 1, 2011 at 3:55 PM, Tom Allen <tom.allen@...> wrote:
> If it's hot swappable, hot swap it.  You'd hate to power down those drives
> and find that another one won't spin back up on your next boot.
>
> --
> Tom
>
> On Tue, 1 Feb 2011, robert mckennon wrote:
>
>> believe it or not, I have never actually swapped out a hard-drive in a
>> raided system.
>> I have a HP Proliant ML350 G4p running RHEL 5.3  with a bad drive in a
>> raid-5.
>>
>> It says it's hot-swappable....  but is that the best practice, or
>> should I shut down and then replace the drive?
>>
>> Any recommendations would be appreciated.
>>
>> Rob.
>>
>> ---------------------------------------------------------------------
>> Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
>> RSS Feed     http://www.mail-archive.com/list-QVYiWngmsdMdnm+yROfE0A <at> public.gmane.org/maillist.xml
>> Unsubscribe  list-unsubscribe@...
>>
>>
>
(Continue reading)

William L. Thomson Jr. | 1 Feb 2011 22:02
Favicon

Re: hot swap drive

On Tue, 2011-02-01 at 15:50 -0500, robert mckennon wrote:
> believe it or not, I have never actually swapped out a hard-drive in a
> raided system.

We all have our first time with something at some point. No one was born
knowing or having done it all before ;)

> I have a HP Proliant ML350 G4p running RHEL 5.3  with a bad drive in a raid-5.

Assuming you have a HP Smart Array controller or some RAID controller.

> It says it's hot-swappable....  but is that the best practice, or
> should I shut down and then replace the drive?

If the machine is still running, usually the drive will already be taken
out of use by the  raid controller. Which if thats the case, red light
vs green, or could be another color on the drive in question. Then you
can safely remove the drive and add back a new one. If using HP Smart
Arrays can use the hpacucli to check status, make changes, etc to the
array while the machine is up and running.

If you want you can take it down. Though you might find yourself with
more than one bad drive going that route. I would just swap out the
drive now with a known good one. Let it do its thing, once its back in
use and you have a spare again. If you want to be really cautious and
can take down the server. Then a reboot can't hurt. It will
re-initialize controller and do a test on most all drives.

Last time I lost a drive for some reason it cause the server to lock up.
Though that was before any attempt to replace the drive. A reboot
(Continue reading)

Tim Holloway | 1 Feb 2011 22:17
Favicon

Re: hot swap drive

Two separate years running I had RAID drives blow out while I was on
vacation and a second RAID drive blow out before I got back. Meaning I
had to rebuild the whole $%#%!!! thing from scratch both times.

The HP hotswap drives I worked with were packaged such that pressing the
drive's quick-release lever would power it down clean. Of course, since
the drive was supposedly kaput, that was a lesser concern, but it's
always possible to press the wrong lever (whoops!).

My bigger problem was in finding exact-match replacement disks after a
year or 2 of service. You'd think in a company with over 1200 people in
it, someone might have a spare. But unfortunately, most of them weren't
into 10K RPM hot-swap servers. To say nothing of tape library units.

At least with Linux, heterogeneous RAID isn't an issue.

William, if you have 2 spares, you ought to consider RAID-6. It can
handle cases like what I was getting.

  Tim

On Tue, 2011-02-01 at 16:02 -0500, William L. Thomson Jr. wrote:
> On Tue, 2011-02-01 at 15:50 -0500, robert mckennon wrote:
> > believe it or not, I have never actually swapped out a hard-drive in a
> > raided system.
> 
> We all have our first time with something at some point. No one was born
> knowing or having done it all before ;)
> 
> > I have a HP Proliant ML350 G4p running RHEL 5.3  with a bad drive in a raid-5.
(Continue reading)

robert mckennon | 1 Feb 2011 22:17
Picon

Re: hot swap drive

On Tue, Feb 1, 2011 at 4:02 PM, William L. Thomson Jr.
<wlt@...> wrote:
> On Tue, 2011-02-01 at 15:50 -0500, robert mckennon wrote:
>> believe it or not, I have never actually swapped out a hard-drive in a
>> raided system.
>
> We all have our first time with something at some point. No one was born
> knowing or having done it all before ;)
>
>> I have a HP Proliant ML350 G4p running RHEL 5.3  with a bad drive in a raid-5.
>
> Assuming you have a HP Smart Array controller or some RAID controller.
>
>> It says it's hot-swappable....  but is that the best practice, or
>> should I shut down and then replace the drive?
>
> If the machine is still running, usually the drive will already be taken
> out of use by the  raid controller. Which if thats the case, red light
> vs green, or could be another color on the drive in question. Then you
> can safely remove the drive and add back a new one. If using HP Smart
> Arrays can use the hpacucli to check status, make changes, etc to the
> array while the machine is up and running.
>
> If you want you can take it down. Though you might find yourself with
> more than one bad drive going that route. I would just swap out the
> drive now with a known good one. Let it do its thing, once its back in
> use and you have a spare again. If you want to be really cautious and
> can take down the server. Then a reboot can't hurt. It will
> re-initialize controller and do a test on most all drives.
>
(Continue reading)

William L. Thomson Jr. | 1 Feb 2011 22:26
Favicon

Re: hot swap drive

On Tue, 2011-02-01 at 16:17 -0500, Tim Holloway wrote:
> Two separate years running I had RAID drives blow out while I was on
> vacation and a second RAID drive blow out before I got back. Meaning I
> had to rebuild the whole $%#%!!! thing from scratch both times.

I keep spare drives and a spare raid card in my rack. Which makes it
really easy to avoid such issues with remote hands. If available where
your servers are, if not, might consider such :)

> The HP hotswap drives I worked with were packaged such that pressing the
> drive's quick-release lever would power it down clean. Of course, since
> the drive was supposedly kaput, that was a lesser concern, but it's
> always possible to press the wrong lever (whoops!).

You can definitely do that, but I tend to prefer to not just yank an
active drive out. Though not sure offhand how to deactivate it before
hand, I assume there is a way, but maybe not.

> My bigger problem was in finding exact-match replacement disks after a
> year or 2 of service. You'd think in a company with over 1200 people in
> it, someone might have a spare. But unfortunately, most of them weren't
> into 10K RPM hot-swap servers. To say nothing of tape library units.

eBay to the rescue most times. One nice thing about older hardware, you
can get spare parts for days on the cheap from eBay. Its kinda my new
way of doing things, vs always buying new. Though there is a balance to
that, not everything new, and not everything old or used.

> At least with Linux, heterogeneous RAID isn't an issue.
> 
(Continue reading)

William L. Thomson Jr. | 2 Feb 2011 22:59
Favicon

Bash script for peer review

The following is a pretty basic bash script I created to clean up and
remove unused user and group accounts. Its straight forward, and nothing
special. I am seeking some peer review, mostly for others input on
things to look out for in the script. Ways to confirm if the account
might be needed, despite nothing existing for that user or group.

Like for example, there are some user/group accounts that only exist for
devices in /dev. Thus searching that, but most other things would not be
that way. Not sure about /sys, but pretty sure /proc.

Anyway just wanted to get some feedback. I haven't put the script to use
just yet. Just doing trial runs, but thus far it looks rather safe. Of
course as a precaution I will have the script make copies of the files.
Which can easily be reverted or users/groups added back if needed.

Comments, feedback, suggestions, etc all welcomed!

$ cat rm_unused_accts.sh 
#!/bin/bash

echo -e "Checking for unused user/group accounts\n"

USERS=`cat /etc/passwd | cut -d : -f1`

#cp /etc/passwd /etc/passwd.backup
#cp /etc/shadow /etc/shadow.backup
for user in ${USERS}; do
	count=`find / -nowarn \
		-wholename '/dev' -prune \
		-o -wholename '/proc' -prune \
(Continue reading)

Whit Hansell | 7 Feb 2011 22:00
Picon

mountpoint changes on reboot

Hey guys.  Picked up an external drive a few days ago and set it up just 
fine.  Using AMD64 Lenny on Assus board.  External drive is a bakup 
drive w usb connection and separate p/s.

Have two hd's on box plus this external drive.  Use linux on one hd, XP 
on a separate drive and reboot back and forth on occasion as needed.   
Partitioned new external to reduce Windows partition and add Linux 
partition.  All works fine.  No problemo' there.  No problemo' w. other 
situation either.

But where I am having problem is that when I come back into linux from 
XP, a restart from XP,  linux changes the mount point on my usb various 
drives, externala and stick drives which are also attached.

Am using rsync in a script I wrote and so when I want to backup it's 
easy, except now the mount  point is different.

 Is there any way to lock in the mount point on the external drives by 
editing a file somewhere?   I've googled all over and all I can find is 
people having problems with the name being changed, not the mount 
point.  The name in fstab is the same (/dev/sdd2) and the drive info.  
AMD64 automounts the drive and sticks an icon in the tray automatically 
on bootup but, again, changes the mount point so when I try to run my 
sccript, it's no longer looking at the correct  usbport.   I am not 
moving the drives at all.  The system is changing the usb port names on 
reboot all by itself.  Usb0, Usb1,Usb2, etc.

I assume someone has added an external usb drive and had the same 
problem and am just wondering how you solved it.  Thanking you in 
advance for any help.
(Continue reading)

Tim Holloway | 7 Feb 2011 22:20
Favicon

Re: [SPAM] mountpoint changes on reboot

Yep. Mount on the filesystem's UUID instead of the device name.

On Mon, 2011-02-07 at 16:00 -0500, Whit Hansell wrote:
> Hey guys.  Picked up an external drive a few days ago and set it up just 
> fine.  Using AMD64 Lenny on Assus board.  External drive is a bakup 
> drive w usb connection and separate p/s.
> 
> Have two hd's on box plus this external drive.  Use linux on one hd, XP 
> on a separate drive and reboot back and forth on occasion as needed.   
> Partitioned new external to reduce Windows partition and add Linux 
> partition.  All works fine.  No problemo' there.  No problemo' w. other 
> situation either.
> 
> But where I am having problem is that when I come back into linux from 
> XP, a restart from XP,  linux changes the mount point on my usb various 
> drives, externala and stick drives which are also attached.
> 
> Am using rsync in a script I wrote and so when I want to backup it's 
> easy, except now the mount  point is different.
> 
>  Is there any way to lock in the mount point on the external drives by 
> editing a file somewhere?   I've googled all over and all I can find is 
> people having problems with the name being changed, not the mount 
> point.  The name in fstab is the same (/dev/sdd2) and the drive info.  
> AMD64 automounts the drive and sticks an icon in the tray automatically 
> on bootup but, again, changes the mount point so when I try to run my 
> sccript, it's no longer looking at the correct  usbport.   I am not 
> moving the drives at all.  The system is changing the usb port names on 
> reboot all by itself.  Usb0, Usb1,Usb2, etc.
> 
(Continue reading)

Tim Holloway | 7 Feb 2011 22:30
Favicon

Re: [SPAM] Re: [SPAM] mountpoint changes on reboot

Incidentally, you can also lock down the USB device IDs in the /etc
hotplug config, but since you're looking specifically for the
filesystem, the UUID approach is more precise.

  Tim

On Mon, 2011-02-07 at 16:20 -0500, Tim Holloway wrote:
> Yep. Mount on the filesystem's UUID instead of the device name.
> 
> On Mon, 2011-02-07 at 16:00 -0500, Whit Hansell wrote:
> > Hey guys.  Picked up an external drive a few days ago and set it up just 
> > fine.  Using AMD64 Lenny on Assus board.  External drive is a bakup 
> > drive w usb connection and separate p/s.
> > 
> > Have two hd's on box plus this external drive.  Use linux on one hd, XP 
> > on a separate drive and reboot back and forth on occasion as needed.   
> > Partitioned new external to reduce Windows partition and add Linux 
> > partition.  All works fine.  No problemo' there.  No problemo' w. other 
> > situation either.
> > 
> > But where I am having problem is that when I come back into linux from 
> > XP, a restart from XP,  linux changes the mount point on my usb various 
> > drives, externala and stick drives which are also attached.
> > 
> > Am using rsync in a script I wrote and so when I want to backup it's 
> > easy, except now the mount  point is different.
> > 
> >  Is there any way to lock in the mount point on the external drives by 
> > editing a file somewhere?   I've googled all over and all I can find is 
> > people having problems with the name being changed, not the mount 
(Continue reading)


Gmane