随笔 - 175  文章 - 202  trackbacks - 0
<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

第一个Blog,记录哈哈的生活

常用链接

留言簿(16)

随笔分类

随笔档案

文章分类

文章档案

收藏夹

Java links

搜索

  •  

最新评论

阅读排行榜

评论排行榜

http://dev.mysql.com/doc/refman/5.5/en/connector-j-reference-implementation-notes.html @import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);


ResultSet

By default, ResultSets are completely retrieved and stored in memory. In most cases this is the most efficient way to operate, and due to the design of the MySQL network protocol is easier to implement. If you are working with ResultSets that have a large number of rows or large values, and cannot allocate heap space in your JVM for the memory required, you can tell the driver to stream the results back one row at a time.

To enable this functionality, create a Statement instance in the following manner:

stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY);
stmt.setFetchSize(Integer.MIN_VALUE);

The combination of a forward-only, read-only result set, with a fetch size of Integer.MIN_VALUE serves as a signal to the driver to stream result sets row-by-row. After this, any result sets created with the statement will be retrieved row-by-row.

There are some caveats with this approach. You must read all of the rows in the result set (or close it) before you can issue any other queries on the connection, or an exception will be thrown.

The earliest the locks these statements hold can be released (whether they be MyISAM table-level locks or row-level locks in some other storage engine such as InnoDB) is when the statement completes.

If the statement is within scope of a transaction, then locks are released when the transaction completes (which implies that the statement needs to complete first). As with most other databases, statements are not complete until all the results pending on the statement are read or the active result set for the statement is closed.

Therefore, if using streaming results, process them as quickly as possible if you want to maintain concurrent access to the tables referenced by the statement producing the result set.

posted @ 2012-06-29 13:15 哈哈的日子 阅读(466) | 评论 (0)编辑 收藏
在 Mac 上配置 Apache 和 SVN 极其方便。

序:
    之前在 Windows 上,因为心里美的原因,配置过 Apache 和 SVN 集成,使用 http 协议来访问 SVN。配置过程有些麻烦,也容易出错。
    后来,一直使用 svnserve -d,在 windows 上一般还会用 sc 命令做成 service,因为简单方便。

后来因为试验的目的,在 Mac 上配置了 Apache 和 SVN,我的 OS X 是 10.7 Lion
居然极其简单,只要在“系统偏好设置” -> “共享” 中,把 Web 共享打开,然后把个人网站点开(仅仅是不想修改全局配置文件)
然后修改文件 /private/etc/apache2/users/你的用户名.conf ,里面加上
# svn module
LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so

<Location /svn>
     DAV svn
     SVNListParentPath on
     SVNParentPath "/repository/svn/path"
</Location>

就可以了,
两个 svn 相关的 module 已经放好了,只要 load 一下就行。
配置方面还可以增加认证等等。为了权限管理得更细致,也可以使用 SVNPath 而不是 SVNParentPath。
唉,真是方便,Mac 用来开发,不错!

posted @ 2012-05-10 14:43 哈哈的日子 阅读(228) | 评论 (0)编辑 收藏
ssh 免密码登录,需要使用公私钥来认证@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

首先通过 ssh-keygen 生成一对公私钥,默认在 ~/.ssh/id_rsa.pub 和 ~/.ssh/id_rsa,前面的是公钥。
认证就是要把这个文件加到远程用户目录 ~/.ssh/authorized_keys 文件中,而且这个文件的权限不能被其它人访问。

下面的脚本能够自动把这个文件放到远程,方法是 ./addpk ip username password

#!//usr/bin/expect
set host [lrange $argv 0 0]
set user [lrange $argv 1 1]
set passwd [lrange $argv 2 2]
proc ssh {cmd} {
    global user host passwd
    spawn ssh $user@$host "$cmd"
    expect {
        "*conne*" {
            send "yes\n"
            expect "*password*"
            send "$passwd\n"
            expect eof
        }
        "*password*" {
            send "$passwd\n"
            expect eof
    }
    }
}
proc scp {src dest} {
    global user host passwd
    spawn scp $src $user@$host:$dest
    expect {
        "*conne*" {
            send "yes\n"
            expect "*password*"
            send "$passwd\n"
            expect eof
        }
        "*password*" {
            send "$passwd\n"
            expect eof
        }
    }
}
ssh "mkdir -p ~/.ssh"
scp "/home/user1/.ssh/id_rsa.pub" "~/.ssh/id_rsa.pub"
ssh "cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys"
ssh "uniq ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp"
ssh "mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys"
ssh "chmod 700 ~/.ssh"
ssh "chmod 600 ~/.ssh/*"

