Nfs服务器配置

Nfs服务器配置
试验通过环境以及安装步骤
Redhat6.4 x86_64 minimal 全新纯净系统一台,root 权限
VMware workstations 14 pro
Server 端
第一步:添加新硬盘
第二步:新硬盘分区
第三步:创建lvm卷
第四步:挂载lvm卷
第五步:rpm安装nfs、rpcbind以及配置nfs服务
第六步:本机测试服务器是否正常
第七步: 服务配置信息收集

Server 端
一、添加新硬盘
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
二、格式化硬盘
[root@HzcimgNFS02 ~]# fdisk /dev/sdb 根据硬盘的编号进行分区
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x430952a6.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
switch off the mode (command ‘c’) and change display units to
sectors (command ‘u’).

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete 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)

Command (m for help): n
Command action
e extended
p primary partition (1-4) p
Partition number (1-4): 1
First cylinder (1-253981, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-253981, default 253981):
Using default value 253981

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e 配置当前文件系统为lvm
Changed system type of partition 1 to 8e (Linux LVM)

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@HzcimgNFS02 ~]# fdisk –l 查看分区的硬盘

Disk /dev/sdb: 2089.1 GB, 2089072092160 bytes
255 heads, 63 sectors/track, 253981 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: 0x430952a6

Device Boot Start End Blocks Id System
/dev/sdb1 1 253981 2040102351 8e Linux LVM

Disk /dev/sda: 64.4 GB, 64424509440 bytes
64 heads, 32 sectors/track, 61440 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000810a1

Device Boot Start End Blocks Id System
/dev/sda1 * 2 201 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 202 61440 62708736 8e Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/sdd: 2089.1 GB, 2089072092160 bytes
255 heads, 63 sectors/track, 253981 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: 0x26d06fea

Device Boot Start End Blocks Id System
/dev/sdd1 1 253981 2040102351 8e Linux LVM

Disk /dev/sde: 1539.3 GB, 1539316278272 bytes
255 heads, 63 sectors/track, 187144 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: 0xfa1f6a15

Device Boot Start End Blocks Id System
/dev/sde1 1 187144 1503234148+ 8e Linux LVM

Disk /dev/sdc: 2089.1 GB, 2089072092160 bytes
255 heads, 63 sectors/track, 253981 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: 0x728e9369

Device Boot Start End Blocks Id System
/dev/sdc1 1 253981 2040102351 8e Linux LVM

三、创建lvm卷
[root@HzcimgNFS02 ~]# pvcreate /dev/sdb1 创建物理卷(pv)
Physical volume “/dev/sdb1” successfully created
[root@HzcimgNFS02 ~]# vgcreate Datavg /dev/sdb1 创建卷组(vg)
Volume group “Datavg” successfully created
[root@HzcimgNFS02 ~]# vgextend Datavg /dev/sdc1 扩展卷组(vg)
No physical volume label read from /dev/sdc1
Physical volume “/dev/sdc1” successfully created
Volume group “Datavg” successfully extended
[root@HzcimgNFS02 ~]# vgdisplay 查看卷组信息
— Volume group —
VG Name Datavg
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 4
Act PV 4
VG Size 7.10 TiB
PE Size 4.00 MiB
Total PE 1861213
Alloc PE / Size 0 / 0
Free PE / Size 1861213 / 7.10 TiB
VG UUID SPvTm3-17DX-3spk-hfHs-mRMJ-Yb8Z-6PBmKe

— Volume group —
VG Name sysvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 8
Open LV 8
Max PV 0
Cur PV 1
Act PV 1
VG Size 59.80 GiB
PE Size 4.00 MiB
Total PE 15309
Alloc PE / Size 15052 / 58.80 GiB
Free PE / Size 257 / 1.00 GiB
VG UUID N122VR-YfRV-Hfmf-NHuV-VkLb-4F3l-X85gKD

