修改服务器中各种硬盘卡的启动顺序
我在下面这个链接中已经写了怎么修改系统识别raid卡顺序 http://tonykorn97.itpub.net/post/6414/225337[@more@]具体内容是:1,复制内核cp /boot/initrd-2.6.9-34.EL.img /boot/initrd-2.6.9-34.EL.img.old2,uname -a 查看版本信息Linux jtback.rrl.com 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux3,删除内核rm initrd-2.6.9-34.ELsmp.img4,重新导入内核,改变启动时加载的raid顺序mkinitrd --preload megaraid_mbox initrd-2.6.9-34.ELsmp.img 2.6.9-34.ELsmp5,修改/etc/modprobe.conf文件,把al
升级redhat5 sas驱动程序
1,下载的新的版本[root@tonykorn97 installfiles]# ls -al mptlinux-4.00.21.00-1-rhel5.x86_64.rpm -rw-r--r-- 1 root root 4323000 08-30 22:12 mptlinux-4.00.21.00-1-rhel5.x86_64.rpm[@more@]2,检查一下有没有安装过其他的版本[root@tonykorn97 installfiles]# rpm -aq | grep mptlinux3,查看所有模块情况[root@tonykorn97 installfiles]# lsmodModule Size Used byipv6 411425 64 autofs4 57161 2 hidp 83649 2 rfcomm 104809 0 l2cap
[转帖]Linux系统攻略 用UUID在Fstab中挂载分区
来源:http://www.oklinux.cn/html/Basic/azpz/20071018/41266.htmlFstab 文件大家都很熟悉,Linux 在启动的时候通过 fstab 中的信息挂载各个分区,一个典型的分区条目就像这样: /dev/sdb5 /mnt/usb vfat utf8,umask=0 0 0[@more@] /dev/sda4 为需要挂载的分区,sda4 是 Linux 检测硬盘时按顺序给分区的命名,一般来讲,这个名称并不会变化,但是如果你有多块硬盘,硬盘在电脑中的顺序变化的时候,相同的名称可能代表着不同的硬盘分 区,如果你是从 USB 设备启动,与其他 USB 设备的插入顺序也会导致分区识别的困难。 这个时候 UUID 就派
[转帖]掌握udev
来源:http://mlsx.xplore.cn/read.php?666如果你使用Linux比较长时间了,那你就知道,在对待设备文件这块,Linux改变了几次策略。在Linux早期,设备文件仅仅是是一些带有适当的属性 集的普通文件,它由mknod命令创建,文件存放在/dev目录下。后来,采用了devfs,一个基于内核的动态设备文件系统,他首次出现在2.3.46 内核中。Mandrake,Gentoo等Linux分发版本采用了这种方式。devfs创建的设备文件是动态的。但是devfs有一些严重的限制,从 2.6.13版本后移走了。目前取代他的便是文本要提到的udev--一个用户空间程序。[@more@]目前很多的
Logical Volume Manager(LVM) 笔记
creating logical volumes 1,create physical volumes pvcreate /dev/sda3 2,assign physical volumes to volume groups vgcreate vg0 /dev/sda3 3,create logical volumes from volume groups lvcreate -L 256M -n data vg0 mke2fs -j /dev/vg0 data[@more@]resizing logical volumesgrowing volumes lvextend: can grow logical volumesresize2fs: can grow EXT3 filesystems onlinevgextend:adds new physical volumes to an existing volume groupshrinking volumes filesystem must be reduced firstrequires a files
software RAID 笔记
1,software RAID Configuration Create and define RAID devices using mdadm mdadm -C /dev/md0 -a yes -l 1 -n 2 -x 1 /dev/sda1 /dev/sdb1 /dev/sdc1 -l: raid级别 -n: 硬盘数 -x: 热备份硬盘数 format each RAID device with a filesystem mke2fs -j /dev/md0 test the RAID devices mdadm allows you to check the status of your RAID devices mdadm --detail /dev/md0[@more@]2,software RAID testing and recoverysimulating disk failuresmdadm /dev/md0 -f /dev/sda1(模拟sda1硬盘坏 )recovering from a
quota 笔记
1,overview implemented within the kernel enabled on a per-filesystem basis individual policies for groups or users limit by the number of blicks or indoes implement both soft and hard limits initialization partition mount options:usrquota,grpquota initialize database:quotacheck[@more@]2,setting quotas for usersimplementation start or stop quotas:quotaon,quotaoffedit quotas directly:edquota usernamefrom a shell:setquota username 4096 5120 40 50 /foodefine prototypical use
mount iso文件的时候提示Could not find any loop device
问题现象:[root@tonykorn97 user]# mount -o loop RedHat.Enterprise.Linux.5.Update.1-XiSO.iso /home/user/disc1/mount: Could not find any loop device. Maybe this kernel does not know about the loop device? (If so, recompile or `modprobe loop'.)[root@tonykorn97 user]# modprobe loopFATAL: Module loop not found.[root@tonykorn97 user]#[@more@]操作系统:[root@tonykorn97 /]# cat /etc/issueRed Hat Enterprise Linux Server release 5.1 (Tikanga)Kernel r on an m[root@tonykorn97 /]# uname -aLinux tonykor
rh131笔记--unit6-filesystem managemen
一,managing partitions 分区工具 fdisk sfdisk parted 更新一下分区表,避免重启 partprobe[@more@]二,making filesystemsmkfs.ext3mke2fs三,filesystem labels[root@server1 ~]# e2label /dev/sda5 backup[root@server1 ~]# e2label /dev/sda5backup[root@server1 ~]# mount LABEL=backup /mntblkid can be used to see labels and filesystem type of all devices例如:[root@server1 ~]# blkid /dev/mapper/VolGroup00-LogVol01: UUID="f10e321b-6fd2-47e6-8dee-4f58e63b1780" SEC_TYPE="ext2" TYPE=
rh131笔记---unit5-user administration.txt
一,用户管理 useradd usermod userdel 二,组管理 groupadd groupmod groupdel[@more@]三,密码策略管理chage -l root密码策略保存在/etc/shadow文件中四, sudousers listed in /etc/sudoers execure comands with:an effective user id of 0group id of root's groupan administrator will be contacted if a user not listed in /etc/sudoers attempts to use sudo五,network users配置:system-config-authenticationNIS configurationmust install ypbind and portmap RPMSLDAP Configurationmust install nss-ldap and
rh131笔记---unit4-system services
一,network time protocl配置文件:/etc/ntp.conf配置工具:system-config-date[@more@]二,日志服务配置远程日志服务1,服务器端配置first,on the log server set up syslogd to accept remote messages,a, Edit /etc/sysconfig/syslog; SYSLOGD_OPTIONS="-r -m 0"b, 重启syslog服务2,客户端配置a, append in /etc/syslog.conf the following line user.* @192.168.0.254b, 重启syslog服务3, 测试logger -i -t yourname "This is a test"三,XOrg: The X11 Server1,配置在3运行级别下运行system-config-dis
rh131笔记---unit3-kernel services
需要了解的内容也就是一个udev[@more@]Optional sequence 2 : creating a file persistently under /dev/Scenario: you want to make sure the /dev/myusbdisk filename is available after a reboot and can be used to mount a usb device Deliverable : A system that provides /dev/myusbdisk automatically after a reboot.System setup system running in runlevel 5Instructions 1, modify the udev subsystem in such a way that /dev/myusbdisk gets automatically create at boot time.2, reboot the system Plug a sub key to
rh131笔记---unit2-package management
一,rpm package manager1,安装删除rpm -ivh kernel-version.arch.rpm 安装rpm -e kernel-oldversion 删除rpm -U 升级或安装rpm -F 只升级,如果软件包不存在,不安装。[@more@]2,查询rpm的查询命令rpm -qa list installed packagesrpm -qf filename shows owning packagerpm -qi nmap-3.70-1 显示包的信息rpm -ql nmap-3.70-1 显示这个包包含哪些文件如果系统中没有安装这个软件包,查询用如下命令:rpm -q
rh131笔记---unit1-system initialization
1,如果/dev/hda硬盘上的MBR损坏,重新安装grub/sbin/grub-install /dev/hda[@more@]2,grub.conf文件中可以创建MD5密码,创建方法:[root@ttonykorn97 ~]# grub-md5-crypt Password: Retype password: $1$3KBGX$MmawvUW6MdGW7EgW5isTK.[root@ttonykorn97 ~]# 3,显示运行级别与切换运行级别[root@ttonykorn97 ~]# runlevel N 5[root@ttonykorn97 ~]# init 3[root@ttonykorn97 ~]# runlevel 5 3[root@ttonykorn97 ~]# runlevel显示的第一个数字为上一次的运行级别,N表示没有。第二个数字表示当前的运行级别。init 后面跟数字切换到需要的
自动挂载u盘到根目录
想让u盘自动挂载到/目录下面的backup文件夹中,具体的操作步骤为:[@more@]1,修改/etc/auto.master 文件:增加下面一行:/- /etc/auto.direct具体例子为:[root@tonykorn97 /]# cat /etc/auto.master ## $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $## Sample auto.master file# This is an automounter map and it has the following format# key [ -mount-options-separated-by-comma ] location# For details of the format look at autofs(5).#/misc /etc/auto.misc/net -hosts/- /etc/auto.direct## Inc
redhat5 raw 的管理
在以前的redhat版本中,系统通过/etc/sysconfig/rawdevices配置raw的控制文件,通过/etc/init.d/rawdevices来管理raw设备的启动和关闭。[@more@]在redhat5中,raw文件的位置已经改变成/bin/raw,系统里面已经不存在/etc/sysconfig/rawdevices和/etc/init.d/rawdevices文件了,可以通过如下方法来管理raw文件。1,建立/etc/sysconfig/rawdevices文件,然后从其他操作系统上拷贝/etc/init.d/rawdevices到本地机,修改/etc/init.d/rawdevices文件中raw命令的具体位置,然后就可以通过/etc/init.d/rawdevices来启动和关闭raw文件了。2,上面的方
tar 命令一个比较有用的参数
在其他分区有一个tar的备份文件需要恢复到/目录,如果不用这个参数的话需要把tar文件拷贝到/目录下面然后解压,如果/目录的大小不够两个tar文件的大小(需要拷贝一次,解压一次),这个时候就比较麻烦了,用-c参数可以直接把文件解压到指定的目录:tar -xvf back.tar -C /把tar文件解压到/目录-C, --directory DIRchange to directory DIR[@more@]
linux find 命令!
一,basic find example1,find -name snow.pngsearch for files named snow.png in the current directory2,find -iname snow.pngcase-insensitive search for files named snow.png,Snow.png,SNOW.PNG, in the current directory[@more@]3,find / -name *.txtsearch for files anywhere on the system that end in .txt4,find /etc -name *pass*search ofr files in /etc/ that contaion pass in their name5,find /home -user joe -group joesearch ofr files owned by the user joe and the group joe in /home二,find and logical op
su: /bin/bash: Too many open files in system错误
切换到oracle的时候出错:[root@test ~]# su - oraclesu: /bin/bash: Too many open files in system[root@test ~]# [@more@]下面只说解决成功的过程[root@test ~]# cat /proc/sys/fs/file-max 512[root@test ~]#发现文件限制数太少查看/etc/sysctl.conf发现:fs.file-max = 512 * PROCESSES这个直接按照oracle的安装说明复制粘贴上去了,没有改动,修改为:kernel.sem=1055 32000 100 128kernel.shmmax=2147483648kernel.shmall = 2097152net.ipv4.tcp_sack = 0net.ipv4.tcp_timestamps = 0net.ipv4.conf.default.rp_filter = 0net.core.
rpm.statd进程属于哪个服务
在上一篇文章中(http://tonykorn97.itpub.net/post/6414/462027)我们看到了rpm.statd进程,现在我们来看看这个进程属于哪个服务。[@more@]共享和加载NFS文件系统需要什么服务? 解决方法:红帽企业Linux使用核心级的支持和守护进程的组合来提供NFS文件共享.NFS依靠远程过程调用(RPC)在客户端和服务器端路由请求。在Linux下RPC服务由portmap服务控制. 为了共享和加载NFS文件系统,下面的服务要一起工作: * nfs - 启动相应RPC服务进程来服务对于NFS文件系统的请求. * nfslock - 一个可选的服务,用于启动相应的RPC进程,允许