posted @ 2012-05-08 09:38 哈哈的日子 阅读(729) | 评论 (0)编辑 收藏

在 Eclipse 中执行下面代码。



        byte[] bytes = new byte[]{-16, -97, -116, -70};

        String s = new String(bytes, "UTF-8");

        System.out.println(s);


结果打印出了一朵花,呵呵,实在是太有意思了。

@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted @ 2012-04-17 15:25 哈哈的日子 阅读(165) | 评论 (0)编辑 收藏
Picasa 像册真的很给力,2048 像素以下(包含)的照片不计算空间,据说 15 分钟以内的也不算空间,除了这些,有1G的空间可以使用。
我现在用的 Aperture 或者是 iPhoto 都有 Picasa Plugin,上传照片非常方便,除了需要fanqiang外,没什么其它问题了。
虽然 Aperture 和 Facebook, Flickr 好像集成的更好,可实际上,Facebook 像素低,还不能选,Flickr 空间有要求。
 
posted @ 2012-02-27 10:54 哈哈的日子 阅读(252) | 评论 (0)编辑 收藏
这个文件已经在 /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/classes.jar
这里了,我在混淆代码的时候会用到,只要做个 link 就好了,如下:
sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/classes.jar /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/lib/rt.jar

@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted @ 2012-02-10 10:48 哈哈的日子 阅读(2338) | 评论 (0)编辑 收藏
目前有一个 10 台机器的小网,只有其中一台机器能够通过外网访问,其它机器需要先 ssh 到外网机器,然后再 ssh 一下,才能访问到,很麻烦,一些 scp 之类的软件也没法使用。之前,我一直是用 secure crt 端口转发来做的,也算方便,缺点就是一直要开一个 secure crt 窗口,还不能断,否则就全断开了。

后来同事告诉了我一个办法,叫 iptables,利用这台外网机器自己来进行转发,试了一下,的确要更方便一些。

iptables 本身是用来做 linux 防火墙的,还有一些转发功能。

配置起来比较方便。iptables 的配置文件是放在 /etc/sysconfig/iptables 下面的,缺省是没有这个文件的,需要先执行

外网机器:
外网 ip: 202.118.1.125
内网 ip: 111.111.111.111
端口: 8112

内网机器:
ip: 111.111.111.112

命令:

iptables -t nat -A PREROUTING -d 202.118.1.125 -p tcp --dport 8112 -j DNAT --to-destination 111.111.111.112:22
iptables -t nat -A POSTROUTING -d 111.111.111.112 -p tcp --dport 22 -j SNAT --to 111.111.111.111
iptables -A FORWARD -o eth0 -d 111.111.111.112 -p tcp --dport 22 -j ACCEPT
iptables -A FORWARD -i eth0 -s 111.111.111.112 -p tcp --sport 22 -j ACCEPT

然后再 iptables-save 这个文件就出来了。

通过 service iptables restart 就可以启动 iptables 服务。
奇怪的是 111.111.111.111 这台机器并没有 listen 8112 的端口,但你只要 ssh 202.118.1.125 8112,就真的能够连到 111.111.111.112 这台机器上,算是留下一个疑问吧。

@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted @ 2012-01-29 16:04 哈哈的日子 阅读(1406) | 评论 (0)编辑 收藏
L-Larry_Lau@163.com#24777-1i8da63tvtyl2#1119
L-Larry_Lau@163.com#61624-1dvrt8wj18v1#6260
L-Larry_Lau@163.com#50028-se4zkrr1m6t1#10246
L-Larry_Lau@163.com#15600-189y158nwwvuk#339
L-Larry_Lau@163.com#30640-1lklqdbcjmhxs#4016
L-Larry_Lau@163.com#57474-53b2wr1311gnz#10228
L-Larry_Lau@163.com#19667-11r2awc10nqelb#4016
L-Larry_Lau@163.com#60353-pphob7wraf0y#515
L-Larry_Lau@163.com#65157-1ae6ytp7ygj8m#0012
L-Larry_Lau@163.com#16226-1n5h5951019s7s#7343
posted @ 2011-12-27 21:04 哈哈的日子 阅读(1511) | 评论 (1)编辑 收藏
@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 问题:
    1. centos 5.5 通过 yum 安装 mysql,启动,一切正常。但是,修改 my.cnf 中的 datadir 到自定义目录,并初始化好数据库,使用原来的 mysql 文件就无法启动了。
    2. 通过 heartbeat 启动 mysql 遇到同样的问题。

