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

上海企业网站建设公整站优化系统厂家

上海企业网站建设公,整站优化系统厂家,房管局官网,wordpress 免费 模板LVM#xff08;Logical Volume Manager#xff09;是Linux系统中一种灵活的磁盘管理和存储解决方案#xff0c;它允许用户在物理卷#xff08;Physical Volumes, PV#xff09;上创建卷组#xff08;Volume Groups, VG#xff09;#xff0c;然后在卷组上创建逻辑卷Logical Volume Manager是Linux系统中一种灵活的磁盘管理和存储解决方案它允许用户在物理卷Physical Volumes, PV上创建卷组Volume Groups, VG然后在卷组上创建逻辑卷Logical Volumes, LV。LVM提供了比传统分区更高级的功能如动态调整存储容量、方便的备份与恢复、以及跨越多个磁盘的卷管理等。今天我们讲一下lvm分区。 系统环境 CentOS Stream 分区过程 首先添加一块新的磁盘 启动查看磁盘是开机否添加成功  [rootlocalhost ~]# fdisk -l | grep sd Disk /dev/sda120 GiB128849018880 字节251658240 个扇区 /dev/sda1 * 2048 10487807 10485760 5G 83 Linux /dev/sda2 10487808 31475711 20987904 10G 8e Linux LVM Disk /dev/sdb5 GiB5368709120 字节10485760 个扇区 Disk /dev/sdc20 GiB21474836480 字节41943040 个扇区 新建非交互式分区 [rootlocalhost ~]# cat fdisk_10G.txt n p 15G n p5G w [rootlocalhost ~]# fdisk为 fdisk_10G.txt 的文本文件中的指令来分区磁盘 /dev/sdc。 [rootlocalhost ~]# fdisk /dev/sdc fdisk_10G.txt欢迎使用 fdisk (util-linux 2.37.4)。 更改将停留在内存中直到您决定将更改写入磁盘。 使用写入命令前请三思。设备不包含可识别的分区表。 创建了一个磁盘标识符为 0x6b93d7c1 的新 DOS 磁盘标签。命令(输入 m 获取帮助)分区类型p 主分区 (0 primary, 0 extended, 4 free)e 扩展分区 (逻辑分区容器) 选择 (默认 p)分区号 (1-4, 默认 1): 第一个扇区 (2048-41943039, 默认 2048): 最后一个扇区/-sectors 或 size{K,M,G,T,P} (2048-41943039, 默认 41943039): 创建了一个新分区 1类型为“Linux”大小为 5 GiB。命令(输入 m 获取帮助)分区类型p 主分区 (1 primary, 0 extended, 3 free)e 扩展分区 (逻辑分区容器) 选择 (默认 p)分区号 (2-4, 默认 2): 第一个扇区 (10487808-41943039, 默认 10487808): 最后一个扇区/-sectors 或 size{K,M,G,T,P} (10487808-41943039, 默认 41943039): 创建了一个新分区 2类型为“Linux”大小为 5 GiB。命令(输入 m 获取帮助)分区表已调整。 将调用 ioctl() 来重新读分区表。 正在同步磁盘。 点击查看 [rootlocalhost ~]# fdisk -l /dev/sdc Disk /dev/sdc20 GiB21474836480 字节41943040 个扇区 磁盘型号VMware Virtual S 单元扇区 / 1 * 512 512 字节 扇区大小(逻辑/物理)512 字节 / 512 字节 I/O 大小(最小/最佳)512 字节 / 512 字节 磁盘标签类型dos 磁盘标识符0x6b93d7c1设备 启动 起点 末尾 扇区 大小 Id 类型 /dev/sdc1 2048 10487807 10485760 5G 83 Linux /dev/sdc2 10487808 20973567 10485760 5G 83 Linux 创建pv [rootlocalhost ~]# pvs #先查看pvPV VG Fmt Attr PSize PFree/dev/sda2 cs lvm2 a-- 10.00g 0 /dev/sdb cs lvm2 a-- 5.00g 0 [rootlocalhost ~]# pvcreate /dev/sdc{1,2} #创建pvPhysical volume /dev/sdc1 successfully created.Physical volume /dev/sdc2 successfully created. [rootlocalhost ~]# pvs #再次查看PV VG Fmt Attr PSize PFree/dev/sda2 cs lvm2 a-- 10.00g 0 /dev/sdb cs lvm2 a-- 5.00g 0 /dev/sdc1 lvm2 --- 5.00g 5.00g/dev/sdc2 lvm2 --- 5.00g 5.00g [rootlocalhost ~]# 创建vg [rootlocalhost ~]# vgs #同样先查看vgVG #PV #LV #SN Attr VSize VFreecs 2 1 0 wz--n- 15.00g 0 [rootlocalhost ~]# vgcreate lgb /dev/sdc{1,2} #创建vgVolume group lgb successfully created [rootlocalhost ~]# vgs #再次查看VG #PV #LV #SN Attr VSize VFreecs 2 1 0 wz--n- 15.00g 0 lgb 2 0 0 wz--n- 9.99g 9.99g [rootlocalhost ~]# 创建lv [rootlocalhost ~]# lvcreate -L 100m -n nginx_lvm lgb #在一个名为lgb的卷组中创建一个大小为100MB、名为nginx_lvm的逻辑卷Logical volume nginx_lvm created. [rootlocalhost ~]# lvs #查看lvLV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convertroot cs -wi-ao---- 15.00g nginx_lvm lgb -wi-a----- 100.00m [rootlocalhost ~]# vgs查看vg卷组VG #PV #LV #SN Attr VSize VFreecs 2 1 0 wz--n- 15.00g 0 lgb 2 1 0 wz--n- 9.99g 9.89g [rootlocalhost ~]# 格式化 [rootlocalhost ~]# lvs #先查看信息LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convertroot cs -wi-ao---- 15.00g nginx_lvm lgb -wi-a----- 100.00m [rootlocalhost ~]# lvdisplay #详细信息--- Logical volume ---LV Path /dev/lgb/nginx_lvmLV Name nginx_lvmVG Name lgbLV UUID ivzUhH-s3uZ-rbO6-XfHo-fjoT-eWZi-jd41llLV Write Access read/writeLV Creation host, time localhost.localdomain, 2024-06-05 18:46:37 0800LV Status available# open 0LV Size 100.00 MiBCurrent LE 25Segments 1Allocation inheritRead ahead sectors auto- currently set to 256Block device 253:1--- Logical volume ---LV Path /dev/cs/rootLV Name rootVG Name csLV UUID xbdeiT-PCxR-ss1w-RTkq-35Uu-gJtX-NQa4oyLV Write Access read/writeLV Creation host, time localhost.localdomain, 2024-06-05 15:35:41 0800LV Status available# open 1LV Size 15.00 GiBCurrent LE 3840Segments 2Allocation inheritRead ahead sectors auto- currently set to 256Block device 253:0[rootlocalhost ~]# ^C [rootlocalhost ~]# mkfs.ext4 /dev/lgb/nginx_lvm #格式化 mke2fs 1.46.5 (30-Dec-2021) 创建含有 102400 个块每块 1k和 25584 个inode的文件系统 文件系统UUID9d518877-493f-459d-b628-7001978ccd49 超级块的备份存储于下列块 8193, 24577, 40961, 57345, 73729正在分配组表 完成 正在写入inode表 完成 创建日志4096 个块完成 写入超级块和文件系统账户统计信息 已完成 挂载lv [rootlocalhost ~]# mkdir -pv /home/nginx_100m # 创建挂载目录 mkdir: 已创建目录 /home/nginx_100m [rootlocalhost ~]# vim /etc/fstab 编辑信息 [rootlocalhost ~]# vim /etc/fstab [rootlocalhost ~]# tail -l /etc/fstab # # 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. # # After editing this file, run systemctl daemon-reload to update systemd # units generated from this file. # /dev/mapper/cs-root / xfs defaults 0 0 UUIDfcfd7195-966b-42d6-96c3-ab6ef2e3bf93 /boot xfs defaults 0 0 UUID9d518877-493f-459d-b628-7001978ccd49 /home/nginx_100m ext4 defaults 0 0 [rootlocalhost ~]# [rootlocalhost ~]# mount -a #挂载 mount: (hint) your fstab has been modified, but systemd still usesthe old version; use systemctl daemon-reload to reload. [rootlocalhost ~]# 查看挂载分区 [rootlocalhost ~]# df 文件系统 1K-块 已用 可用 已用% 挂载点 devtmpfs 4096 0 4096 0% /dev tmpfs 1988404 0 1988404 0% /dev/shm tmpfs 795364 9224 786140 2% /run /dev/mapper/cs-root 15663104 9814784 5848320 63% / /dev/sda1 5177344 226756 4950588 5% /boot tmpfs 397680 0 397680 0% /run/user/0 /dev/mapper/lgb-nginx_lvm 90333 14 83151 1% /home/nginx_100m [rootlocalhost ~]# df -Th 文件系统 类型 容量 已用 可用 已用% 挂载点 devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs tmpfs 777M 9.1M 768M 2% /run /dev/mapper/cs-root xfs 15G 9.4G 5.6G 63% / /dev/sda1 xfs 5.0G 222M 4.8G 5% /boot tmpfs tmpfs 389M 0 389M 0% /run/user/0 /dev/mapper/lgb-nginx_lvm ext4 89M 14K 82M 1% /home/nginx_100m [rootlocalhost ~]# 创建测试数据 [rootlocalhost ~]# for i in seq 3 ; do echo ${i}-${RANDOM} /home/nginx_100m/${i}.txt ; done [rootlocalhost ~]# ls -lhrt /home/nginx_100m/ 总用量 15K drwx------ 2 root root 12K 6月 5 18:55 lostfound -rw-r--r-- 1 root root 8 6月 5 19:15 3.txt -rw-r--r-- 1 root root 7 6月 5 19:15 2.txt -rw-r--r-- 1 root root 8 6月 5 19:15 1.txt [rootlocalhost ~]# 重启并验证 [rootlocalhost ~]# df -Th 文件系统 类型 容量 已用 可用 已用% 挂载点 devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs tmpfs 777M 9.1M 768M 2% /run /dev/mapper/cs-root xfs 15G 9.4G 5.6G 63% / /dev/sda1 xfs 5.0G 222M 4.8G 5% /boot /dev/mapper/lgb-nginx_lvm ext4 89M 17K 82M 1% /home/nginx_100m tmpfs tmpfs 389M 0 389M 0% /run/user/0 [rootlocalhost ~]# ls -lhrt /home/nginx_100m/ 总用量 15K drwx------ 2 root root 12K 6月 5 18:55 lostfound -rw-r--r-- 1 root root 8 6月 5 19:15 3.txt -rw-r--r-- 1 root root 7 6月 5 19:15 2.txt -rw-r--r-- 1 root root 8 6月 5 19:15 1.txt [rootlocalhost ~]# cat /home/nginx_100m/1.txt 1-23127 [rootlocalhost ~]# cat /home/nginx_100m/2.txt 2-9275 [rootlocalhost ~]# cat /home/nginx_100m/3.txt 3-19715 [rootlocalhost ~]#
http://www.w-s-a.com/news/544777/

相关文章:

  • centos7做网站软件实施工程师工资一般多少
  • 专业房产网站建设深圳建设交易集团
  • 政务网站建设标准项目经理接到网站开发怎么开展
  • 网站框架设计好后怎么做网站广告销售怎们做
  • asp技校网站保定八大平台公司
  • wordpress网站前端优化网站备案批量查询
  • 北京企业做网站杭州seo中心
  • 护肤品网站建设前的行业分析wordpress电子书模板
  • 做网站怎么销售.net开发网站怎么样
  • 蚌埠网站优化网站换空间wordpress
  • 微网站开发框架公司企业logo
  • 大淘客官网做的网站打不开网站建设完成
  • 婚纱摄影网站模板让别人做网站怎样才安全
  • 技术支持 骏域网站建设专家佛山网站运营管理教材
  • 个体营业执照可以做网站服务吗电商运营学校培训
  • 企业网站免费推广的方法.wordpress 爱情模板下载地址
  • 轻淘客 轻网站怎么做手机开发人员选项怎么打开
  • 天津做网站制作公司html网站 下载
  • 哪个网站的课件做的好crm客户管理系统全称
  • 网站建设工作室创业计划书seo是什么职位的简称
  • o2o平台网站开发什么是白帽seo
  • 免费建个人手机网站WordPress 简历库
  • 建网站 是否 数据库阳瘘的最佳治疗方法是什么
  • 知晓程序网站怎么做网站基础维护
  • 兼职做网站赚钱吗图片设计制作哪个软件好手机
  • 做手机旅游网站智慧校园登录入口
  • 莆田网站建设维护国外极简网站
  • 百度怎样收录网站缪斯设计集团
  • 网站建设在开封找谁做wordpress 数据转换
  • 旅游网站开发的流程江苏付费网络推广培训