redhat linux共享文件,Vmware下Redhat Linux创建加载共享磁盘

1.虚拟机中创建新的磁盘,创建好后使用: [root@RHEL01 ~]# fdisk -l

查看新分出来的磁盘及代号

2.使用fdisk 为新建的磁盘如/dev/sdb 分区: fdisk /dev/sdb

Command (m for help): m Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delet

e a partition

l list known partition types 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 partition's system id u change display/entry units v verify the partition table w write table to disk and exit

x extra functionality (experts only)

3.将新建立的磁盘分区格式化为ext3的类型

[root@RHEL01 ~]# mkfs -t ext3 /dev/sdb1mke2fs 1.39 (29-May-2006)Filesystem label=OS type: Linux

Block size=4096 (log=2)Fragment size=4096 (log=2)1048576 inodes, 2096474 blocks

104823 blocks (5.00%) reserved for the super user First data block=0

Maximum filesystem blocks=214748364864 block groups

32768 blocks per group, 32768 fragments per group 16384 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Writing inode tables: done Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 35 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.[root@RHEL01 ~]#fdisk -l

4.挂载新硬盘及分区

[root@RHEL01 ~]# mkdir /mnt/newdisk

[root@RHEL01 ~]#mount /dev/sdb1 /mnt/newdisk [root@RHEL01 ~]# df -h

5.设置开机自动启动挂载分区

[root@RHEL01 ~]#

8c08ceb7db613c5ec9ed9c2950ab7daa.png

vi /etc/fstab

6.用NFS 共享挂载的新硬盘/mnt/newdisksdb1

11c4e0807eb78d47f64ff0592d1f7f5b.png

bf2191dce9f2e8f3e850c8ff6d0c278f.png

2be29db4e782d09ebde3b68a74eba5b1.png

a./etc/init.d/nfs start

b.创建或修改/etc/exports文件( 关闭防火墙 )/mnt/newdisksdb1 192.168.204.128(rw)

Service iptables stop

在其他客户机上建立同样的文件挂载点 mkdir /dev/newdisksdb1

c.查看远程机器硬盘挂载共享情况Showmount -e 192.168.204.128

Mount 192.168.204.128:/mnt/newdisksdb1 /mnt/newdisksdb1 d.修改/etc/fstab 的文件(注意以NFS 挂载)

注意:

a.在/etc/fstab 上有没有加上网络挂载硬盘;

b.查看服务器NFS 的服务有没有开;

c.查看服务器上的防火墙有没有关掉;

d.查看服务器上的/etc/exports 文件有没有问题;

如果客户机上部署好的挂载硬盘不见了,请检查

作者:天涯芳草 QQ :2455587060

Vmwa re 下Redhat Li nux创建加载共享磁盘

2011年11月26日

分区linux 创建加载共享磁盘的第1 页

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值