解决:
    修改 /etc/selinux/config 文件中的  SELINUX=disabled,就可以运行了。

过程:
    定位问题的过程中,发现,只要 copy 出来的 mysql 脚本,就可以执行,原来的依然不可以。或者 mysql 数据库文件放到 /var/lib/mysql 下,就可以,其它位置,就不行。
    猜测,文件属性有什么不一样的?通过 ls -l 看权限,和 lsattr 看属性,都一模一样。
    但,知道原因后,使用 ls -Z 可以看到 selinux 相关的属性,这些文件是不一样的。
    
原因:
    不太清楚原因,但肯定的是,selinux 相关属性影响的,有空仔细看看相关文档。

下面这篇写得不错:

http://www.linux.gov.cn/netweb/selinux.htm

SELinux简介

SELinux全称是Security Enhanced Linux,由美国国家安全部(National Security Agency)领导开发的GPL项目,它拥有一个灵活而强制性的访问控制结构,旨在提高Linux系统的安全性,提供强健的安全保证,可防御未知攻击,据称相当于B1级的军事安全性能。比MS NT所谓的C2等高得多。

应用SELinux后,可以减轻恶意攻击或恶意软件带来的灾难,并提供对机密性和完整性有很高要求的信息很高的安全保障。 SELinux vs Linux 普通Linux安全和传统Unix系统一样,基于自主存取控制方法,即DAC,只要符合规定的权限,如规定的所有者和文件属性等,就可存取资源。在传统的安全机制下,一些通过setuid/setgid的程序就产生了严重安全隐患,甚至一些错误的配置就可引发巨大的漏洞,被轻易攻击。

而SELinux则基于强制存取控制方法,即MAC,透过强制性的安全策略,应用程序或用户必须同时符合DAC及对应SELinux的MAC才能进行正常操作,否则都将遭到拒绝或失败,而这些问题将不会影响其他正常运作的程序和应用,并保持它们的安全系统结构。

SELinux的相关配置文件

SELinux的配置相关文件都在/etc/selinux下,其中/etc/selinux/targeted目录里就包含了策略的详细配置和context定义,以下是主要文件及功用:

