[置顶] 信--陈明

[置顶] 几米--月亮忘记了

[置顶] 免责声明

AS5.4上做软RAID

[root@16nn.com ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         274     2096482+  83  Linux
/dev/sda3             275         405     1052257+  83  Linux
/dev/sda4             406        1044     5132767+   5  Extended
/dev/sda5             406         536     1052226   83  Linux
/dev/sda6             537         667     1052226   83  Linux
/dev/sda7             668         798     1052226   82  Linux swap / Solaris
/dev/sda8             799        1044     1975963+  83  Linux

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

创建分区并改变分区类型为Linux raid autodetect
[root@16nn.com ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): +100M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (14-1044, default 14):
Using default value 14
Last cylinder or +size or +sizeM or +sizeK (14-1044, default 1044): +200M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 3
First cylinder (39-1044, default 39):
Using default value 39
Last cylinder or +size or +sizeM or +sizeK (39-1044, default 1044):
Using default value 1044

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      104391   83  Linux
/dev/sdb2              14          38      200812+  83  Linux
/dev/sdb3              39        1044     8080695    5  Extended

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (39-1044, default 39):
Using default value 39
Last cylinder or +size or +sizeM or +sizeK (39-1044, default 1044): +500M

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (101-1044, default 101):
Using default value 101
Last cylinder or +size or +sizeM or +sizeK (101-1044, default 1044): +600M

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      104391   83  Linux
/dev/sdb2              14          38      200812+  83  Linux
/dev/sdb3              39        1044     8080695    5  Extended
/dev/sdb5              39         100      497983+  83  Linux
/dev/sdb6             101         174      594373+  83  Linux

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (175-1044, default 175):
Using default value 175
Last cylinder or +size or +sizeM or +sizeK (175-1044, default 1044): +700M

Command (m for help):
Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      104391   83  Linux
/dev/sdb2              14          38      200812+  83  Linux
/dev/sdb3              39        1044     8080695    5  Extended
/dev/sdb5              39         100      497983+  83  Linux
/dev/sdb6             101         174      594373+  83  Linux
/dev/sdb7             175         260      690763+  83  Linux

Command (m for help): t
Partition number (1-7): 5
Hex code (type L to list codes): fd
Changed system type of partition 5 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      104391   83  Linux
/dev/sdb2              14          38      200812+  83  Linux
/dev/sdb3              39        1044     8080695    5  Extended
/dev/sdb5              39         100      497983+  fd  Linux raid autodetect
/dev/sdb6             101         174      594373+  83  Linux
/dev/sdb7             175         260      690763+  83  Linux

Command (m for help): t
Partition number (1-7): 6
Hex code (type L to list codes): fd
Changed system type of partition 6 to fd (Linux raid autodetect)

Command (m for help): t
Partition number (1-7): 7
Hex code (type L to list codes): fd
Changed system type of partition 7 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      104391   83  Linux
/dev/sdb2              14          38      200812+  83  Linux
/dev/sdb3              39        1044     8080695    5  Extended
/dev/sdb5              39         100      497983+  fd  Linux raid autodetect
/dev/sdb6             101         174      594373+  fd  Linux raid autodetect
/dev/sdb7             175         260      690763+  fd  Linux raid autodetect

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

输入下面的命令不重启直接使用分区后的硬盘
[root@16nn.com ~]# partprobe
Warning: Unable to open /dev/hdc read-write (Read-only file system).  /dev/hdc has been opened read-only.

创建RAID
[root@16nn.com ~]# mdadm -C /dev/md11 -l1 -n2 /dev/sdb{5,6}
mdadm: largest drive (/dev/sdb6) exceed size (497856K) by more than 1%
Continue creating array? y
mdadm: array /dev/md11 started.
后面的-l是说明RAID的类型,这里是RAID1,如果你要做RAID5就把后面的1改为5
-n是分区的数量,这里是两块,注意做RAID5至少需要3个分区

如果系统是RHEL5.1之前的版本需要先输入下面的命令创建对应的md设备

 

mknod /dev/md1 b 9 1

mknod /dev/md2 b 9 2

mknod /dev/md3 b 9 3

 

查看RAID情况
[root@16nn.com ~]# cat /proc/mdstat
Personalities : [raid1]
md11 : active raid1 sdb6[1] sdb5[0]
      497856 blocks [2/2] [UU]
     
unused devices: <none>

如果其中一块硬盘块掉的话,先标记再删除
[root@16nn.com ~]# mdadm /dev/md11 -f /dev/sdb5        标记坏的硬盘
[root@16nn.com ~]# mdadm /dev/md11 -r /dev/sdb5        删除坏的硬盘

[root@16nn.com ~]# mdadm /dev/md11 -a /dev/sdb5       添加新的硬盘

[root@16nn.com ~]# mdadm /dev/md11 -A /dev//dev/sdb{5,6}   启动被停止的阵列

More...

让Red Hat Enterprise Linux Server release 5.4支持NTFS分区

搞了近半天时间终于搞定啦!有需要帮忙的直接留言!内核版本:2.6.18-164.el5参考http://hi.baidu.com/daizhongxian/blog/item/458b46dfb28125196227987b.html解决的,内容如下:

提前声明ntfs-3g对ntfs支持不是很完美,个人不推荐开启写入功能,设置为只读比较保险!!!

系统环境
[root@spnode1 ~]# cat /etc/redhat-release
...

More...

搭建yum服务器

1、mount /dev/hdc /media                挂载光盘

2、mkdir /yum        建立yum这个目录

3、cp /media/Server/*.rpm /yum        copy所有的rpm包到/yum下

More...

网络很OK,我们才有病

  2009年5月14日,我国首个《网络成瘾诊断治疗标准》通过国内众多精神医学专家的论证。“网络成瘾综合征”成为一种新型精神疾病,引起社会关注。
  本质上说,网络成瘾是一种心理障碍,多见于18岁~24岁的年轻人。这个年龄的人最孤独,缺乏社交经验,对健康无意识,容易患病。
  网络成瘾并非一蹴而就,而是由生活中若干“习惯”“不以为然”叠加而成。
  想与网络保持健康的关系,需要从预防开始。

More...

AS5.4上安装配置samba服务器

先查询是否安装
[root@16nn.com ~]# rpm -qa|grep samba
samba-common-3.0.33-3.14.el5
samba-client-3.0.33-3.14.el5
 

挂载光驱安装
[root@16nn.com ~]# mount /dev/hdc /media/
[root@16nn.com ~]# rpm -ivh /media/Server/samba-3.0.33-3.14.el5.i386.rpm

More...

asterisk user、peer和friend

 UsersPeers 以及Friends
...

More...

下雪了

私人文章,登录状态下方可查看。

Red Hat Enterprise5.4下搭建DNS服务器

理论知识略过。首先rpm -qa|grep bind        确认是已安装DNS服务 出现以下内容则说明该Server已安装过

bind-libs-9.3.6-4.P1.el5

bind-utils-9.3.6-4.P1.el5

bind-9.3.6-4.P1.el5

bind-chroot-9.3.6-4.P1.el5

若未安装则挂载光盘        mount /de/hdc /media

...

More...

最应知道的10条心理学规律

        心理规律一:罗森塔尔效应

        美国著名的心理学家罗森塔尔曾做过这样一个试验: 

        他把一群小白鼠随机地分成两组:A组和B组,并且告诉A组的饲养员说,这一组的老鼠非常聪明;同时又告诉B组的饲养员说他这一组的老鼠智力一般。几个月后,教授对这两组的老鼠进行穿越迷宫的测试,发现A组的老鼠竟然真的比B组的老鼠聪明,它们能够先走出迷宫并找到食物。 

More...

惠普宣布以27亿美元现金收购3Com

 

网易科技讯 11月12日消息,据路透社报道,惠普公司当日宣布以约27亿美元现金价格,收购网络软件及设备生产商3Com公司。3Com的产品将整合到惠普的网络设备部门。惠普表示,此协议可加强其网络设备业务,并扩大在中国的业务。

惠普称,将按照7.90美元/股的价格现金收购3Com,对该公司的估值约为27亿美元。3Com目前正处于战略转折点,一直在努力打开中国以外的大企业市场,挑战网络设备巨头思科系统公司。3Com称,协议已经获得两家公司董事会批准,预计将在明年上半年完成。

More...