[root@HzcimgNFS02 ~]# lvcreate -l 100%FREE -n Imagelv Datavg 创建逻辑卷(可以定义大小,也可以全部使用)
Logical volume “Imagelv” created
[root@HzcimgNFS02 ~]# lvs 查看逻辑卷信息
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
Imagelv Datavg -wi-a---- 7.10t
lvhome sysvg -wi-ao— 1.02g
lvopt sysvg -wi-ao— 1.02g
lvroot sysvg -wi-ao— 2.03g
lvswap sysvg -wi-ao— 8.02g
lvtmp sysvg -wi-ao— 4.06g
lvu01 sysvg -wi-ao— 30.47g
lvusr sysvg -wi-ao— 8.12g
lvvar sysvg -wi-ao— 4.06g
[root@HzcimgNFS02 ~]# mkfs.ext4 /dev/Datavg/Imagelv 格式化逻辑卷(文件系统格式可以根据需求进行)
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
476471296 inodes, 1905882112 blocks
95294105 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
58163 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, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
四、挂载lvm卷
[root@HzcimgNFS02 ~]# mkdir /Image 创建挂载目录
[root@HzcimgNFS02 ~]# chmod 777 /Image/ 赋予该目录写入权限
[root@HzcimgNFS02 ~]# vi /etc/fstab 配置挂载信息
/dev/Datavg/Imagelv /Image ext4 defaults 1 0
[root@HzcimgNFS02 ~]# mount –a 刷新挂载信息
[root@HzcimgNFS02 ~]# df –h 查看当前是否挂载成功
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sysvg-lvroot
2.0G 283M 1.7G 15% /
tmpfs 3.9G 76K 3.9G 1% /dev/shm
/dev/sda1 194M 32M 152M 18% /boot
/dev/mapper/sysvg-lvhome
1.0G 34M 939M 4% /home
/dev/mapper/sysvg-lvopt
1.0G 34M 939M 4% /opt
/dev/mapper/sysvg-lvtmp
4.0G 335M 3.5G 9% /tmp
/dev/mapper/sysvg-lvu01
30G 176M 29G 1% /u01
/dev/mapper/sysvg-lvusr
8.0G 2.5G 5.2G 32% /usr
/dev/mapper/sysvg-lvvar
4.0G 218M 3.6G 6% /var
/dev/mapper/Datavg-Imagelv
7.0T 177M 6.7T 1% /Image
五、安装nfs、rpcbind服务以及配置服务
1)安装所需的软件(因为要使用RPM的方式安装,所以需要手动安装依赖包)
keyutils-1.4-4.el6.x86_64.rpm、libevent-1.4.13-4.el6.x86_64.rpm
libgssglue-0.1-11.el6.x86_64.rpm 、libtirpc-0.2.1-5.el6.x86_64.rpm
rpcbind-0.2.0-9.el6.x86_64.rpm、nfs-utils-lib-1.1.5-4.el6.x86_64.rpm
nfs-utils-1.2.3-26.el6.x86_64.rpm
2)使用RPM –ivh 命令进行安装(如果不能安装可以输入 –nodeps进行强制安装)
rpm -ivh keyutils-1.4-4.el6.x86_64.rpm
rpm -ivh libevent-1.4.13-4.el6.x86_64.rpm
rpm -ivh libgssglue-0.1-11.el6.x86_64.rpm
rpm -ivh libtirpc-0.2.1-5.el6.x86_64.rpm
rpm -ivh rpcbind-0.2.0-9.el6.x86_64.rpm
rpm -ivh nfs-utils-lib-1.1.5-4.el6.x86_64.rpm nfs-utils-1.2.3-26.el6.x86_64.rpm
[root@HzcimgNFS02 ~]# vi /etc/exports 编辑nfs服务器配置信息
/Image 10.11.1.118(rw,sync,no_root_squash) 10.11.1.119(rw,sync,no_root_squash)(这里可以允许所有、也可以限制那个网段或者IP进行连接)
[root@HzcimgNFS02 ~]# chkconfig nfs on 设置服务开启自动启动
[root@HzcimgNFS02 ~]# chkconfig rpcbind on 设置服务开启自动启动
[root@HzcimgNFS02 ~]# service nfs start 启动服务
六、本机测试
[root@HzcimgNFS02 ~]# showmount -e 10.11.1.155 查看当前服务器共享目录
Export list for 10.11.1.155:
/Image 10.11.1.119,10.11.1.118
[root@HzcimgNFS02 ~]#mount 10.11.1.155:/Image /mnt 挂载nfs共享目录
七、配置信息收集
[root@HzcimgNFS01 ~]# ll /dev/disk/by-id/ 获取当前磁盘设备的序列号
total 0
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-Datavg-Imagelv -> …/…/dm-2
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvhome -> …/…/dm-5
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvopt -> …/…/dm-3
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvroot -> …/…/dm-0
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvswap -> …/…/dm-1
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvtmp -> …/…/dm-4
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvu01 -> …/…/dm-8
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvusr -> …/…/dm-6
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-name-sysvg-lvvar -> …/…/dm-7
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-5KUYU4QLJGlo0dP3PXh69Tq5kNgUP0J118A40dlYvSAe0rtCJuLlP08KDoH4higg -> …/…/dm-2
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKD0S0igrmMce89IxDTzk6Pdp7ap4P1UmbI -> …/…/dm-6
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDf58zziUcyk2OwrX77IZzv64wKDQmygle -> …/…/dm-0
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDfePuCOREA37Phn0CAJu1oFDRIG3zUHjq -> …/…/dm-5
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDL6ml1BCxdNemup1qgVI4vwugGTq1ktUH -> …/…/dm-8
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDOItojxanYfCciWVRr7BBzsXMGzjbd2Ug -> …/…/dm-1
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDrdEYkLktMi8o1z3XtxG0xBgtYK4ojdYW -> …/…/dm-7
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDtEEEfe7ZYEuynbkHcodqMhjndWx6YxNt -> …/…/dm-3
lrwxrwxrwx 1 root root 10 Sep 26 16:32 dm-uuid-LVM-N122VRYfRVHfmfNHuVVkLb4F3lX85gKDTVMDmOHurdvKqI4k2EeRN456tdqRLsbt -> …/…/dm-4
[root@HzcimgNFS01 ~]# ll /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Sep 26 16:32 123d6a77-e712-4e17-b8b3-88a620f7563d -> …/…/dm-4
lrwxrwxrwx 1 root root 10 Sep 26 16:32 13385255-6035-4bae-9008-b0daef374101 -> …/…/sda1
lrwxrwxrwx 1 root root 10 Sep 26 16:32 29486a37-e566-4025-9520-964ca077b305 -> …/…/dm-1
lrwxrwxrwx 1 root root 10 Sep 26 16:32 37dd2b99-5651-4b4a-b93f-7d3133984673 -> …/…/dm-0
lrwxrwxrwx 1 root root 10 Sep 26 16:32 53f714ce-5e62-4133-ac23-d2aabee5743b -> …/…/dm-6
lrwxrwxrwx 1 root root 10 Sep 26 16:32 6348140c-c706-40fc-a472-dddf25794884 -> …/…/dm-3
lrwxrwxrwx 1 root root 10 Sep 26 16:32 648342c7-64a6-4845-bbea-98df6c952e9a -> …/…/dm-5
lrwxrwxrwx 1 root root 10 Sep 26 16:32 75429720-66ec-49d2-bb3d-b8f1f0f2ab82 -> …/…/dm-2
lrwxrwxrwx 1 root root 10 Sep 26 16:32 b3216bc3-e04a-4737-8ac6-a80fe64039d7 -> …/…/dm-8
lrwxrwxrwx 1 root root 10 Sep 26 16:32 fdc06e75-7dbb-4d2c-a260-af51652bbfd7 -> …/…/dm-7
[root@HzcimgNFS01 ~]# fdisk –l 当前服务器硬盘信息

Disk /dev/sda: 64.4 GB, 64424509440 bytes
64 heads, 32 sectors/track, 61440 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000810a1

Device Boot Start End Blocks Id System
/dev/sda1 * 2 201 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 202 61440 62708736 8e Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/sdb: 2089.1 GB, 2089072092160 bytes
255 heads, 63 sectors/track, 253981 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: 0xcb0b345a

Device Boot Start End Blocks Id System
/dev/sdb1 1 253981 2040102351 8e Linux LVM

Disk /dev/sdc: 2089.1 GB, 2089072092160 bytes
255 heads, 63 sectors/track, 253981 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: 0x9dc926e1

Device Boot Start End Blocks Id System
/dev/sdc1 1 253981 2040102351 8e Linux LVM

Disk /dev/sde: 1539.3 GB, 1539316278272 bytes
255 heads, 63 sectors/track, 187144 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: 0x164f771d

Device Boot Start End Blocks Id System
/dev/sde1 1 187144 1503234148+ 8e Linux LVM

Disk /dev/sdd: 2089.1 GB, 2089072092160 bytes
255 heads, 63 sectors/track, 253981 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: 0xf0dc34d0

Device Boot Start End Blocks Id System
/dev/sdd1 1 253981 2040102351 8e Linux LVM

Disk /dev/mapper/sysvg-lvroot: 2181 MB, 2181038080 bytes
255 heads, 63 sectors/track, 265 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

Disk /dev/mapper/sysvg-lvswap: 8606 MB, 8606711808 bytes
255 heads, 63 sectors/track, 1046 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

Disk /dev/mapper/Datavg-Imagelv: 7806.1 GB, 7806103060480 bytes
255 heads, 63 sectors/track, 949037 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

Disk /dev/mapper/sysvg-lvopt: 1090 MB, 1090519040 bytes
255 heads, 63 sectors/track, 132 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

Disk /dev/mapper/sysvg-lvtmp: 4362 MB, 4362076160 bytes
255 heads, 63 sectors/track, 530 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

Disk /dev/mapper/sysvg-lvhome: 1090 MB, 1090519040 bytes
255 heads, 63 sectors/track, 132 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

Disk /dev/mapper/sysvg-lvusr: 8724 MB, 8724152320 bytes
255 heads, 63 sectors/track, 1060 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

Disk /dev/mapper/sysvg-lvvar: 4362 MB, 4362076160 bytes
255 heads, 63 sectors/track, 530 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

Disk /dev/mapper/sysvg-lvu01: 32.7 GB, 32715571200 bytes
255 heads, 63 sectors/track, 3977 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

[root@HzcimgNFS01 ~]# df –h 当前服务器的硬盘容量
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sysvg-lvroot
2.0G 283M 1.7G 15% /
tmpfs 3.9G 72K 3.9G 1% /dev/shm
/dev/sda1 194M 32M 152M 18% /boot
/dev/mapper/sysvg-lvhome
1.0G 34M 939M 4% /home
/dev/mapper/sysvg-lvopt
1.0G 34M 939M 4% /opt
/dev/mapper/sysvg-lvtmp
4.0G 335M 3.5G 9% /tmp
/dev/mapper/sysvg-lvu01
30G 176M 29G 1% /u01
/dev/mapper/sysvg-lvusr
8.0G 2.5G 5.2G 32% /usr
/dev/mapper/sysvg-lvvar
4.0G 218M 3.6G 6% /var
/dev/mapper/Datavg-Imagelv
7.0T 177M 6.7T 1% /Image
[root@HzcimgNFS01 ~]# cat /etc/exports 当前NFS服务配置信息
/Image 10.11.1.118(rw,sync,no_root_squash) 10.11.1.119(rw,sync,no_root_squash)
[root@HzcimgNFS01 ~]# cat /etc/fstab

/etc/fstab

Created by anaconda on Sat Sep 15 20:35:43 2018

Accessible filesystems, by reference, are maintained under ‘/dev/disk’

See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

/dev/mapper/sysvg-lvroot / ext4 defaults 1 1
UUID=13385255-6035-4bae-9008-b0daef374101 /boot ext4 defaults 1 2
/dev/mapper/sysvg-lvhome /home ext4 defaults 1 2
/dev/mapper/sysvg-lvopt /opt ext4 defaults 1 2
/dev/mapper/sysvg-lvtmp /tmp ext4 defaults 1 2
/dev/mapper/sysvg-lvu01 /u01 ext4 defaults 1 2
/dev/mapper/sysvg-lvusr /usr ext4 defaults 1 2
/dev/mapper/sysvg-lvvar /var ext4 defaults 1 2
/dev/mapper/sysvg-lvswap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
#NFS
#Hzcftpsvr01:/u02/Software /u01/install nfs ro,rsize=32768,wsize=32768,bg,hard,intr 0 0
/dev/Datavg/Imagelv /Image ext4 defaults 1 0
[root@HzcimgNFS01 ~]# pvs&vgs&lvs
[1] 2680
[2] 2681
PV VG Fmt Attr PSize PFree
/dev/sda2 sysvg lvm2 a-- 59.80g 1.00g
/dev/sdb1 Datavg lvm2 a-- 1.90t 0
/dev/sdc1 Datavg lvm2 a-- 1.90t 0
/dev/sdd1 Datavg lvm2 a-- 1.90t 0
/dev/sde1 Datavg lvm2 a-- 1.40t 0
VG #PV #LV #SN Attr VSize VFree
Datavg 4 1 0 wz–n- 7.10t 0
sysvg 1 8 0 wz–n- 59.80g 1.00g
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
Imagelv Datavg -wi-ao— 7.10t
lvhome sysvg -wi-ao— 1.02g
lvopt sysvg -wi-ao— 1.02g
lvroot sysvg -wi-ao— 2.03g
lvswap sysvg -wi-ao— 8.02g
lvtmp sysvg -wi-ao— 4.06g
lvu01 sysvg -wi-ao— 30.47g
lvusr sysvg -wi-ao— 8.12g
lvvar sysvg -wi-ao— 4.06g
[1]- Done pvs
[2]+ Done vgs
[root@HzcimgNFS01 ~]# pvdisplay 当前物理卷配置信息
— Physical volume —
PV Name /dev/sdb1
VG Name Datavg
PV Size 1.90 TiB / not usable 95.45 MiB
Allocatable yes (but full)
PE Size 128.00 MiB
Total PE 15564
Free PE 0
Allocated PE 15564
PV UUID yMWTAj-MqNI-FowG-xujW-ttEI-bwui-YFlFeH

— Physical volume —
PV Name /dev/sdc1
VG Name Datavg
PV Size 1.90 TiB / not usable 95.45 MiB
Allocatable yes (but full)
PE Size 128.00 MiB
Total PE 15564
Free PE 0
Allocated PE 15564
PV UUID H459wV-23ZV-P3mb-GW6d-cMJ7-BqkD-EqCYGP

— Physical volume —
PV Name /dev/sdd1
VG Name Datavg
PV Size 1.90 TiB / not usable 95.45 MiB
Allocatable yes (but full)
PE Size 128.00 MiB
Total PE 15564
Free PE 0
Allocated PE 15564
PV UUID 02BdFK-dnMb-VHkE-N9db-lf7D-yQvv-ZwZxf7

— Physical volume —
PV Name /dev/sde1
VG Name Datavg
PV Size 1.40 TiB / not usable 98.10 MiB
Allocatable yes (but full)
PE Size 128.00 MiB
Total PE 11468
Free PE 0
Allocated PE 11468
PV UUID CW94lU-RJQc-c8l3-7mCB-xGXb-2EEw-2uhPS5

— Physical volume —
PV Name /dev/sda2
VG Name sysvg
PV Size 59.80 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 15309
Free PE 257
Allocated PE 15052
PV UUID 9SuKiY-1Zng-erri-4MUK-aORc-kq0o-sfB5w6

[root@HzcimgNFS01 ~]# vgdisplay 当前卷组配置信息
— Volume group —
VG Name Datavg
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 4
Act PV 4
VG Size 7.10 TiB
PE Size 128.00 MiB
Total PE 58160
Alloc PE / Size 58160 / 7.10 TiB
Free PE / Size 0 / 0
VG UUID 5KUYU4-QLJG-lo0d-P3PX-h69T-q5kN-gUP0J1

