Re: [CentOS] Odd ethernet interface
On 05.11.2011 02:32, Ljubomir Ljubojevic wrote: > Vreme: 11/05/2011 01:10 AM, Mufit Eribol piše: >> Hello, >> >> I have a CentOS 6 VM on a CentOS 6 host. This VM has two ethernet >> interfaces, eth0 and eth1. It was working nice. All of a sudden eth1 >> stopped working as expected. Kernel started to give the message below: >> >> kernel: udev: renamed network interface eth2 to eth2-eth1 >> >> There is no any eth2 or eth2-eth1 in /etc/sysconfig/network-scripts/. I >> really don't know where it is coming from. > Your eth1 is being automaticaly renamed to eth2-eth1 for some reason. > Have you changed anything in config(s) connected to eth1? > > Are name and device name in ifcfg-ethX consistent? Have you reshufled > your configs and left loose end somewhere? > > Do you maybe have NetworkManager still active? > > Thank you for the responses. There is no NetworkManager installed. Perhaps I should give some more info. It is a two-gateway machine. I have following lines in my rc.local: # routing and default gateway for each interface ip route add 10.0.0.0/24 dev eth0 src 10.0.0.32 table T1 ip route add default via 10.0.0.11 table T1 ip route add 192.168.2.0/24 dev eth1 src 192.168.2.2 table T2 ip route add default via 192.168.2.1 table T2 # regular routes ip route add 10.0.0.0/24 dev eth0 src 10.0.0.32 ip route add 192.168.2.0/24 dev eth1 src 192.168.2.2 # default gateway ip route add default via 10.0.0.11 # rules ip rule add from 10.0.0.32 table T1 ip rule add from 192.168.2.2 table T2 But again, the system was working before fine. The problematic interface is 192.168.2.2 (eth1). In network-scripts directory, I have 2 eth configuration files, nothing else (apart from lo of course). eth0: DEVICE="eth0" NM_CONTROLLED="yes" ONBOOT=yes HWADDR=52:54:00:E0:5A:C5 TYPE=Ethernet BOOTPROTO=none IPADDR=10.0.0.32 PREFIX=24 DNS1=127.0.0.1 #DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 PEERDNS=no eth1: DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT=yes HWADDR=52:54:00:B5:B6:D1 TYPE=Ethernet BOOTPROTO=none IPADDR=192.168.2.2 PREFIX=24 DNS1=127.0.0.1 #DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth1" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 PEERDNS=no network: NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=www.onart.com.tr GATEWAY=10.0.0.11 Thank you for your support. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] Odd ethernet interface
Hello, I have a CentOS 6 VM on a CentOS 6 host. This VM has two ethernet interfaces, eth0 and eth1. It was working nice. All of a sudden eth1 stopped working as expected. Kernel started to give the message below: kernel: udev: renamed network interface eth2 to eth2-eth1 There is no any eth2 or eth2-eth1 in /etc/sysconfig/network-scripts/. I really don't know where it is coming from. config -a: eth0 Link encap:Ethernet HWaddr 52:54:00:E0:5A:C5 inet addr:10.0.0.32 Bcast:10.255.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8293 errors:0 dropped:0 overruns:0 frame:0 TX packets:6440 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:831687 (812.1 KiB) TX bytes:6358220 (6.0 MiB) eth1 Link encap:Ethernet HWaddr 52:54:00:B5:B6:D1 inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:934 (934.0 b) TX bytes:462 (462.0 b) eth2-eth1 Link encap:Ethernet HWaddr 52:54:00:B5:B6:D1 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:37 errors:0 dropped:0 overruns:0 frame:0 TX packets:37 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3642 (3.5 KiB) TX bytes:3642 (3.5 KiB) And below is /etc/udev/rules.d/70-persistent-net.rules: # net device () (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:e0:5a:c5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # net device () SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:b5:b6:d1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" Here is the relevant excerpt from the xml on the host: I really don't understand what is really going on. I would appreciate any help hint. All the best. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't Compile Driver due to Missing version.h
Karanbir Singh wrote: > On 01/08/2010 12:24 PM, Mufit Eribol wrote: > >> I use a raid card on my Centos 5.4 server. Whenever I updated the >> kernel, I used to compile drivers of the card for the new kernel. I have >> done this many times in the past without any problem. >> > > what raid card is this ? It is Highpoint rr2310 card. Yes, I know it is soft type. Mufit Eribol ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't Compile Driver due to Missing version.h
Arturas Skauronas wrote: > On Fri, Jan 8, 2010 at 2:24 PM, Mufit Eribol wrote: >> Dear All, >> >> make KERNELDIR= /lib/modules/2.6.18-164.9.1.el5PAE/build >> grep: /include/linux/version.h: No such file or directory >> expr: syntax error >> ../../../inc/linux/Makefile.def:85: *** Only kernel 2.4/2.6 is supported >> but you use 2.. Stop. > > you typed space simbol after equal > make KERNELDIR= /lib/modules/2.6.18-164.9.1.el5PAE/build > should be > make KERNELDIR=/lib/modules/2.6.18-164.9.1.el5PAE/build > ___ > CentOS mailing list > CentOS@centos.org > http://lists.centos.org/mailman/listinfo/centos That's it. Deleting the space before / fixed the problem. Thank you Arturas! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] Can't Compile Driver due to Missing version.h
Dear All, I use a raid card on my Centos 5.4 server. Whenever I updated the kernel, I used to compile drivers of the card for the new kernel. I have done this many times in the past without any problem. But this time after installing the new kernel files given below, I can not compile the new driver anymore. kernel-headers-2.6.18-164.9.1.el5 kernel-PAE-devel-2.6.18-164.9.1.el5 kernel-PAE-2.6.18-164.9.1.el5 The make command can not find /include/linux/version.h file with the following error. But the file is already there. make KERNELDIR= /lib/modules/2.6.18-164.9.1.el5PAE/build grep: /include/linux/version.h: No such file or directory expr: syntax error ../../../inc/linux/Makefile.def:85: *** Only kernel 2.4/2.6 is supported but you use 2.. Stop. [r...@server linux]#locate include\/linux\/version.h command gives the following result. /usr/include/linux/version.h /usr/src/kernels/2.6.18-128.1.1.el5-PAE-i686/include/linux/version.h /usr/src/kernels/2.6.18-164.9.1.el5-PAE-i686/include/linux/version.h /usr/src/kernels/2.6.18-92.1.18.el5-PAE-i686/include/linux/version.h I would appreciate any help. Thank you. Mufit Eribol ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Upgrade
Michael A. Peters wrote: > Mufit Eribol wrote: > >> Michael A. Peters wrote: >> >>> Thomas Dukes wrote: >>> >>>> The error I got when I ran 'yum update' was: >>>> >>>> Error: Missing Dependency: nss = 3.12.2.0-2-el5.centos is needed by >>>> package >>>> nss-devel >>>> >>>> >>> Yes, that will do it - devel packages do need to be the same EVR. >>> Sounds like you figured it out. >>> >> I have exactly the same problem. No nss-devel is installed currently. >> But yum update always gives the below message: >> >> ... >> Package nss-devel.i386 0:3.12.2.0-2.el5.centos set to be updated >> ... >> nss = 3.12.2.0-2.el5.centos is needed by package nss-devel >> ... >> >> I can't install nss-devel either due to the very same error. >> >> Sorry Michael, I still haven't figured it out. No clue at all. >> > > Sounds like something in your upgrade requires nss-devel but an > nss-devel to match the updates nss isn't in the repo, so the update > finds the wrong nss-devel. > > What happens when you comment out the mirror list and uncomment the > baseurl for both base and updates? > "yum update" gives the error. But "yum clean all && yum upgrade" fixed the problem as stated by one of the above posters and upgraded to 5.3 without any problem. Thank you. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Upgrade
Michael A. Peters wrote: > Thomas Dukes wrote: >> The error I got when I ran 'yum update' was: >> >> Error: Missing Dependency: nss = 3.12.2.0-2-el5.centos is needed by package >> nss-devel >> > > Yes, that will do it - devel packages do need to be the same EVR. > Sounds like you figured it out. I have exactly the same problem. No nss-devel is installed currently. But yum update always gives the below message: ... Package nss-devel.i386 0:3.12.2.0-2.el5.centos set to be updated ... nss = 3.12.2.0-2.el5.centos is needed by package nss-devel ... I can't install nss-devel either due to the very same error. Sorry Michael, I still haven't figured it out. No clue at all. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] yum priorities question
Filipe Brandenburger wrote: Hi, The package names are different, so probably "geoip" (from RPMforge) obsoletes "GeoIP" from CentOS. In that case, for priorities to work and exclude the one that obsoletes the other, you have to set this option in the [main] section of /etc/yum/pluginconf.d/priorities.conf: check_obsoletes=1 Look for the thread about perl-DBD-mysql vs. perl-DBD-MySQL, it's probably the same issue. HTH, Filipe Yes Filipe, that's it! Obviously, I overlooked this option in priorities.conf. The below text is from http://wiki.centos.org/PackageManagement/Yum/Priorities: "Some packages specify obsoletes in their metadata. This property of a package specifies which old packages with a different name the package replaces. This can intefere with the priority protection of packages, if a package from a low-priority repository contains an obsoletion for package from a high-priority repository. For instance, if the gconfmm2 package was installed from a high-priority repository, and another package (say gconfmm20) claims to replace the obsolete gconfmm2 package, Yum will replace the gconfmm2 package with the gconfmm20 package. This plugin can prevent such upgrades, by adding the following line to the main section of /etc/yum/pluginconf.d/priorities.conf: check_obsoletes=1 " This option works nice. Thank you for the hint. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Re: yum priorities question
Scott Silva wrote: Just to be thorough, run this; rpm -qa | grep priorities [EMAIL PROTECTED] ~]# rpm -qa | grep priorities yum-priorities-1.1.10-9.el5.centos [EMAIL PROTECTED] ~]# ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] yum priorities question
Kai Schaetzl wrote: Priority for CentOS Extras repo: 1 double-check that! For instance, if this repo is not enabled, the priority will not work! Kai Checked that, already enabled. Here is an excerpt from CentOS-Base.repo: ... #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 protect=0 priority=1 ... "yum update" prints the following info on the screen: ... Excluding Packages in global exclude list Finished 355 packages excluded due to repository priority protections Setting up Update Process ... So, it seems priorities plugin is there and working. I am stumped! All the best, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] yum priorities question
Ralph Angenendt wrote: Strange, because it works here: [EMAIL PROTECTED] Documentation]# yum -v update | grep -i geoip --> geoip-devel-1.4.0-1.el5.rf.x86_64 from rpmforge excluded (priority) --> geoip-1.4.0-1.el5.rf.x86_64 from rpmforge excluded (priority) --> geoip-1.4.4-1.el5.rf.x86_64 from rpmforge excluded (priority) --> geoip-1.4.5-1.el5.rf.x86_64 from rpmforge excluded (priority) --> geoip-devel-1.4.4-1.el5.rf.x86_64 from rpmforge excluded (priority) --> geoip-devel-1.4.5-1.el5.rf.x86_64 from rpmforge excluded (priority) --> GeoIP-devel-1.4.4-2.el5.kb.x86_64 from kbs-CentOS-Testing excluded (priority) --> GeoIP-devel-1.4.4-2.el5.kb.x86_64 from kbs-CentOS-Testing excluded (priority) --> GeoIP-1.4.4-2.el5.kb.x86_64 from kbs-CentOS-Testing excluded (priority) --> GeoIP-1.4.4-2.el5.kb.x86_64 from kbs-CentOS-Testing excluded (priority) [EMAIL PROTECTED] Documentation]# Here is what I get, [EMAIL PROTECTED] ~]# yum -v update | grep -i geoip ---> Package geoip.i386 0:1.4.5-1.el5.rf set to be updated Checking deps for geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.1.2)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libz.so.1', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libGeoIPUpdate.so.0', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.0)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.3)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.4)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.1)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('config(geoip)', 'EQ', ('0', '1.4.5', '1.el5.rf')) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.3.4)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('/sbin/ldconfig', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libc.so.6(GLIBC_2.1.3)', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u looking for ('libGeoIP.so.1', None, (None, None, None)) as a requirement of geoip.i386 0-1.4.5-1.el5.rf - u ---> Package geoip-devel.i386 0:1.4.5-1.el5.rf set to be updated Checking deps for geoip-devel.i386 0-1.4.5-1.el5.rf - u looking for ('libGeoIPUpdate.so.0', None, (None, None, None)) as a requirement of geoip-devel.i386 0-1.4.5-1.el5.rf - u looking for ('geoip', 'EQ', ('0', '1.4.5', '1.el5.rf')) as a requirement of geoip-devel.i386 0-1.4.5-1.el5.rf - u looking for ('libGeoIP.so.1', None, (None, None, None)) as a requirement of geoip-devel.i386 0-1.4.5-1.el5.rf - u Checking deps for GeoIP.i386 0-1.4.4-1.el5.centos - None Checking deps for GeoIP-devel.i386 0-1.4.4-1.el5.centos - None geoip i386 1.4.5-1.el5.rf rpmforge 750 k replacing GeoIP.i386 1.4.4-1.el5.centos geoip-devel i386 1.4.5-1.el5.rf rpmforge 7.1 k replacing GeoIP-devel.i386 1.4.4-1.el5.centos [EMAIL PROTECTED] ~]# rpm -qa |grep geoip [EMAIL PROTECTED] ~]# [EMAIL PROTECTED] ~]# rpm -qa|grep GeoIP GeoIP-data-20080301-1.el5.centos GeoIP-devel-1.4.4-1.el5.centos GeoIP-1.4.4-1.el5.centos [EMAIL PROTECTED] ~]# I have no clue about what is going on? Regards, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] yum priorities question
Hello, I have a question about working principles of yum. Here are the details: Installed package: GeoIP.i386 1.4.4-1.el5.centos Repo: CentOS Extras Priority for CentOS Extras repo: 1 "yum update" wants to replace the above package with the following: Package: geoip.i386 1.4.5-1.el5.rf Repo: rpmforge Priority for rpmforge: 15 And yes, the following is already in the priorities.conf [main] enabled=1 Why does yum try to replace the package from a repo with higher priority? Isn't "yum priorities" supposed to keep it? Regards, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Toby Bluhm wrote: Mufit Eribol wrote: Toby Bluhm wrote: Mufit Eribol wrote: I have a LV on RAID mounted as /mnt/raid. Then /mnt/raid/var is symlinked to /var. I was afraid you were going to say that. Go back to single user mode. mkdir /new_var cd /mnt/raid/var tar cf - . | ( cd /new_var ; tar xvf - ) Make sure both dirs look the same. Change the link to /new_var. Or remove the old link & mv /new_var /var. reboot. Toby, Thank you for this nice tip. It worked perfectly. The server is back in the game again. Just for my learning experience, I would appreciate if you clarify one point though. Why are you afraid when you hear /mnt/raid/var symlinked to /var? Because it can complicate a recovery, as you just experienced. Why did you feel a need to have /var setup as you did? Did you expect to fill it up quickly or a need for speed? You also have /tmp separate - do you expect more than usual activity there? Perhaps a better question would be - What is the purpose of this machine? If it's a just a fileserver on a home lan, you don't *need* to make it complicated, although learning is fun :-). Running a very active internet facing box with email, mysql, apache, etc. would probably call for a more complicated setup - which would actually make recovery & security easier/better. This box is loaded with cyrus-imapd, postfix, amavisd, clamd, spamassassin, mysql, postgresql, apache, CRM, DMS, named, hylafax etc for a small company. I wanted to keep operating system on 2 SATA disks (RAID1), data (var and home) on a high capacity RAID10 (4 SATA disks). It works also a file server. I just wanted more capacity for home and var directories, hence they are on separate RAID controller. It is more difficult if the OS is also on RAID controller as the driver should be loaded before the OS is up and running. When I install a new kernel, I compile the raid driver easily with my setup. So, having OS on soft RAID and data files (home and var) on RAID controller seemed better idea when I setup the system. Here is my fstab: /dev/md2/ ext3 defaults1 1 <--- md2 Software RAID1 /dev/md1/boot ext3 defaults1 2 <--- md0 Software RAID1 /dev/md0/tmpext3 defaults1 2 <--- md1 Software RAID1 tmpfs /dev/shmtmpfs defaults0 0 devpts /dev/ptsdevpts gid=5,mode=620 0 0 sysfs /syssysfs defaults0 0 proc/proc proc defaults0 0 LABEL=SWAP-sda3 swapswap defaults,pri=1 0 0 LABEL=SWAP-sdb3 swapswap defaults,pri=1 0 0 /dev/raid_vg0/raid_lv0 /mnt/raid ext3 defaults0 0 <--- Hardware RAID10 Before, home and var were under /mnt/raid directory and symlinked to /home and /var. Now, both directories were copied to / (md2 software RAID1) as new_home and new_var and /home and /var symlinks are now pointing to these new directories. /mnt/raid (hardware RAID10) which is the main storage of my server is not being used at the moment. Instead of using links, may as well just mount it where it belongs. I will follow your advice. I will mount /var and /home on RAID controller separately (2 separate VGs). But, some distros, one of them is Ubuntu, wants to have /var/run and /var/lock on the same partition as /. I don't know if CentOS 5.2 has such a requirement. If it has, I will mkdir /var/run and /var/lock on the same partition as / bu umounting /var first. I am planning to have 2 logical volumes (for home and var separately) instead of 1. Then, they will be mounted as separate partitions as /home and /var to /dev/raid_vg0/raid_lv0 and /dev/raid_vg0/raid_lv1, respectively. Is it a good approach? Please advise. I'm somewhat simple-minded - I like to keep the system that way :-). I split the partitions into 3 / swap /home either on a single disk or mirrored ( swap mirrored too ) - no lvm. For data storage I use lvm on raid on a separate mount point. Not saying you should do the same - it's just what I do. Yes, it is simple. Perhaps I am victim of the articles advocating more partitions on the internet :-) Thank you. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Toby Bluhm wrote: Mufit Eribol wrote: I have a LV on RAID mounted as /mnt/raid. Then /mnt/raid/var is symlinked to /var. I was afraid you were going to say that. Go back to single user mode. mkdir /new_var cd /mnt/raid/var tar cf - . | ( cd /new_var ; tar xvf - ) Make sure both dirs look the same. Change the link to /new_var. Or remove the old link & mv /new_var /var. reboot. Toby, Thank you for this nice tip. It worked perfectly. The server is back in the game again. Just for my learning experience, I would appreciate if you clarify one point though. Why are you afraid when you hear /mnt/raid/var symlinked to /var? Is something wrong with it? Here is my fstab: /dev/md2/ ext3defaults 1 1 <--- md2 Software RAID1 /dev/md1/boot ext3defaults 1 2 <--- md0 Software RAID1 /dev/md0/tmpext3defaults 1 2 <--- md1 Software RAID1 tmpfs /dev/shmtmpfs defaults0 0 devpts /dev/ptsdevpts gid=5,mode=620 0 0 sysfs /syssysfs defaults0 0 proc/proc procdefaults0 0 LABEL=SWAP-sda3 swapswapdefaults,pri=1 0 0 LABEL=SWAP-sdb3 swapswapdefaults,pri=1 0 0 /dev/raid_vg0/raid_lv0 /mnt/raid ext3defaults 0 0 <--- Hardware RAID10 Before, home and var were under /mnt/raid directory and symlinked to /home and /var. Now, both directories were copied to / (md2 software RAID1) as new_home and new_var and /home and /var symlinks are now pointing to these new directories. /mnt/raid (hardware RAID10) which is the main storage of my server is not being used at the moment. I am planning to have 2 logical volumes (for home and var separately) instead of 1. Then, they will be mounted as separate partitions as /home and /var to /dev/raid_vg0/raid_lv0 and /dev/raid_vg0/raid_lv1, respectively. Is it a good approach? Please advise. Thank you again. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
NiftyClusters Mitch wrote: On Fri, Aug 1, 2008 at 1:43 PM, William L. Maltby <[EMAIL PROTECTED]> wrote: On Fri, 2008-08-01 at 16:13 -0400, Toby Bluhm wrote: Mufit Eribol wrote: . . that you would correctly try to fsck the *device*. First backup data... It is possible to run "fsck" with a media test flag. Bad blocks are assigned to dummy files. Inadvertently reading one of these files can take a drive off line. One reason a device will go off line is the presence of a media error, or the presence of a situation assumed by "smartd" to be a pending data risk. Understanding the root cause error should be done. Smartd tends to be cautious but does identify pending problems. One puzzle can be the loss of log file data. It is sometimes possible to see events on a live system that later vanish after a reboot because buffers are live in memory but not on the disk. Sending logs to another 'log system' can be helpful and is a good idea on production systems for exactly this reason I copied /mnt/raid/var to /new_var using tar as explained in Toby's message. Changed the link var to /new_var. After reboot, it was possible to umount /mnt/raid and fsck. All the errors were corrected. Everything works perfect now. I appreciate all who shared his experience, knowledge and advised me on this thread. Thank you. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
I think I found the culprit albeit I still don't know how to fix. 1. During boot the screen prints the following errors "no fstab.sys, mounting internal defaults ... No devices found Setting up Logical Volume Management: /var/lock: mkdir failed: No such file or directory" I have a LV on RAID mounted as /mnt/raid. Then /mnt/raid/var is symlinked to /var. I found on the internet that some linux systems look for /var/lock or /var/run on / partition only. Obviously LVM can not create its file in /var/lock, perhaps /mnt/raid is not mounted yet during /var/lock mkdir operation. 2. Second important finding is that /forcefsck forces only software raid not the hardware one. It does the check for md0 (/temp), md1 (/boot), and md2 (/). It skips /dev/raid_vg0/raid_lv0 (/mnt/raid) altogether. I don't know how to force to check it durin reboot. 3. I changed to init level 1. Then tried to umount /mnt/raid. But all I received was "device is busy" prompt. "umount -l /mnt/raid" was able unmount /mnt/raid. Then tried to run "fsck /mnt/raid". This time I received "fsck.ext2: Is a directory while trying to open /mnt/raid The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with on alternate superblock: e2fsck -b 8193 " I tried with one of the superblocks on /mnt/raid. This time I get "fsck.ext3: Device or resource busy while trying to open /dev/raid_vg0/raid_lv0 Filesystem mounted or opened exclusively by another program?" Sorry for the long post. This is the point I arrived. I am stumped. Thank your for all the support. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Kai Schaetzl wrote: You rebooted several times, you did not force a check I think. You have to boot with the rescue CD and then do a thorough fsck on the filesystem. Maybe on each one of the disks separately, don't know. The boot-up check might not be sufficient. There's probably some bad block on the disk that needs to be flagged away. Until this hasn't happened the system will always try to write/read on that sooner or later. Kai I used both "#touch /forcefsck" and "#shutdown -rF now" methods. Don't they force a check? Actually, now it seems to me they don't. There is no sign of starting fsck in messages. Here is the complete log relevant to disk operations from /var/log/messages Aug 1 18:29:45 server kernel: rr2310_00:[0 0] Start channel soft reset. Aug 1 18:29:45 server kernel: rr2310_00:[0 1] Start channel soft reset. Aug 1 18:29:45 server kernel: rr2310_00:[0 2] Start channel soft reset. Aug 1 18:29:45 server kernel: rr2310_00:[0 3] Start channel soft reset. Aug 1 18:29:45 server kernel: rr2310_00:channel [0,0] started successfully Aug 1 18:29:45 server kernel: rr2310_00:channel [0,1] started successfully Aug 1 18:29:45 server kernel: rr2310_00:channel [0,2] started successfully Aug 1 18:29:45 server kernel: rr2310_00:channel [0,3] started successfully Aug 1 18:29:45 server kernel: scsi8 : rr2310_00 Aug 1 18:29:45 server kernel: Vendor: HPT Model: DISK_8_0 Rev: 4.00 Aug 1 18:29:45 server kernel: Type: Direct-Access ANSI SCSI revision: 00 Aug 1 18:29:45 server kernel: SCSI device sdc: 1562378240 512-byte hdwr sectors (799938 MB) Aug 1 18:29:45 server kernel: sdc: Write Protect is off Aug 1 18:29:45 server kernel: SCSI device sdc: drive cache: write through Aug 1 18:29:45 server kernel: SCSI device sdc: 1562378240 512-byte hdwr sectors (799938 MB) Aug 1 18:29:45 server kernel: sdc: Write Protect is off Aug 1 18:29:45 server kernel: SCSI device sdc: drive cache: write through Aug 1 18:29:45 server kernel: sdc: unknown partition table Aug 1 18:29:45 server kernel: sd 8:0:0:0: Attached scsi disk sdc Aug 1 18:29:45 server kernel: sd 8:0:0:0: Attached scsi generic sg2 type 0 Aug 1 18:29:45 server kernel: floppy0: no floppy controllers found Aug 1 18:29:45 server kernel: lp: driver loaded but no devices found Aug 1 18:29:45 server kernel: ACPI: Power Button (FF) [PWRF] Aug 1 18:29:45 server kernel: ACPI: Power Button (CM) [PWRB] Aug 1 18:29:45 server kernel: ibm_acpi: ec object not found Aug 1 18:29:45 server kernel: md: Autodetecting RAID arrays. Aug 1 18:29:45 server kernel: md: autorun ... Aug 1 18:29:45 server kernel: md: ... autorun DONE. Aug 1 18:29:45 server kernel: device-mapper: multipath: version 1.0.5 loaded Aug 1 18:29:45 server kernel: EXT3 FS on md2, internal journal Aug 1 18:29:45 server kernel: kjournald starting. Commit interval 5 seconds Aug 1 18:29:45 server kernel: EXT3 FS on md1, internal journal Aug 1 18:29:45 server kernel: EXT3-fs: mounted filesystem with ordered data mode. Aug 1 18:29:45 server kernel: kjournald starting. Commit interval 5 seconds Aug 1 18:29:45 server kernel: EXT3 FS on md0, internal journal Aug 1 18:29:45 server kernel: EXT3-fs: mounted filesystem with ordered data mode. Aug 1 18:29:45 server kernel: kjournald starting. Commit interval 5 seconds Aug 1 18:29:45 server kernel: EXT3-fs warning (device dm-0): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure Aug 1 18:29:45 server kernel: EXT3-fs warning (device dm-0): ext3_clear_journal_err: Marking fs in need of filesystem check. Aug 1 18:29:45 server kernel: EXT3-fs warning: mounting fs with errors, running e2fsck is recommended Aug 1 18:29:45 server kernel: EXT3 FS on dm-0, internal journal Aug 1 18:29:45 server kernel: EXT3-fs: recovery complete. Aug 1 18:29:45 server kernel: EXT3-fs: mounted filesystem with ordered data mode. Aug 1 18:29:45 server kernel: Adding 6144852k swap on /dev/sda3. Priority:1 extents:1 across:6144852k Aug 1 18:29:45 server kernel: Adding 6144852k swap on /dev/sdb3. Priority:1 extents:1 across:6144852k sdc is the problematic partition (LVM2 on RAID10). I think dm-0 is pointing the same device. If I use a rescue disk loading RAID driver kernel module will not be loaded. Can I load it manually? It is getting complicated for me. Thank you, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Toby Bluhm wrote: I did it several times. Unfortunately, it couldn't fix the problem. Does it say the fsck is a success or fails? How can I get this info? All I get dmesg and messages logs after the boot. Is there a log somewhere? If not, I think I have to watch the monitor on the server during boot. Boot the rescue disk. Mount the partitions someplace. Dump /old_var to /new_var. Of course, if the /old_var fs is somewhat trash, /new_var won't be much better. The problem is there is a raid card kernel module loads during boot. If I boot the rescue disk, /mnt/raid will not be mounted. I'd be wary of hardware problems with raid controller, cables, or disks. That "IO failure" in your logs isn't what you want to see during fs operations. You are absolutely right. I am just trying to do my best to recover whatever I can. Thank you. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Ralph Angenendt wrote: touch /forcefsck and reboot. This will cause all filesystems to be checked with fsck after the reboot. I did it several times. Unfortunately, it couldn't fix the problem. I still get the following errors and the system goes "read only" after a couple of minutes. EXT3-fs warning (device dm-0): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure EXT3-fs warning (device dm-0): ext3_clear_journal_err: Marking fs in need of filesystem check. EXT3-fs warning: mounting fs with errors, running e2fsck is recommended EXT3 FS on dm-0, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with ordered data mode. It seem formatting the /mnt/raid is the way to go. However, i have to move /mnt/raid/var to /var first. / is on another hard disk and there is space available. there are lots of programs use var lively. How can I move /mnt/raid/var to /var. TIA, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Kai Schaetzl wrote: You have to unmount the filesystem in question. I think that's even recommended for a "do not repair" run. Kai "shutdown -rF now" didn't fix the problem either. There are problems with several inodes. Reboot fixes the problem for a couple of hours. I am thinking about reformatting this volume, but /var is on that volume as well. Perhaps, I should move /var to somewhere else, then format that volume. I don't know if there is a better/easier way to fix the problem. I would appreciate any help. TIA, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
William L. Maltby wrote: On Thu, 2008-07-31 at 10:08 +0300, Mufit Eribol wrote: Hi, My Centos 5.2 server (5.1 suffered the same problem as well) has a logical volume on a RAID 10 array (4 SATA harddisks on a Highpoint RR2310 controller). /etc/fstab has an entry for this array as below /dev/raid_vg0/raid_lv0 /mnt/raid ext3defaults0 0 Normally it works OK. But, file system of "this volume" once in a while goes "read only" mode. The RAID software reports no problem with the hard disks. After reboot, the system comes back in normal rw mode. If it happens again, you may be able to avoid the reboot with mount -o remount,rw /mnt/raid As to your "how to check production ...", easy. The trade-off (down time, reboot, ...) makes it easy to decide to knock users down, umount the FS, run the check, remount, tell users they can go again. William, thank you for the hint. Nevertheless, the command doesn't mount rw. It says mount: block device /dev/raid_vg0/raid_lv0 is write-protected, mounting read-only I had to reboot again. Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] File system goes read-only once in a while
Kai Schaetzl wrote: Mufit Eribol wrote on Thu, 31 Jul 2008 10:08:48 +0300: But, file system of "this volume" once in a while goes "read only" mode. there will be log entries about this. Do a *forced* fsck. Kai Kai, thank you very much for the hint. I am not sure which other log file has entries about this problem but here is the relevant section of dmesg: md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. device-mapper: multipath: version 1.0.5 loaded EXT3 FS on md2, internal journal kjournald starting. Commit interval 5 seconds EXT3 FS on md1, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on md0, internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3-fs warning (device dm-0): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure EXT3-fs warning (device dm-0): ext3_clear_journal_err: Marking fs in need of filesystem check. EXT3-fs warning: mounting fs with errors, running e2fsck is recommended EXT3 FS on dm-0, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with ordered data mode. Adding 6144852k swap on /dev/sda3. Priority:1 extents:1 across:6144852k Adding 6144852k swap on /dev/sdb3. Priority:1 extents:1 across:6144852k What is the best way to run fsck on a production system? Thank you Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] File system goes read-only once in a while
Hi, My Centos 5.2 server (5.1 suffered the same problem as well) has a logical volume on a RAID 10 array (4 SATA harddisks on a Highpoint RR2310 controller). /etc/fstab has an entry for this array as below /dev/raid_vg0/raid_lv0 /mnt/raid ext3defaults0 0 Normally it works OK. But, file system of "this volume" once in a while goes "read only" mode. The RAID software reports no problem with the hard disks. After reboot, the system comes back in normal rw mode. What could be the reason?. I would appreciate any help/hint. Thank you, Mufit ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] internal messages problem with postfix
Brian wrote: Mufit Eribol wrote: Hello, After a server crash, I re-installed postfix, cyrus-imapd, amavisd-new, spamassassin on a Centos 5.1 box. But, now mail system behaves somewhat different. There is no problem with mail receiving/sending from/to internet. Before the crash, mail system used to sent internal messages to [EMAIL PROTECTED] But now, I can't receive internal messages as it tries to send them to [EMAIL PROTECTED] I used the same postfix, cyrus-imapd, amavisd-new, /etc/aliases conf files from the previous setup. Must be a configuration issue I overlook. Could anybody please tell me what to check? Best wishes, Mufit main.cf: mydomain = example.com myhostname = server.example.com mydestination = example.com ... amavisd.conf $mydomain = 'example.com'; $myhostname = 'server.example.com'; In main.cf check this setting. Someone probably has a better answer then me but just for thought. myorigin = $mydomain hth. Thank you for your reply. But, it is already set as you told. I installed CentOS to a formatted hard disk but used the same conf files for postfix, amavisd-new, cyrus-imapd, /etc/aliases from the previous setup. Somehow, mail system gets the "server name" as the "domain name" for the internal messages. [EMAIL PROTECTED] ~]# uname -n server.example.com [EMAIL PROTECTED] ~]# hostname -d example.com [EMAIL PROTECTED] ~]# hostname -f server.example.com [EMAIL PROTECTED] ~]# hostname server.example.com It looks names are configured correctly. I am stumped! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] internal messages problem with postfix
Hello, After a server crash, I re-installed postfix, cyrus-imapd, amavisd-new, spamassassin on a Centos 5.1 box. But, now mail system behaves somewhat different. There is no problem with mail receiving/sending from/to internet. Before the crash, mail system used to sent internal messages to [EMAIL PROTECTED] But now, I can't receive internal messages as it tries to send them to [EMAIL PROTECTED] I used the same postfix, cyrus-imapd, amavisd-new, /etc/aliases conf files from the previous setup. Must be a configuration issue I overlook. Could anybody please tell me what to check? Best wishes, Mufit main.cf: mydomain = example.com myhostname = server.example.com mydestination = example.com ... amavisd.conf $mydomain = 'example.com'; $myhostname = 'server.example.com'; ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Re: ls : not UTF-8 compliant?
Scott Silva wrote: on 2/20/2008 3:14 PM Mufit Eribol spake the following: Michael A. Peters wrote: Mufit Eribol wrote: Sorry bugging you for this simple command. ls command displays question marks for the local characters (ones not included in 8859-1 space) in filenames. ie. [EMAIL PROTECTED] aa]# touch �arp [EMAIL PROTECTED] aa]# ls ??arp [EMAIL PROTECTED] aa]# ls -b#for octal escapes \303\247arp [EMAIL PROTECTED] aa]# However, ls|less, ls|more or vi all display filename correctly. Also, the completes such filenames in the correct way. Even, logsave command for the ls output prints the right characters. So, I assume the filesystem keeps the filenames in UTF-8 encoding, but somehow ls can not show them properly. Any workaround or a replacement for ls? BTW The system is Centos 5.1 and locale shows the encoding as UTF-8. Thank you. Works for me. [EMAIL PROTECTED] tmp]$ touch �arp [EMAIL PROTECTED] tmp]$ ls çarp [EMAIL PROTECTED] tmp]$ echo $LANG en_US.UTF-8 [EMAIL PROTECTED] tmp]$ ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos Interesting! Perhaps it is a quirk of ssh using PuTTY. I haven't tried it on the monitor connected. Did you try in on the monitor and CLI (no X, no Gnome etc)? Remember that putty defaults to an iso character set unless you change the defaults. No way! I use UTF-8 for "Character set translation on received data" of PuTTY. Centos is a fresh install with the default LANG setting. What else should I try? Thank you for your support! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] ls : not UTF-8 compliant?
Michael A. Peters wrote: Mufit Eribol wrote: Sorry bugging you for this simple command. ls command displays question marks for the local characters (ones not included in 8859-1 space) in filenames. ie. [EMAIL PROTECTED] aa]# touch çarp [EMAIL PROTECTED] aa]# ls ??arp [EMAIL PROTECTED] aa]# ls -b#for octal escapes \303\247arp [EMAIL PROTECTED] aa]# However, ls|less, ls|more or vi all display filename correctly. Also, the completes such filenames in the correct way. Even, logsave command for the ls output prints the right characters. So, I assume the filesystem keeps the filenames in UTF-8 encoding, but somehow ls can not show them properly. Any workaround or a replacement for ls? BTW The system is Centos 5.1 and locale shows the encoding as UTF-8. Thank you. Works for me. [EMAIL PROTECTED] tmp]$ touch çarp [EMAIL PROTECTED] tmp]$ ls çarp [EMAIL PROTECTED] tmp]$ echo $LANG en_US.UTF-8 [EMAIL PROTECTED] tmp]$ ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos Interesting! Perhaps it is a quirk of ssh using PuTTY. I haven't tried it on the monitor connected. Did you try in on the monitor and CLI (no X, no Gnome etc)? ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] ls : not UTF-8 compliant?
Sorry bugging you for this simple command. ls command displays question marks for the local characters (ones not included in 8859-1 space) in filenames. ie. [EMAIL PROTECTED] aa]# touch çarp [EMAIL PROTECTED] aa]# ls ??arp [EMAIL PROTECTED] aa]# ls -b#for octal escapes \303\247arp [EMAIL PROTECTED] aa]# However, ls|less, ls|more or vi all display filename correctly. Also, the completes such filenames in the correct way. Even, logsave command for the ls output prints the right characters. So, I assume the filesystem keeps the filenames in UTF-8 encoding, but somehow ls can not show them properly. Any workaround or a replacement for ls? BTW The system is Centos 5.1 and locale shows the encoding as UTF-8. Thank you. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos