SolusVM 节点服务器 CentOS 7 分区教程(图文)

Kevin 教程 1,681 次浏览 8条评论

CentOS 7 安装程序里的分区不如 CentOS 6 的好用,对于 SolusVM Slave 分区要求没法一步设置好。要在系统安装后删除重建 VG 分区,下文配合截图记录操作流程。

用 IPMI 之类控制台远程安装 CentOS 7,安装选项界面点击 INSTALLATION DESTINATION。

安装 CentOS 7
安装 CentOS 7
设置安装位置
设置安装位置

选中需使用的硬盘,点击 I will configure partitioning。然后点 Done 进入分区设置,选择 Standard Partition 创建所需分区(通常是/boot/swap这几个分区,剩余空间创建 VG 放虚拟机使用)。

选择硬盘和选择自定义配置分区
选择硬盘和选择自定义配置分区
创建所需标准分区
创建所需标准分区

以下是笔者测试机的分区情况截图,以供参考。

创建 /boot 分区
创建 /boot 分区
创建 / 根目录分区
创建 / 根目录分区
创建 swap 分区
创建 swap 分区
创建 vg_solusvm 分区
创建 vg_solusvm 分区

设置后完成系统安装。

完成 CentOS 7 安装

安装后用df -hT查看分区情况,其中之前创建的/vg_solusvm分区挂载点删除它。

[root@localhost ~]# df -hT
Filesystem                        Type      Size  Used Avail Use% Mounted on
/dev/sda2                         ext4      118G  1.2G  111G   2% /
devtmpfs                          devtmpfs  7.7G     0  7.7G   0% /dev
tmpfs                             tmpfs     7.7G     0  7.7G   0% /dev/shm
tmpfs                             tmpfs     7.7G  9.0M  7.7G   1% /run
tmpfs                             tmpfs     7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/sda1                         ext4      740M  131M  556M  19% /boot
/dev/mapper/vg_solusvm-vg_solusvm ext4      1.7T   77M  1.6T   1% /vg_solusvm
tmpfs                             tmpfs     1.6G     0  1.6G   0% /run/user/0

umount /vg_solusvm卸载挂载点,然后编辑/etc/fstab文件删除/vg_solusvm参数行。

之后vgdisplay查看 VG 分区名称,再vgremove vg_solusvm删除分区(替换你的 VG 名称)。

[root@localhost ~]# vgremove vg_solusvm
Do you really want to remove volume group "vg_solusvm" containing 1 logical volumes? [y/n]: y
Do you really want to remove active logical volume vg_solusvm/vg_solusvm? [y/n]: y
  Logical volume "vg_solusvm" successfully removed
  Volume group "vg_solusvm" successfully removed

fdisk -l查看 LVM 分区设备名。从输出结果可以看到在 sda5 上。

[root@localhost ~]# fdisk -l

[...]

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1574911      786432   83  Linux
/dev/sda2         1574912   253233151   125829120   83  Linux
/dev/sda3       253233152   286787583    16777216   82  Linux swap / Solaris
/dev/sda4       286787584  3907028991  1810120704    5  Extended
/dev/sda5       286789632  3907028991  1810119680   8e  Linux LVM

vgcreate -s 128M vg_solusvm /dev/sda5命令重新创建 VG 分区。创建后检查如下就可以了。

[root@localhost ~]# vgdisplay
  --- Volume group ---
  VG Name               vg_solusvm
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <1.69 TiB
  PE Size               128.00 MiB
  Total PE              13810
  Alloc PE / Size       0 / 0   
  Free  PE / Size       13810 / <1.69 TiB
  VG UUID               Zf5ODL-G2OZ-s4oI-Dl8D-epcn-r7o9-3aagdf

到此硬盘分区就完成了,按之前教程继续安装部署 SolusVM。

评论列表

  1. #1

    Hi, very nice website, cheers!
    ——————————————————
    Need cheap and reliable hosting? Our shared plans start at $10 for an year and VPS plans for $6/Mo.
    ——————————————————
    Check here: https://www.reliable-webhosting.com/

  2. #2

    My partner and I stumbled over here from a different page
    and thought I might check things out. I like what I see so now
    i am following you. Look forward to going over your web page yet
    again.

    Review my webpage :: Royal CBD

  3. #3

    Nice blog! Is your theme custom made or did you download
    it from somewhere? A theme like yours with a few simple adjustements would really make my blog stand out.

    Please let me know where you got your design. Thanks

    My web-site :: bola2000

  4. #4

    Great weblog heгe! Additionally үоur web site quite а bit
    uup fаst! What web host aге you using? Can I am getting your
    associate hyperlink tοo yoᥙr host? I desire my website loaded սp as quicky as yours lol

    Аlso visit my page – watch tenet 2020 free online

  5. #5

    Hi there, Idiscovered your blog by means of Google
    while looking for a similar matter, your web site came up, it appedars great.
    I’ve bookmarked itt in my google bookmarks.
    Hello there, simply turned into aware of your blog thru Google,
    and lpcated that it is really informative. I’m gonna watch out for brussels.
    I’ll be grateful if you happen to continue this in future.
    Numerous other folks can bbe benefited from your writing.Cheers!

    web site

  6. #6

    Hi there! I know this is kind of off topic but I was wondering which blog platform
    are you using for this website? I’m getting tired of WordPress because I’ve had problems with hackers
    and I’m looking at alternatives for another platform.
    I would be great if you could point me in the direction of a good platform.

    Feel free to visit my webpage :: คาสิโน Betway

  7. #7

    What’s up to all, how is all, I think every one is getting more from this site, and your views are good in support of new users.

    My web page poker players

  8. #8

    Hey! I’m at work browsing your blog from my new iphone!
    Just wanted to say I love reading your blog and look forward
    to all your posts! Carry on the fantastic work!

    Feel free to visit my web-site :: đánh bài online

发表评论

电邮地址用于 Gravatar 头像显示,不会被公开可见。