— Volume group —
VG Name sysvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 8
Open LV 8
Max PV 0
Cur PV 1
Act PV 1
VG Size 59.80 GiB
PE Size 4.00 MiB
Total PE 15309
Alloc PE / Size 15052 / 58.80 GiB
Free PE / Size 257 / 1.00 GiB
VG UUID N122VR-YfRV-Hfmf-NHuV-VkLb-4F3l-X85gKD

[root@HzcimgNFS01 ~]# lvdisplay 当前逻辑卷配置信息
— Logical volume —
LV Path /dev/Datavg/Imagelv
LV Name Imagelv
VG Name Datavg
LV UUID 18A40d-lYvS-Ae0r-tCJu-LlP0-8KDo-H4higg
LV Write Access read/write
LV Creation host, time HzcimgNFS01, 2018-09-26 14:48:23 +0800
LV Status available

open 1

LV Size 7.10 TiB
Current LE 58160
Segments 4
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:2

— Logical volume —
LV Path /dev/sysvg/lvopt
LV Name lvopt
VG Name sysvg
LV UUID tEEEfe-7ZYE-uynb-kHco-dqMh-jndW-x6YxNt
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:06 +0800
LV Status available

open 1

LV Size 1.02 GiB
Current LE 260
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:3

— Logical volume —
LV Path /dev/sysvg/lvroot
LV Name lvroot
VG Name sysvg
LV UUID f58zzi-Ucyk-2Owr-X77I-Zzv6-4wKD-Qmygle
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:06 +0800
LV Status available

open 1

LV Size 2.03 GiB
Current LE 520
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:0

— Logical volume —
LV Path /dev/sysvg/lvswap
LV Name lvswap
VG Name sysvg
LV UUID OItojx-anYf-CciW-VRr7-BBzs-XMGz-jbd2Ug
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:07 +0800
LV Status available

open 1

LV Size 8.02 GiB
Current LE 2052
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:1

— Logical volume —
LV Path /dev/sysvg/lvtmp
LV Name lvtmp
VG Name sysvg
LV UUID TVMDmO-Hurd-vKqI-4k2E-eRN4-56td-qRLsbt
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:08 +0800
LV Status available

open 1

LV Size 4.06 GiB
Current LE 1040
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:4

— Logical volume —
LV Path /dev/sysvg/lvhome
LV Name lvhome
VG Name sysvg
LV UUID fePuCO-REA3-7Phn-0CAJ-u1oF-DRIG-3zUHjq
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:09 +0800
LV Status available

open 1

LV Size 1.02 GiB
Current LE 260
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:5

— Logical volume —
LV Path /dev/sysvg/lvusr
LV Name lvusr
VG Name sysvg
LV UUID 0S0igr-mMce-89Ix-DTzk-6Pdp-7ap4-P1UmbI
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:10 +0800
LV Status available

open 1

LV Size 8.12 GiB
Current LE 2080
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:6

— Logical volume —
LV Path /dev/sysvg/lvvar
LV Name lvvar
VG Name sysvg
LV UUID rdEYkL-ktMi-8o1z-3Xtx-G0xB-gtYK-4ojdYW
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:12 +0800
LV Status available

open 1

LV Size 4.06 GiB
Current LE 1040
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:7

— Logical volume —
LV Path /dev/sysvg/lvu01
LV Name lvu01
VG Name sysvg
LV UUID L6ml1B-CxdN-emup-1qgV-I4vw-ugGT-q1ktUH
LV Write Access read/write
LV Creation host, time HzcTmpApp01, 2018-09-15 10:14:14 +0800
LV Status available

open 1

LV Size 30.47 GiB
Current LE 7800
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:8

[root@HzcimgNFS01 ~]# ifconfig 当前服务器网络配置信息
eth0 Link encap:Ethernet HWaddr 00:50:56:88:A3:4E
inet addr:10.11.1.155 Bcast:10.11.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:694 errors:0 dropped:0 overruns:0 frame:0
TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:55161 (53.8 KiB) TX bytes:48108 (46.9 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2456 (2.3 KiB) TX bytes:2456 (2.3 KiB)

[END] 2018/9/26 16:37:36

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值