How to determine disk connection type in Linux

So this might be an obvious question, but I am managing several servers over a network and I would like to be able to find out what type of connector each server is using (i.e. SATA, SCSI, IDE, etc…) without powering off the machine and looking inside physically. I have tried to use smartctl –scan … Read more

Salt-Stack init process after package is installed

Installing AIDE needs to follow by a init proces. aide: pkg: – installed Now the following commands need to run only once: /usr/sbin/aide –config=/etc/aide.conf –init mv -f /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz How to manage this in a state file? Answer I usually do something like this: run aide once after installation: cmd.run: – name: usr/sbin/aide –config=/etc/aide.conf –init … Read more

How to migrate from ide to virtio in RHEL 6.5 KVM guest with LVMs

I want to migrate a IDE-using, LVM-based KVM guest running RHEL 6.5. I found this steps in this page: 1) Run virsh edit . From there, edit the config file and adjust all lines of <target dev=’hda’ bus=’ide’/> so they look like this <target dev=’vda’ bus=’virtio’/> Furthermore, remove all <address type …/> lines so that … Read more

How to install `aide` without `aide-common` in debian?

Per this post, Newer versions of Ubuntu (including 14.04) come with two packages for AIDE: aide, with the aide command and manual page, and little else aide-common, with a wrapper around that command, configuration files with rules, and cron configuration files that will cause AIDE to be run nightly If your AIDE is bundled like … Read more

Disk renaming udev rule

I have two separate controllers, SATA and PATA. I would like to rename drives connected to the PATA to hd[a-z], and their partitions to hd[a-z][0-9]. # udevadm info -a -p /sys/block/sdd […] looking at device ‘[…]/target8:0:1/8:0:1:0/block/sdd’: KERNEL==”sdd” SUBSYSTEM==”block” […] looking at parent device ‘[…]/target8:0:1’: KERNELS==”target8:0:1″ SUBSYSTEMS==”scsi” […] looking at parent device ‘[…]’: KERNELS==”0000:02:00.1″ SUBSYSTEMS==”pci” DRIVERS==”pata_jmicron” … Read more

Can I prevent a Linux server from locking up/spewing console errors when a hard drive fails?

I have a Linux server (CentOS 5.5) that has two identical IDE hard drives. I’ve used software RAID (mdadm) to create mirrors for each filesystem, so that either hard drive could fail and no data would be lost. Today one of my hard drives failed. The whole point of RAID should be to allow the … Read more

ATAPI Event 11 “The driver detected a controller error on \Device\Ide\IdePort2.”

This is in the System Event log (Windows Server 2008) ATAPI Event 11 “The driver detected a controller error on \Device\Ide\IdePort2.” It is probably a hardware problem, but I’m not sure how to determine that for sure. The machine still works most of the time, but it locks up at random. Sometimes at boot time, … Read more