Which is also configured according to article Http://blog.163.com/[email protected]/blog/static/16581022720108162830579/
Original: http://blog.csdn.net/catoop/article/details/7334901
For Linux Server disk mount mount and share do simple instructions:
1. View the Used disk condition
Df–h
2. View all disks
Fdisk–l
3. View the partition of the specified disk "/dev/xvde"
Fdisk-l/dev/xvde
You can see that the disk is not partitioned
4. We now need to mount the/dev/xvde disk mount to the/OPT/HUIYY directory on the file system,
first the disk "/dev/xvde" Partition (here we use 1 partitions)
Command Fdisk/dev/xvde Enter, as follows:
Input W Write
Use Fdisk–l to view the disk number you just assigned
5. Format the disk
Command Mkfs-t Ext3/dev/xvde1
-t specifies that the file system type of the formatted disk is EXT3 and is not specified by default as ext2 (Linux old file system type)
followed by the partition number "/dev/xvde1" that you just created
6. Mount the disk
A) Create a disk Mount destination folder
Command Mkdir/opt/huiyy
b) Mount the disk
Command Mount/dev/xvde1/opt/huiyy
c) Log into the/ext/fstab file (prevent mount loss after reboot)
Command Vi/etc/fstab
Now that the disk is mounted, we can write the file to/opt/huiyy and the file will be written to our mounted disk.
7. Configuration Sharing
Shared directory "/opt/huiyy/resource" and "/opt/huiyy/log" Permissions "Rw,sync,no_root_squash"
Command Vi/etc/exports after editing content: Wq Save exit
Shared view command for More/etc/exports
8. Client Mount this directory
We have configured the server for the shared directory above as Server A, and we are now preparing the server for Mount shared directory as Server B
A) log on to Server B
b) Mount Directory "/opt/huiyy/log" (where 61.132.254.160 is Server a)
Mount-t nfs-orw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=061.132.254.160:/opt/huiyy/ Log/opt/huiyy/log
/opt/huiyy/log is a directory attached to this machine and can be defined by itself.
c) Save mount Mount configuration to/etc/fstab (prevent mount loss after server restart)
Command Vi/etc/fstab Edit
Command Cat/etc/fstab View Configuration
Both server B and File source Server A can now create files and directories under directory "/opt/huiyy/log".
End