当前位置: 首页 > news >正文

网站网页优化怎么做郑州怎么优化网站排名靠前

网站网页优化怎么做,郑州怎么优化网站排名靠前,给做网站建设的一些建议,学前端什么网站好文章目录 前言一、创建一个分区二、创建PV三、创建VG四、创建LV五、格式化并挂载目录 前言 在数据库管理中,常有比较头疼的问题,就是一段时间发展后我的磁盘空间不够了,想要扩容原有的目录很是头疼,那么LVM管理的优势就体现出来了…

文章目录

  • 前言
  • 一、创建一个分区
  • 二、创建PV
  • 三、创建VG
  • 四、创建LV
  • 五、格式化并挂载目录


前言

在数据库管理中,常有比较头疼的问题,就是一段时间发展后我的磁盘空间不够了,想要扩容原有的目录很是头疼,那么LVM管理的优势就体现出来了:逻辑卷的大小可以动态调整,而且不会丢失现在的数据,从而达到一个不动旧数据的情况下进行扩容。


一、创建一个分区

使用fdisk分区工具创建LVM分区,区别在与分区类型选择为8e

[root@XXJSB-OEM-01 /]# fdisk -lDisk /dev/sda: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000adc79Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200  1048575999   523238400   8e  Linux LVMDisk /dev/sdb: 1099.5 GB, 1099511627776 bytes, 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/rhel-root: 527.3 GB, 527337259008 bytes, 1029955584 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/rhel-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xc7d7fbc4.Command (m for help): m
Command actiona   toggle a bootable flagb   edit bsd disklabelc   toggle the dos compatibility flagd   delete a partitiong   create a new empty GPT partition tableG   create an IRIX (SGI) partition tablel   list known partition typesm   print this menun   add a new partitiono   create a new empty DOS partition tablep   print the partition tableq   quit without saving changess   create a new empty Sun disklabelt   change a partition's system idu   change display/entry unitsv   verify the partition tablew   write table to disk and exitx   extra functionality (experts only)Command (m for help): 
Command (m for help): n
Partition type:p   primary (0 primary, 0 extended, 4 free)e   extended
Select (default p): 
Using default response p
Partition number (1-4, default 1): 
First sector (2048-2147483647, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2147483647, default 2147483647): 
Using default value 2147483647
Partition 1 of type Linux and of size 1024 GiB is setCommand (m for help): 
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): L0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx         5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data    6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility   8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt         9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access     a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O        b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor      c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs        e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT            f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor      
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary  
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS    
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT            
1e  Hidden W95 FAT1 80  Old Minix      
Hex code (type L to list all codes): 
#选择8e:一定要指定分区的格式为8e,这是LVM的分区格式
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'Command (m for help): 
Command (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.
Syncing disks.
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda             8:0    0   500G  0 disk 
├─sda1          8:1    0     1G  0 part /boot
└─sda2          8:2    0   499G  0 part ├─rhel-root 253:0    0 491.1G  0 lvm  /└─rhel-swap 253:1    0   7.9G  0 lvm  [SWAP]
sdb             8:16   0     1T  0 disk 
└─sdb1          8:17   0  1024G  0 part 
sr0            11:0    1  1024M  0 rom  
[root@XXJSB-OEM-01 /]# 

二、创建PV

[root@XXJSB-OEM-01 /]# pvcreate /dev/sdb1Physical volume "/dev/sdb1" successfully created.
[root@XXJSB-OEM-01 /]#

三、创建VG

[root@XXJSB-OEM-01 /]# vgdisplay--- Volume group ---VG Name               rhelSystem ID             Format                lvm2Metadata Areas        2Metadata Sequence No  7VG Access             read/writeVG Status             resizableMAX LV                0Cur LV                2Open LV               2Max PV                0Cur PV                2Act PV                2VG Size               <1.49 TiBPE Size               4.00 MiBTotal PE              389886Alloc PE / Size       127743 / <499.00 GiBFree  PE / Size       262143 / <1024.00 GiBVG UUID               7L2R89-R1ep-1It5-pg4h-Xx4i-DHGR-fuMunL[root@XXJSB-OEM-01 /]# 
#新增已经存在的VG
[root@XXJSB-OEM-01 /]# vgextend rhel /dev/sdb1Volume group "rhel" successfully extended
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# vgsVG   #PV #LV #SN Attr   VSize  VFree    rhel   2   2   0 wz--n- <1.49t <1024.00g

四、创建LV

#新建256G
[root@XXJSB-OEM-01 /]# lvcreate -L 256G -n u01 rhelRounding up size to full physical extent 256.00 GiBLogical volume "u01" created.
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# vgsVG   #PV #LV #SN Attr   VSize  VFree   rhel   2   3   0 wz--n- <1.49t <768.00g#扩容668G
[root@XXJSB-OEM-01 /]# lvextend -L +668G /dev/rhel/u01Size of logical volume rhel/u01 changed from 256.00 GiB (65536 extents) to 924.00 GiB (236544 extents).Logical volume rhel/u01 successfully resized.
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# vgsVG   #PV #LV #SN Attr   VSize  VFree   rhel   2   3   0 wz--n- <1.49t <100.00g
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# lvdisplay--- Logical volume ---LV Path                /dev/rhel/swapLV Name                swapVG Name                rhelLV UUID                hR1pPu-I1hw-cjql-tPdk-tWDF-58ok-XVk4RVLV Write Access        read/writeLV Creation host, time localhost, 2021-05-21 13:14:00 +0800LV Status              available# open                 2LV Size                <7.88 GiBCurrent LE             2016Segments               1Allocation             inheritRead ahead sectors     auto- currently set to     8192Block device           253:1--- Logical volume ---LV Path                /dev/rhel/rootLV Name                rootVG Name                rhelLV UUID                PR5wZY-1aUU-jVKr-4Dpe-gi0U-B0Cp-nnzMGhLV Write Access        read/writeLV Creation host, time localhost, 2021-05-21 13:14:02 +0800LV Status              available# open                 1LV Size                491.12 GiBCurrent LE             125727Segments               2Allocation             inheritRead ahead sectors     auto- currently set to     8192Block device           253:0--- Logical volume ---LV Path                /dev/rhel/u01LV Name                u01VG Name                rhelLV UUID                O9vP6V-28jH-WbpF-sMLn-1SQn-EuqE-iUSY13LV Write Access        read/writeLV Creation host, time XXJSB-OEM-01, 2024-05-10 17:44:05 +0800LV Status              available# open                 0LV Size                924.00 GiBCurrent LE             236544Segments               1Allocation             inheritRead ahead sectors     auto- currently set to     8192Block device           253:2[root@XXJSB-OEM-01 /]#

五、格式化并挂载目录

[root@XXJSB-OEM-01 /]# mkfs -t xfs /dev/rhel/u01
meta-data=/dev/rhel/u01          isize=512    agcount=4, agsize=60555264 blks=                       sectsz=512   attr=2, projid32bit=1=                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=242221056, imaxpct=25=                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=118272, version=2=                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@XXJSB-OEM-01 /]#
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# mount /dev/rhel/u01 /u01
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# df -h
Filesystem             Size  Used Avail Use% Mounted on
devtmpfs                32G     0   32G   0% /dev
tmpfs                   32G   12K   32G   1% /dev/shm
tmpfs                   32G   21M   32G   1% /run
tmpfs                   32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/rhel-root  492G  6.0G  486G   2% /
/dev/sda1             1014M  183M  832M  19% /boot
tmpfs                  6.3G   12K  6.3G   1% /run/user/42
tmpfs                  6.3G     0  6.3G   0% /run/user/0
tmpfs                  6.3G     0  6.3G   0% /run/user/1000
/dev/mapper/rhel-u01   924G   33M  924G   1% /u01
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri May 21 13:14:02 2021
#
# 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/rhel-root   /                       xfs     defaults        0 0
UUID=7b18c326-0c8d-43b7-ba7b-ca3a73e77a0d /boot                   xfs     defaults        0 0
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# vi /etc/fstab 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# cat /etc/fstab #
# /etc/fstab
# Created by anaconda on Fri May 21 13:14:02 2021
#
# 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/rhel-root   /                       xfs     defaults        0 0
UUID=7b18c326-0c8d-43b7-ba7b-ca3a73e77a0d /boot                   xfs     defaults        0 0
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
/dev/rhel/u01           /u01                    xfs     defaults        0 0

