ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:20.52KB ,
资源ID:18704201      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18704201.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(RHEL54文件系统管理1Word文档下载推荐.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

RHEL54文件系统管理1Word文档下载推荐.docx

1、可以使用fdisk工具来进行磁盘分区#Fdisk /dev/sda rootlocalhost # fdisk /dev/sdaThe number of cylinders for this disk is set to 1958.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) bootin

2、g and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)Command (m for help):进入了这个界面,就代表进入了fdisk的管理模式在这个时候,可以按“m”来获得帮助可Command (m for help): mCommand action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition t

3、ypes m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partitions system id u change display/entry units v verify the partition table w write table to disk and exit

4、x extra functionality (experts only)以安装上面的提示来进行磁盘分区,按“l”可以列出以知的文件类型,按“n”来添加分区,按“d”来删除分区,按“t”来改变分区的类型,按“q”退出,按“w”保存。等等,还有很多。下面就来添加一块新的分区 nFirst cylinder (1254-1958, default 1254): Using default value 1254Last cylinder or +size or +sizeM or +sizeK (1254-1958, default 1958): +500M按“n”来添加,下面问从哪个柱面数开始,直接

5、回车,选默认的。最后问这个分区分多大,我们分了500M还可以做很多事情,还可以按“t”来改变分区的类型,这个时候按“p”来查看刚刚的操作, p/dev/sda1 * 1 13 104391 83 Linux/dev/sda3 536 1057 4192965 83 Linux/dev/sda4 1058 1958 7237282+ 5 Extended/dev/sda6 1189 1253 522081 83 Linux/dev/sda7 1254 1315 497983+ 83 Linux可以看到已经分了一个/dev/sda7这个新的分区。 wqThe partition table has

6、 been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table.The new table will be used at the next reboot.Syncing disks.这个时候,已经保存并退出了,但是它给了一个警告:说设备忙,必须要下次重启才行。可以执行一条命令来更新分区(很重要的一条命令

7、)rootlocalhost # partprobe /dev/sda到目前为止,分区已经完成了,但分区并不能够正常使用,所以还有格式化分区。格式化分区#mkfs.ext3 /dev/sda7rootlocalhost # mkfs.ext3 /dev/sda7mke2fs 1.39 (29-May-2006)Filesystem label=OS type:Block size=1024 (log=0)Fragment size=1024 (log=0)124928 inodes, 497980 blocks24899 blocks (5.00%) reserved for the supe

8、r userFirst data block=1Maximum filesystem blocks=6763315261 block groups8192 blocks per group, 8192 fragments per group2048 inodes per groupSuperblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409Writing inode tables: done Creating journal (8192 blocks): doneWri

9、ting superblocks and filesystem accounting information:This filesystem will be automatically checked every 36 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.还可以在格式化的时候指定分区的block size 的大小rootlocalhost # mkfs.ext3 -b 4096 /dev/sda7这个时候这个分区就可以使用了,但是必须挂载。挂载分区#Mount /dev/sda7

10、/mntrootlocalhost # rootlocalhost # mount /dev/sda7 /mnt/rootlocalhost # df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 3.9G 2.5G 1.3G 68%/dev/sda6 494M 11M 458M 3% /home/dev/sda2 3.9G 1.8G 2.0G 47%/var/dev/sda1 99M 14M 81M 15%/boottmpfs 188M 0 188M 0% /dev/shm/dev/sda7 471M 11M 437M 3% /m

11、ntrootlocalhost # cd /mnt/rootlocalhost mnt# lslost+found下面关于文件系统的卷标卷标是另外一个识别设备的方法可以使用命令来查看分区的卷标#e2label /deb/sda7rootlocalhost # e2label /dev/sda7下面来给/dev/sda7添加一个卷标rootlocalhost # e2label /dev/sda7 /disk/disk当然,也可以使用卷标的方法挂载分区rootlocalhost # umount /dev/sda7rootlocalhost # mount LABEL=/disk /mnt/ro

12、otlocalhost # dfFilesystem 1K-blocks Used AvailableUse%Mounted on/dev/sda3 4061572 2589456 1262468 68%/dev/sda6 505604 10545 468955 3%/dev/sda2 4061572 1799208 2052716 47%/dev/sda1 101086 13588 82279 15%tmpfs 192132 0 192132 0%/dev/shm/dev/sda7 482214 10544 446771 3%rootlocalhost mnt#还可以使用mount命令不加任

