Re: [CentOS] *very* ugly mdadm issue

2014-09-02 Thread GKH
Hmm, very bad idea to create a file system on the raw disk.
The swap type partitions know how to handle this well
but for a partition with data why take the chance that
something will write the MBR there. That's what happenned
I bet.

The procedure is this:

Create a partition 1 on the new unused drive (use all space).
That leaves space for the MBR.

Create the mirror on this new drive, use "--missing"
mkfs -t ext4 on the new disk

mdadm -D /dev/mdx (where x is the number of the mirror)
should show 1 drive on the mirror.
cat /proc/mdstat should show same thing.

Now, copy the data from the old disk to the new
"mirrored" disk.

When done, reboot. Yes, reboot now. If something had
gone very wrong you would not lose your data
and you would see your data on both disks.

Ok, you rebooted, you see the data on both disks.
Do fdisk the old disk. Create one partition,
add the partition to the mirror, wait for sync to end
and reboot again.

You should be able to see your data mirrored.

..That's the right way!

Ok, so you did not do this and something tried to
write the MBR in the raw disk and you lost all your data???

Well maybe.

Try using fsck with alternate superblocks. The first superblock
should be 32.

Good luck dude.

GKH.


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Yum update changes inode of file

2014-08-22 Thread GKH
Meikel,

Aside from the stupid way:

create a file "org_name"
copy it to new_name
rm org_name
mv new_name org_name

I don't know of a way to change inode
and keep md5 the same.

Does anyone know of a way?

This would be the perfect question for this forum.

GKH

> Hi folks,
>
> on CentOS 6.5 I run tripwire software which verifies data integrity. My
> system is automatically updated by yum (as far as I understand the
> /etc/cron.daily/0yum.cron is responsible for the regular system
> updates). After a system update I'm then notified by tripwire about the
> changes on the file system.
>
> By browsing those tripwire reports I found that there are files which
> did not change at all (i.e. the MD5 hash is the same as before) but the
> inode changed. I do not understand what yum did to the file that
> resulted in an inode change, especially I'm wondering how the inode can
> change although there was no modification on the file at all.
>
> Thanks in advance for any clarification.
>
> Find below an excerpt from the tripwire log (for /etc/nsswitch.conf)
> which shows that only inode changed.
>
> Regards,
>
> Meikel
>
>
>
>
> Excerpt from tripwire report:
>
> Modified object name:  /etc/nsswitch.conf
>
>Property:ExpectedObserved
>---- ---
>Object Type  Regular FileRegular File
>Device Number64770   64770
> * Inode Number 393292  393686
>Mode -rw-r--r--  -rw-r--r--
>Num Links1   1
>UID  root (0)root (0)
>GID  root (0)root (0)
>Size 16881688
>Modify Time  Tue 04 May 2010 09:22:21 PM CEST
> Tue 04 May 2010 09:22:21 
> PM CEST
>Blocks   8   8
>CRC32DjDI7W  DjDI7W
>MD5  ANYAnN/RJkbSUehjA7wMSM  ANYAnN/RJkbSUehjA7wMSM
>
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] HP ProLiant DL380 G5

2014-08-21 Thread GKH
Valeri,

I hope you realize that your arguments for hardware RAID
all depend on everything working just right.

If something goes wrong with a disk (on HW RAID)
you can't just simply take out the disk, move it to another
computer and maybe do some forensics.

The formatting of disks on HW RAID is transparent to Linux.
Therefore my disks are all RAID or not.

What if I wanted to mix and match? Maybe I don't want my swap
RAID for performance.

The idea of taking my data (which is controlled by an OSS
Operating System, Linux) and putting it behind a closed source
and closed system RAID controller is appalling to me.

It comes down to this: Linux knows where and when to position
the heads of disks in order to max performance. If a
RAID controller is in the middle, whatever algorithm
Linux is using is no longer valid. The RAID controller
is the one who makes the I/O decisions.

Sorry, this is not something I want to live with.

GKH


