2022年7月

大概情况就是,装了ubuntu之后,本来1个T的硬盘,df -h查看,只有100G.

Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              789M  1.4M  788M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   35G   59G  37% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop1                         114M  114M     0 100% /snap/core/13425
/dev/loop0                         114M  114M     0 100% /snap/core/13308
/dev/loop4                          62M   62M     0 100% /snap/core20/1518
/dev/loop2                          68M   68M     0 100% /snap/lxd/22753
/dev/loop3                          40M   40M     0 100% /snap/hub/43
/dev/loop8                          47M   47M     0 100% /snap/snapd/16292
/dev/loop5                          47M   47M     0 100% /snap/snapd/16010
/dev/loop7                          68M   68M     0 100% /snap/lxd/21835
/dev/sda2                          1.5G  208M  1.2G  16% /boot
/dev/sda1                          1.1G  5.3M  1.1G   1% /boot/efi
/dev/loop9                          62M   62M     0 100% /snap/core20/1581
tmpfs                              789M     0  789M   0% /run/user/0

然后,lsblk:

NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0 113.9M  1 loop /snap/core/13308
loop1                       7:1    0   114M  1 loop /snap/core/13425
loop2                       7:2    0  67.8M  1 loop /snap/lxd/22753
loop3                       7:3    0  39.3M  1 loop /snap/hub/43
loop4                       7:4    0  61.9M  1 loop /snap/core20/1518
loop5                       7:5    0    47M  1 loop /snap/snapd/16010
loop7                       7:7    0  67.2M  1 loop /snap/lxd/21835
loop8                       7:8    0    47M  1 loop /snap/snapd/16292
loop9                       7:9    0    62M  1 loop /snap/core20/1581
sda                         8:0    0 931.5G  0 disk 
├─sda1                      8:1    0   1.1G  0 part /boot/efi
├─sda2                      8:2    0   1.5G  0 part /boot
└─sda3                      8:3    0   929G  0 part 
  └─ubuntu--vg-ubuntu--lv 253:0    0   100G  0 lvm  /
sr0                        11:0    1  1024M  0 rom  

可以看到sda3,应该是有929G的,但是ubuntu那个lvm只有100G。大概意思就是还有828G多是未分配空间。
然后用vgs命令确认了:

 VG        #PV #LV #SN Attr   VSize    VFree   
  ubuntu-vg   1   1   0 wz--n- <928.96g <828.96g

vgdisplay:

  --- Volume group ---
  VG Name               ubuntu-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <928.96 GiB
  PE Size               4.00 MiB
  Total PE              237813
  Alloc PE / Size       25600 / 100.00 GiB
  Free  PE / Size       212213 / <828.96 GiB
  VG UUID               jkV7YK-c0LY-v9au-nGj6-265a-n6bG-hGyV0d

可以看到当前的VG确实有剩余828.96G的空间。

lvdisplay:

  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/ubuntu-lv
  LV Name                ubuntu-lv
  VG Name                ubuntu-vg
  LV UUID                gOMnxJ-3ONt-ldWu-ZzU7-neh2-dygv-Z8qM5t
  LV Write Access        read/write
  LV Creation host, time ubuntu-server, 2022-03-31 14:47:48 +0800
  LV Status              available
  # open                 1
  LV Size                100.00 GiB
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

确实是只分配了100G。
好了现在要做的就是把未分配的828G,加到现有的lv里面就行了,使用命令lvextend:

lvextend -L +828G /dev/ubuntu-vg/ubuntu-lv   或  lvextend -l +212213 /dev/ubuntu-vg/ubuntu-lv
  Size of logical volume ubuntu-vg/ubuntu-lv changed from 100.00 GiB (25600 extents) to 928.00 GiB (237568 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.

然后刷新一下,使用resize2fs命令:

resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

此时,再用df -h查看,可以看到,根目录已经是900多G了:

#df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              789M  1.4M  788M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  913G   35G  841G   4% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop1                         114M  114M     0 100% /snap/core/13425
/dev/loop0                         114M  114M     0 100% /snap/core/13308
/dev/loop4                          62M   62M     0 100% /snap/core20/1518
/dev/loop2                          68M   68M     0 100% /snap/lxd/22753
/dev/loop3                          40M   40M     0 100% /snap/hub/43
/dev/loop8                          47M   47M     0 100% /snap/snapd/16292
/dev/loop5                          47M   47M     0 100% /snap/snapd/16010
/dev/loop7                          68M   68M     0 100% /snap/lxd/21835
/dev/sda2                          1.5G  208M  1.2G  16% /boot
/dev/sda1                          1.1G  5.3M  1.1G   1% /boot/efi
/dev/loop9                          62M   62M     0 100% /snap/core20/1581
tmpfs                              789M     0  789M   0% /run/user/0

参考https://blog.csdn.net/cuichongxin/article/details/103064707

常见的几种域名状态及解释如下:
Status: ACTIVE 活跃状态
Status: clientTransferProhibited 域名禁止转让
Status: clientDeleteProhibited 域名禁止删除
Status: clientUpdateProhibited 域名禁止更新
Status: REGISTRAR-LOCK 注册商锁定
Status: REGISTRAR-HOLD 注册商保留
(说明域名该已经过期,但仍可以续费)
Status: REDEMPTIONPERIOD 已经超期未续费
(已经无法续费,只能等待3个月后域名被自动放开才能再注册)

之前有个域名不想续费了。就没管。后来想续费回来的时候,已经变成了redemptionPeriod,只能等删除重新注册了。

因为想着二次开发。所以先搭起来。
几点注意事项。
1,因为下载很多组件,插件啥的。所以先设置个代理。
export http_proxy=http://XXXXX:8080
这样,setup.sh的时候才能很快的下载。
2,修改代码,加代理,后台可能要检测升级啥的。
Mobile-Security-Framework-MobSF/mobsf/MobSF/settings.py

   # ========UPSTREAM PROXY SETTINGS ==============
    # If you are behind a Proxy
    UPSTREAM_PROXY_ENABLED = True
    UPSTREAM_PROXY_SSL_VERIFY = True
    UPSTREAM_PROXY_TYPE = 'http'
    UPSTREAM_PROXY_IP = '127.0.0.1'
    UPSTREAM_PROXY_PORT = 10809

3,把检测更新去掉
Mobile-Security-Framework-MobSF/mobsf/MobSF/utils.py 100,101行,注释掉如下代码:

    #thread = threading.Thread(target=check_update, name='check_update')
    #thread.start()

4,默认所有的缓存文件,都是放到用户的HOME目录去的,比如/root/.Mobsf/xxxx
我这里给放到了Mobsf的安装目录了。
所以要做如下改动:
Mobile-Security-Framework-MobSF/mobsf/MobSF/settings.py

USE_HOME = False
# True : All Uploads/Downloads will be stored in user's home directory
# False : All Uploads/Downloads will be stored under MobSF root directory

5,不知道是啥原因。总是卡在wkhtmltopdf上面,所以先安装这个东西,再运行setup.sh

yum install wkhtmltopdf