13、何参数来查询系统中所有的设备,#mountrootlocalhost # mount/dev/sda3 on / type ext3 (rw)proc on /proc type proc (rw)sysfs on /sys type sysfs (rw)devpts on /dev/pts type devpts (rw,gid=5,mode=620)/dev/sda6 on /home type ext3 (rw)/dev/sda2 on /var type ext3 (rw)/dev/sda1 on /boot type ext3 (rw)tmpfs on /dev/shm type t

14、mpfs (rw)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)none on /proc/fs/vmblock/mountPoint type vmblock (rw)sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)nfsd on /proc/fs/nfsd type nfsd (rw)/dev/sda7 on /mnt type ext3 (rw)但是,mount命令只能够查询到系统中挂载的分区,没有挂载的分区查询不到还可以用blkid来查询系统中所有的分区,没有挂载的

15、分区也可以查到。还有一条命令,也就是用来查询的。#blkidrootlocalhost # blkid /dev/sda6: LABEL=/home UUID=7f75811c-8844-4d6d-a065-f4a1d75602dc TYPE=ext3/dev/sda5:SWAP-sda5swap/dev/sda3:/7c54f96f-7d2b-4da9-a4bf-3b474e0e460d/dev/sda1:/boot6663d1de-50d9-4cdf-a4f5-085cab5fa789/dev/sda2:/varb5306518-306a-4fcb-bdd5-dd4063bca9fe/de

16、v/hdc:RHEL/5.4 i386 DVDiso9660/dev/sda7:/disk3d68e924-8974-420d-81a9-aec7b9e95079下面来学习一个tune2fs这个工具(很强大)Tun2fs这个工具主要是用来查询文件系统的参数可以使用tun2fs l /dev/sda7来查询/dev/sda7这个分区的详细信息#tune2fs -l /dev/sda7rootlocalhost # tune2fs -l /dev/sda7tune2fs 1.39 (29-May-2006)Filesystem volume name: /diskLast mounted on:

17、Filesystem UUID: 3d68e924-8974-420d-81a9-aec7b9e95079Filesystem magic number: 0xEF53Filesystem revision #: 1 (dynamic)Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_superDefault mount options: (none)Filesystem state: cleanErrors behavior: ContinueFilesystem OS

18、 type:Inode count: 124928Block count: 497980Reserved block count: 24899Free blocks: 471670Free inodes: 124917First block: 1Block size: 1024Fragment size:Reserved GDT blocks: 256Blocks per group: 8192Fragments per group:Inodes per group: 2048Inode blocks per group:Filesystem created: Fri Feb 19 21:30

19、:36 2010Last mount time: Fri Feb 19 23:01:52 2010Last write time:Mount count: 4Maximum mount count: 36Last checked:Check interval: 15552000 (6 months)Next check after: Wed Aug 18 21:Reserved blocks uid: 0 (user root)Reserved blocks gid: 0 (group root)First inode: 11Inode size: 128Journal inode: 8Def

20、ault directory hash: teaDirectory Hash Seed: d49cd094-7bac-466f-bce7-f36e70b277b0Journal backup: inode blocks在这个里面,可以看到很多信息,可以看到工具的版本1.39版本,可以看到文件系统的卷标,最后一次挂载在哪里,文件系统的UUID是多少,还可以看到文件系统的状态,文件系统的类型,还有Inode count 和block count。还有空余的inode 和空闲的block .还可以看到block size。还可以看到文件系统是什么时候创建的,最后一次挂载在哪里等等很多信息。下面学习如

21、何用tune2fs这个工具来将ext2文件系统来转成ext3的文件系统这个过程是在线,是不会丢失数据的,但是不能够从ext3装成ext2.的文件系统这样会丢失数据的。rootlocalhost # mount | grep /dev/sda7/dev/sda7 on /mnt type ext2 (rw)可以看到,现在/dev/sda7是ext2的文件系统类型。将/boot下面的数据复制到/mnt,方便等下实验rootlocalhost # cp /boot/* /mnt/cp: omitting directory /boot/grub omitting directory /boot/lo

22、st+foundconfig-2.6.18-164.el5 initrd-2.6.18-164.el5kdump.img System.map-2.6.18-164.el5initrd-2.6.18-164.el5.img symvers-2.6.18-164.el5.gz vmlinuz-2.6.18-164.el5我们已经添加了一些文件到/dev/sda7里面,现在就开始将ext2的文件系统转换成ext3的文件系统。转换命令:#tune2fs -j /dev/sda7rootlocalhost # tune2fs -j /dev/sda7Creating journal inode:This filesystem will be automatically checked every 38 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override在使用blkid这个命令来查看一下转换是否成功,rootlocalhost # blkid UU

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1