配置好了fstab后要进行测试哦!(防止)

[root@XXJSB-OEM-01 /]# umount /u01
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# df -h
Filesystem             Size  Used Avail Use% Mounted on
devtmpfs                32G     0   32G   0% /dev
tmpfs                   32G   12K   32G   1% /dev/shm
tmpfs                   32G   21M   32G   1% /run
tmpfs                   32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/rhel-root  492G  6.0G  486G   2% /
/dev/sda1             1014M  183M  832M  19% /boot
tmpfs                  6.3G   12K  6.3G   1% /run/user/42
tmpfs                  6.3G     0  6.3G   0% /run/user/0
tmpfs                  6.3G     0  6.3G   0% /run/user/1000
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# mount -a
[root@XXJSB-OEM-01 /]# 
[root@XXJSB-OEM-01 /]# df -h
Filesystem             Size  Used Avail Use% Mounted on
devtmpfs                32G     0   32G   0% /dev
tmpfs                   32G   12K   32G   1% /dev/shm
tmpfs                   32G   21M   32G   1% /run
tmpfs                   32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/rhel-root  492G  6.0G  486G   2% /
/dev/sda1             1014M  183M  832M  19% /boot
tmpfs                  6.3G   12K  6.3G   1% /run/user/42
tmpfs                  6.3G     0  6.3G   0% /run/user/0
tmpfs                  6.3G     0  6.3G   0% /run/user/1000
/dev/mapper/rhel-u01   924G   33M  924G   1% /u01
[root@XXJSB-OEM-01 /]# 
http://www.tj-hxxt.cn/news/43831.html

相关文章:

  • 网站背景浙江seo博客
  • 义乌做网站海南网站推广
  • 如何创建一个免费的网站网页制作接单平台
  • 电子商务网站建设汉狮如何做好企业网站的推广
  • 做视频网站需要多大空间百度一下你知道
  • 广州网站建设如何做seo发帖网站
  • 免费手机网站制作浏览器下载大全
  • 外贸公司网站如何做网上推广南宁推广软件
  • 营销型网站建设费用优化排名推广关键词
  • 农家乐网站免费模板全渠道营销管理平台
  • 网站建设中系统实现做关键词优化的公司
  • 现在在百度做网站要多少钱百度云盘资源共享链接群组链接
  • 广告联盟做网站网站关键词优化推广哪家快
  • 怎么做网站的关键词个人免费开发app
  • 重庆建设网站竞价网络推广培训
  • 做京东电脑端首页链接的网站免费域名申请的方法
  • 单产品网站建设semikron
  • 北京商地网站建设公司太原seo快速排名怎么样
  • 如何查询一个网站是否备案螺蛳粉的软文推广
  • 建设商城网站公司吗seo技术服务外包公司
  • 宁工图书馆哪种书是关于做网站的网络营销介绍
  • 网站建设案例企业谷歌推广教程
  • 怎样在网站做转向连接百度网址大全简单版
  • 那些做黑网站的都是团体还是个人公众号如何推广
  • 政府网站建设 文件怎样申请网站
  • 一级指标评价政府网站建设他达拉非什么是
  • win10记事本怎么做网站外贸seo建站
  • 广州黄埔区做网站培训机构优化网站性能
  • 网页设计图片与图片的位置邵阳seo排名
  • 抓取网站访客qq号码国外免费推广平台有哪些