>
> On Thu, August 21, 2014 3:54 pm, Matt wrote:
>>> Hate to change the conversation here but that's why I hate hardware
>>> RAID.
>
> I love hardware RAID. 3ware more than others. In case of hardware RAID it
> is tiny specialized system (firmware) that is doing RAID function. In the
> specialized CPU (I should have called it differently) inside hardware RAID
> controller. Independent on the rest of computer, and needing only power to
> keep going. Tiny piece of code, very simple function. It is really hard to
> introduce bugs into these. Therefore you unlikely will have problem on
> device level. To find the status of the device and its components
> (physical drives) you always can use utility that comes from hardware
> vendor, you can have even web interface if it is 3ware.
>
>>> If it was software RAID, Linux would always tell you what's going on.
>
> It does. And so does hardware RAID device. And most of them (3ware in
> particular) do not do offline (i.e. delaying boot) check/rebuild, but they
> do it online (they are being operational in degraded state, and do
> necessary rebuild with IO present on the device, they just export
> themselves to Linux kernel with the warning of being degraded RAID during
> boot).
>
> Software RAID, however, has a disadvantage (more knowledgeable people will
> correct me wherever necessary). Software RAID function is executed by main
> CPU. Under very sophisticated system (linux kernel), as one of the
> processes (even if it is real time process), on the system that is
> switching between processes. Therefore, RAID task for software RAID lives
> in much more dangerous environment. Now, if it never finishes (say, kernel
> panics due to something else), you get inconsistent device (software RAID
> one), and it is much much much harder task to bring that to to some extent
> consistent state than, e.g., to bring back dirty filesystem that lives on
> the sane device. This is why we still pay for hardware RAID devices. I do.
>
> Just my 2c.
>
> Valeri
>
> 
> Valeri Galtsev
> Sr System Administrator
> Department of Astronomy and Astrophysics
> Kavli Institute for Cosmological Physics
> University of Chicago
> Phone: 773-702-4247
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] HP ProLiant DL380 G5

2014-08-21 Thread GKH
Hate to change the conversation here but that's why I hate hardware RAID.
If it was software RAID, Linux would always tell you what's going on.
Besides, Linux knows much more about what is going on on the disk and what is 
about to happen (like a megabyte DMA transfer).

BTW, check if something is creating:

/forcefsck

That would make the fsck run every time.

GKH

> Matt wrote:
>> I have CentOS 6.x installed on a "HP ProLiant DL380 G5" server.  It
>> has eight 750GB drives in a hardware RAID6 array.  Its acting as a
>> host for a number of OpenVZ containers.
>>
>> Seems like every time I reboot this server which is not very often it
>> sits for hours running a disk check or something on boot.  The server
>> is located 200+ miles away so its not very convenient to look at.  Is
>> there anyway to tell if it plans to run this or tell it not too?
>>
>> Right now its reporting one of the drives in array is bad and last
>> time it did this a reboot resolved it.
>
> You need to know what it's running. If it's doing an fsck, that will take
> a lot of time. If it's firmware in the RAID controller, that's different.
> You can run tune2fs /dev/whatever and see how often it wants to run fsck.
> For that matter, what's the entry in /etc/fstab?
>
>   mark
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Trying to override MAC addr

2014-08-21 Thread GKH
Robert,
Sorry Dude. I did not mean to make things worse.
All I wanted to say is this: It can be done via
the ifconfig command.

Now,

# systemctl status network.service

Tells me that network services still depend on:

"ExecStart=/etc/rc.d/init.d/network start"

Good! File: "/etc/sysconfig/network-scripts/ifup-eth"

Says: "39 # bail out, if the MAC does not fit"

Ok, perfect. As you already guessed we need to make this change
early on. However, if all else fails, you can always source
a custom script here and problem solved.

I know, this is not elegant. But as an SA who sometimes needs to
do dirty deeds...

Again, apologies if I am being too simplistic/stupid here.

GKH


