首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    linux 将现有分区转换为lvm2分区并扩展放大容量

    此次主要进行了/dev/sdb从默认系统转换到lvm系统模式。期间备份恢复数据,不同磁盘下的不同分区创建pv加入同一vg组,放大lv容量,从vg中删除单个pv,通过实验验证lvm2突破了在lvm1版本时pe size大小限制vg大小的限制,自动挂载lv等。 期间经历重启由于fstab文件忘记修改导致无法开机,后进入单用户救援模式修改/etc/fstab后恢复,经过此番折腾更加深入了解了linux的磁盘文件系统模式。 1、查看现有系统信息。 [root@localhost ~]# df 文件系统 1K-块 已用 可用 已用% 挂载点 /dev/sda2 99190032 4077672 89992368 5% / /dev/sdb1 567161764 246748 537640172 1% /opt /dev/sda1 99098 12238 81743 14% /boot tmpfs 8196244 0 8196244 0% /dev/shm [root@localhost ~]# fdisk /dev/sdb The number of cylinders for this disk is set to 72891. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdb: 599.5 GB, 599550590976 bytes 255 heads, 63 sectors/track, 72891 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 72891 585496926 83 Linux 2、备份数据,将原先/opt下的文件复制到新建的mkdir /optbak下,已做备份。 [root@localhost ~]# ll /opt/ 总计 32 drwxr-xr-x 2 root root 4096 01-27 15:20 disk drwx------ 2 root root 16384 01-22 15:40 lost+found drwxr-xr-x 3 root root 4096 01-23 12:54 svn drwxrwxrwx 3 root root 4096 02-02 16:50 svntongbu drwxr-xr-x 5 root root 4096 01-30 14:43 wzcs 执行cp -r /opt /optbak后 [root@localhost ~]# ll /optbak/opt/ 总计 20 drwxr-xr-x 2 root root 4096 02-08 15:48 disk drwx------ 2 root root 4096 02-08 15:48 lost+found drwxr-xr-x 3 root root 4096 02-08 15:48 svn drwxr-xr-x 3 root root 4096 02-08 15:48 svntongbu drwxr-xr-x 5 root root 4096 02-08 15:48 wzcs 3、执行umount /opt 写在文件挂载,这时/opt 目录下的文件已经看不到了,因为它所挂载的硬盘已被从文件系统卸载了。但是/opt目录仍然存在,只是成空文件夹了。 [root@localhost ~]# df -h 文件系统 容量 已用 可用 已用% 挂载点 /dev/sda2 95G 4.0G 86G 5% / /dev/sda1 97M 12M 80M 14% /boot tmpfs 7.9G 0 7.9G 0% /dev/shm 4、现在开始执行将原有磁盘系统转化为lvm,因为服务器原先有两块磁盘sda sdb,sda为系统盘 其中sda3已经设置为了lvm分区,sdb这块磁盘由于我只分了一个区现在我需要把它删了重建。 [root@localhost ~]# fdisk /dev/sdb T

    04

    MPLSL3×××+GRE+MCE+多角

    很喜欢用GRE做隧道,这样容易理解MPLS,当然LSP的隧道很EASY就KO了,主要是用/32的主机路由来建立LSP隧道的,注意隧道的起止为位置,LSP的话,就是2端LOOPBACK的起止,在用LOOPBACK建立BGP关系的时候需要注意指定源地址,否则关系起不来,这在EBGP和IBGP里都一样。隧道的起止要与BGP的邻居关系一致这样才能让BGP去利用你的GRE隧道,GRE隧道里切记一定要敲MPLS否则你数据不会被解封装,还有就是GRE隧道里不要配置IP,否则协议不稳定。MCE是多实例主机这个没什么好讲的,用来隔离业务的,多角色主机是接在MCE上的,然后由PE去帮助多角色主机,而不是在MCE上做,因此MCE的实例中必须加一条默认路由或是汇总路由,否则有可能不能通,提示找不到目标网络,主要是中间跨越了MCE,否则不会出现该问题。

    01

    扫码

    添加站长 进交流群

    领取专属 10元无门槛券

    手把手带您无忧上云

    扫码加入开发者社群

    相关资讯

    热门标签

    活动推荐

      运营活动

      活动名称
      广告关闭
      领券