/etc/selinux/targeted/contexts/*_context 默认的context设置 
/etc/selinux/targeted/contexts/files/* 精确的context类型划分 
/etc/selinux/targeted/policy/* 策略文件

Apache under SELinux

Apache under SELinux - 让Apache跑得顺起来!
对于刚使用Redhat Enterprise Linux 4 或Fedora Core 2以上/CentOS 4的用户,一定会为Apache经常无法正常运转,报以"Permission denied"等错误而大为不解,甚至大为恼火。
其实这是因为这些系统里激活了SELinux,而用户的apache配置与SELinux的配置策略有抵触产生的,只有通过适当调整,使apache的配置和访问符合策略才能正常使用。
现在下面来分析一下SELinux中有关httpd(apache)的context定义(略有删节)

/home/[^/]+/((www)|(web)|(public_html))(/.+)? system_u:object_r:httpd_user_content_t
/var/www(/.*)? system_u:object_r:httpd_sys_content_t
/var/www/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_exec_t
/usr/lib/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_exec_t
/var/www/perl(/.*)? system_u:object_r:httpd_sys_script_exec_t
/var/www/icons(/.*)? system_u:object_r:httpd_sys_content_t
/var/cache/httpd(/.*)? system_u:object_r:httpd_cache_t
/etc/vhosts -- system_u:object_r:httpd_config_t
/usr/sbin/httpd -- system_u:object_r:httpd_exec_t
/usr/sbin/apache(2)? -- system_u:object_r:httpd_exec_t
/usr/sbin/suexec -- system_u:object_r:httpd_suexec_exec_t
/var/log/httpd(/.*)? system_u:object_r:httpd_log_t
/var/log/apache(2)?(/.*)? system_u:object_r:httpd_log_t
/var/log/cgiwrap\.log.* -- system_u:object_r:httpd_log_t
/var/cache/ssl.*\.sem -- system_u:object_r:httpd_cache_t
/var/cache/mod_ssl(/.*)? system_u:object_r:httpd_cache_t
/var/run/apache(2)?\.pid.* -- system_u:object_r:httpd_var_run_t
/var/lib/httpd(/.*)? system_u:object_r:httpd_var_lib_t
/var/lib/php/session(/.*)? system_u:object_r:httpd_var_run_t
/etc/apache-ssl(2)?(/.*)? system_u:object_r:httpd_config_t
/usr/lib/apache-ssl(/.*)? -- system_u:object_r:httpd_exec_t
/usr/sbin/apache-ssl(2)? -- system_u:object_r:httpd_exec_t
/var/log/apache-ssl(2)?(/.*)? system_u:object_r:httpd_log_t
/var/run/apache-ssl(2)?\.pid.* -- system_u:object_r:httpd_var_run_t
/var/run/gcache_port -s system_u:object_r:httpd_var_run_t
/var/lib/squirrelmail/prefs(/.*)? system_u:object_r:httpd_squirrelmail_t
/usr/bin/htsslpass -- system_u:object_r:httpd_helper_exec_t
/usr/share/htdig(/.*)? system_u:object_r:httpd_sys_content_t
/var/lib/htdig(/.*)? system_u:object_r:httpd_sys_content_t

针对上述的内容,可以对如下的几个常见问题进行简单处理:

1.phpmyadmin在非默认/var/www/html目录下无法运转

通常类似的情况都是在配置了虚拟主机时,访问/phpmyadmin等提示403访问拒绝,日志里也提示Permission denied,这是因为phpmyadmin防止的目录及文件本身属性不符合context要求。
假设phpmyadmin放在/web目录下,那么执行:
chcon -R -t httpd_user_content_t /web
则会令/web及其下所有子目录/文件,包括phpmyadmin文件都获得了httpd_user_content_t的属性,如果其传统的Unix属性对httpd来说是可读的话,再重新访问一下就应该可以了。

2./home目录下的虚拟主机无法运转

与问题1也是类似的,不过根据上文中context的定义,/home目录下必须是用户的$HOME/www或public_html或web目录才是 httpd_user_content_t类型,因此建议将要作为web页面的内容放置在用户的$HOME/www或web或public_html里,并确保其属性是httpd_user_content_t,使用如下命令查看:
ls -Z /home/abc/
drwxr-xr-x abc abc user_u:object_r:user_home_dir_t tmp
drwxrwxr-x abc abc user_u:object_r:httpd_user_content www
如不是,则可通过chcon来逐级目录及文件更改,直至最后能访问:
chcon -R -t httpd_user_content_t /home/abc/web
chcon -t user_home_dir_t /home/abc

3.CGI程序无法运行

如果cgi程序放在/var/www/cgi-bin/里也无法执行,遇到403或500错误的话,可以检查cgi程序的属性,按SELinux contexts文件里定义的,/var/www/cgi-bin/里必须是httpd_sys_script_exec_t 属性。通过ls -Z查看,如果不是则通过如下命令更改:
chcon -t httpd_sys_script_exec_t /var/www/cgi-bin/*.cgi
如果是虚拟主机里的cgi,则参考问题2使之能正常使用普通的功能后,再通过chcon设置cgi文件的context为httpd_sys_script_exec_t即可。

4.Setuid/gid 程序无法运行

例如早期的SqWebMail及qmailadmin等,需要setuid/gid的支持,但在SELinux下这将受到严格限制。第一种方法是比较彻底的办法,能保留系统的安全性,通过:
audit2allow -l -i /var/log/messages
将SELinux拒绝的信息转换为相应的policy allow指令,将这些指令添加到SELinux policy 的src里相应的配置文件,重新生成policy并加载。但这样做相对比较麻烦。
另一个方法最简单,但将使apache得不到保护。首先确定SELinux 类型是targeted的:
cat /etc/selinux/config|grep SELINUXTYPE
然后,使apache脱离SELinux保护:
setsebool -P httpd_disable_trans 1
然后重启动apache:
/etc/init.d/httpd restart
这样所有apache强制的检查都失效,需要setuid/gid的程序可以正常使用。但这样带来了增加漏洞的危险,对于迫切需要运行而又很急的情况,本方法是一个最大限度减少系统安全缺失的最后办法。对于取消SELinux 未必是一个好方法。

SElinux的几个相关命令

一.

ps -Z
ls -Z
id -Z

例:
[root@ljj cgi-bin]# ls -Z
-rwxrwxrwx root root root:object_r:httpd_sys_script_exec_t a.cgi
-rw-r--r-- root root root:object_r:httpd_sys_script_exec_t a.txt

二. chcon

修改文件的属性 fild1:fild2:fild3

chcon -u fild1 file
chcon -l fild2 file
chcon -t fild3 file

例:
chcon -u root file1

三.getsebool

获取se相关的bool值
例:
[root@ljj cgi-bin]# getsebool -a | grep httpd
httpd_builtin_scripting --> inactive
httpd_disable_trans --> active
httpd_enable_cgi --> active
httpd_enable_homedirs --> active
httpd_ssi_exec --> active
httpd_tty_comm --> inactive
httpd_unified --> inactive

得到了一些与httpd相关的bool值,配置httpd.conf中的user_dir时,要保证这里的httpd_enable_homedirs是 active的,还要保证:

chcon -R -t httpd_sys_content_t ~user/public_html;

  • httpd与selinux之间的关系更多详见:man httpd_selinux

四. togglesebool

给se的相关bool值取反
例:
togglesebool httpd_enable_homedirs


posted @ 2011-12-22 18:41 哈哈的日子 阅读(589) | 评论 (0)编辑 收藏

本次操作环境:

Ubuntu Server 10.10  

SCSI Harddisk:/dev/sda       500GB

U盘:/dev/sdb    8GB(模拟成USB Harddisk,安装OS)

 

介绍2种分区表:
MBR分区表:(MBR含义:主引导记录)
所支持的最大卷:2T (T; terabytes,1TB=1024GB)
对分区的设限:最多4个主分区或3个主分区加一个扩展分区。

GPT分区表:(GPT含义:GUID分区表)
支持最大卷:18EB,(E:exabytes,1EB=1024TB)
每个磁盘最多支持128个分区

 

所以如果要大于2TB的卷或分区就必须得用GPT分区表。

 

Linux下fdisk工具不支持GPT,得使用另一个GNU发布的强大分区工具parted。

fdisk工具用的话,会有下面的警告信息:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

下面是用parted工具对/dev/sda做GPT分区的过程:

root@node01:/mnt# parted /dev/sda
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.

 

(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk
will be lost. Do you want to continue?
Yes/No? yes         

   

(parted) print                                                            
Model: DELL PERC 6/i Adapter (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

 

(parted)mkpart primary 0KB 500GB
Warning: You requested a partition from 0.00B to 500GB.                   
The closest location we can manage is 17.4kB to 500GB.
Is this still acceptable to you?
Yes/No? yes                                                               
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore                          

 

(parted) print                                                            
Model: DELL PERC 6/i Adapter (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End    Size   File system  Name     Flags
 1      17.4kB  500GB  500GB               primary

 

(parted)quit                                                             
Information: You may need to update /etc/fstab.                           

root@node01:/#fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 499.6 GB, 499558383616 bytes
255 heads, 63 sectors/track, 60734 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60735   487849983+  ee  GPT

root@node01:/#mkfs.ext4 /dev/sda1
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
30490624 inodes, 121962487 blocks
6098124 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4294967296
3722 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000

正在写入inode表: 完成                            
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

 

root@node01:/#mount /dev/sda1 /export/glusterfs01/


root@node01:/# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/node01-root
                      6.8G  987M  5.5G  16% /
none                  7.9G  208K  7.9G   1% /dev
none                  7.9G     0  7.9G   0% /dev/shm
none                  7.9G   32K  7.9G   1% /var/run
none                  7.9G     0  7.9G   0% /var/lock
/dev/sdb1             228M   21M  196M  10% /boot
/dev/sda1             458G  198M  435G   1% /export/glusterfs01

 

root@node01:/#vi /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/node01-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb1 during installation
UUID=c21707ff-ba0f-43ee-819a-8e72fa0f8500 /boot           ext2    defaults        0       2
/dev/mapper/node01-swap_1 none            swap    sw              0       0
/dev/sda1       /export/glusterfs01     ext4    defaults        0       2

 

重启就可以自动挂载了!至此完成。

@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted @ 2011-12-21 15:56 哈哈的日子 阅读(16425) | 评论 (0)编辑 收藏
仅列出标题
共17页: 上一页 1 2 3 4 5 6 7 8 9 下一页 Last