>
> On 08/21/2014 10:56 AM, GKH wrote:
>> I just did it like this:
>>
>> ifconfig enp3s0
>>
>> enp3s0: flags=4163  mtu 1500
>>  inet 10.241.27.154  netmask 255.255.255.0  broadcast 10.241.27.255
>>  inet6 fe80::210:18ff:fe04:4d0  prefixlen 64  scopeid 0x20
>>  ether 00:10:18:04:04:d0  txqueuelen 1000  (Ethernet)
>>  RX packets 429591  bytes 41991957 (40.0 MiB)
>>  RX errors 0  dropped 0  overruns 0  frame 0
>>  TX packets 249536  bytes 19108398 (18.2 MiB)
>>  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>>  device interrupt 18
>>
>> ifconfig enp3s0 hw ether 00:10:18:04:04:d7
>>
>> ifconfig enp3s0
>> enp3s0: flags=4163  mtu 1500
>>  inet 10.241.27.154  netmask 255.255.255.0  broadcast 10.241.27.255
>>  inet6 fe80::210:18ff:fe04:4d0  prefixlen 64  scopeid 0x20
>>  ether 00:10:18:04:04:d7  txqueuelen 1000  (Ethernet)
>>  RX packets 429615  bytes 41994383 (40.0 MiB)
>>  RX errors 0  dropped 0  overruns 0  frame 0
>>  TX packets 249549  bytes 19109350 (18.2 MiB)
>>  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>>  device interrupt 18
>> Done!
>>
>> -GKH
>
> I need the changes to be permanent to apply across boots.  Thus using
> ifcfg-eth0 rather than ifconfig.
>
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On 08/21/2014 10:32 AM, m.r...@5-cent.us wrote:
>>>> Keith Keller wrote:
>>>>> On 2014-08-21, John R Pierce  wrote:
>>>>>> On 8/21/2014 7:09 AM, Robert Moskowitz wrote:
>>>>>>> I am trying to override the mac addr.
>>>>>> pretty sure you need to use NIC model specific utilities to do this,
>>>>>> ifcfg-ethN won't do it.   the hwaddr= in there is for finding the nic,
>>>>>> not for reprogramming it.
>>>>> ifconfig claims to support it:
>>>>>
>>>>>  hw class address
>>>> 
>>>> Also, don't forget /etc/udev/rules.d/70-persistant-net.rules
>>> I can't forget what I don't know.  please point me to description of
>>> these rules?
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Trying to override MAC addr

2014-08-21 Thread GKH
I just did it like this:

ifconfig enp3s0

enp3s0: flags=4163  mtu 1500
inet 10.241.27.154  netmask 255.255.255.0  broadcast 10.241.27.255
inet6 fe80::210:18ff:fe04:4d0  prefixlen 64  scopeid 0x20
ether 00:10:18:04:04:d0  txqueuelen 1000  (Ethernet)
RX packets 429591  bytes 41991957 (40.0 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 249536  bytes 19108398 (18.2 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 18

ifconfig enp3s0 hw ether 00:10:18:04:04:d7

ifconfig enp3s0
enp3s0: flags=4163  mtu 1500
inet 10.241.27.154  netmask 255.255.255.0  broadcast 10.241.27.255
inet6 fe80::210:18ff:fe04:4d0  prefixlen 64  scopeid 0x20
ether 00:10:18:04:04:d7  txqueuelen 1000  (Ethernet)
RX packets 429615  bytes 41994383 (40.0 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 249549  bytes 19109350 (18.2 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 18
Done!

-GKH












>
> On 08/21/2014 10:32 AM, m.r...@5-cent.us wrote:
>> Keith Keller wrote:
>>> On 2014-08-21, John R Pierce  wrote:
>>>> On 8/21/2014 7:09 AM, Robert Moskowitz wrote:
>>>>> I am trying to override the mac addr.
>>>> pretty sure you need to use NIC model specific utilities to do this,
>>>> ifcfg-ethN won't do it.   the hwaddr= in there is for finding the nic,
>>>> not for reprogramming it.
>>> ifconfig claims to support it:
>>>
>>> hw class address
>> 
>> Also, don't forget /etc/udev/rules.d/70-persistant-net.rules
>
> I can't forget what I don't know.  please point me to description of
> these rules?
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos