溪明轩

  • Python全栈开发
  • 三溪杂选
  • 爬虫快速入门
  • 首页
  • 文章归档
  • 关于页面

  • 搜索
consul ELK Loki M3DB Thanos TSDB federate ALertmanager PromQL Grafana prometheus nginx Rest Framework 热视图 ansible 网络安全 云盘 wiki Python 爬虫

SVN上传文件失败,提示no space left on device

发表于 2020-06-20 | 分类于 故障处理 | 0 | 阅读次数 343

知识共享许可协议
本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。

新建了SVN服务器给美术当素材版本控制库,数据量挺大的,有八十多个G,当时创建了虚拟机的时候没注意仅分配了100G给SVN,后面把原始数据上传到SVN的时候就爆了,报错如标题所示传不上去。

因此在ESXI6.7控制台给虚拟机硬盘扩容到500G,然后SSH连上虚拟机进行配置!

1. 先给新加的硬盘分区

[root@gitlab 192.168.0.172]# 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 0xafd39243.

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-419430399, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-419430399, default 419430399): 
Using default value 419430399
Partition 1 of type Linux and of size 200 GiB is set

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

Calling ioctl() to re-read partition table.
Syncing disks.

2. 分区完通知内核强制重读分区表或重启系统并创建文件系统:

kpartx -af /dev/sda3 #3是新分的区,得具体看是多少
[root@gitlab 192.168.0.172]# mkfs.xfs /dev/sdb1
meta-data=/dev/sdb1              isize=512    agcount=4, agsize=13107136 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=52428544, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=25599, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

3. 新建PV块

[root@svn ~]# pvcreate /dev/sda3
WARNING: xfs signature detected on /dev/sda3 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/sda3.
  Physical volume "/dev/sda3" successfully created.
[root@svn ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               centos_svn
  PV Size               <99.00 GiB / not usable 3.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              25343
  Free PE               1
  Allocated PE          25342
  PV UUID               aF1qWH-bdd2-Mgh3-5qGb-caFw-NueY-LsrSn3
   
  "/dev/sda3" is a new physical volume of "400.00 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda3
  VG Name               
  PV Size               400.00 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               vk2ayU-18XI-MM19-Bc4C-85yE-tSh3-M1RgK6

4. 将新建的PV加入VG组

[root@svn ~]# vgextend centos_svn /dev/sda3
  Volume group "centos_svn" successfully extended
[root@svn ~]# vgdisplay
  --- Volume group ---
  VG Name               centos_svn
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               498.99 GiB
  PE Size               4.00 MiB
  Total PE              127742
  Alloc PE / Size       25342 / 98.99 GiB
  Free  PE / Size       102400 / 400.00 GiB
  VG UUID               Mv6SUs-3jPz-N8ZZ-tx31-vIlV-Us50-ly5DlF
#一定要注意PE大小,如上是4M一块,下面扩容时要用到

5. 给VG扩容

[root@svn ~]# lvresize -l +102400 /dev/mapper/centos_svn-root 
  Size of logical volume centos_svn/root changed from 50.00 GiB (12800 extents) to 450.00 GiB (115200 extents).
  Logical volume centos_svn/root successfully resized.
#如上所示,4M一块那么400G就是102400块,不用用+400G这样子哦,会有语法错误

6. 重读PV大小

[root@svn ~]# xfs_growfs /dev/mapper/centos_svn-root 
meta-data=/dev/mapper/centos_svn-root isize=512    agcount=4, agsize=3276800 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=13107200, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=6400, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 13107200 to 117964800

7. 确认扩容结果

[root@svn ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     1.9G     0  1.9G   0% /dev
tmpfs                        1.9G     0  1.9G   0% /dev/shm
tmpfs                        1.9G  8.9M  1.9G   1% /run
tmpfs                        1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/centos_svn-root  450G   41G  410G   9% /
/dev/sda1                   1014M  150M  865M  15% /boot
/dev/mapper/centos_svn-home   46G   33M   46G   1% /home
tmpfs                        379M     0  379M   0% /run/user/0
Donate comment here
三溪 微信支付

微信支付

三溪 支付宝

支付宝

  • 本文作者: 三溪
  • 本文链接: https://blog.sanxi.info/archives/svn上传文件失败提示nospaceleftondevice
  • 版权声明: 本博客所有文章除特别声明外,均采用CC BY-NC-ND 4.0 许可协议。转载请注明出处!
LAMP简单构建Discuz论坛,实现数据库主从复制并读写分离
LVM扩容
  • 文章目录
  • 站点概览
三溪

三溪

作诗不作法

120 日志
23 分类
20 标签
RSS
Creative Commons
Links
  • halo官网
  • 玻璃之空
0%
© 2022 三溪
由 Halo 强力驱动
|
主题 - NexT.Pisces v5.1.4
世间微尘里 独爱茶酒中