解決 OpenVAS 掃描 Linux 主機出現的「Check if Mailserver answer to VRFY and EXPN requestsd」訊息

使用 OpenVAS 掃描 CentOS 7.x Linux 主機時,出現「Check if Mailserver answer to VRFY and EXPN requestsd」訊息

# telnet 127.0.0.1 25
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.
220 localhost.localdomain ESMTP Postfix
VRFY
501 5.5.4 Syntax: VRFY address[@more@]解決方式:
參考網站:
Mail Server Security question – Google 網上論壇

修改 /etc/postfix/main.cf
# cp /etc/postfix/main.cf /etc/postfix/main.cf.$(date +%F)
# vim /etc/postfix/main.cf
加入下面一行
disable_vrfy_command=yes

測試一下
# telnet 127.0.0.1 25
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.
220 localhost.localdomain ESMTP Postfix
VRFY
502 5.5.1 VRFY command is disabled

重新啟動 Postfix
# systemctl restart postfix.service;systemctl status postfix.service

利用 OpenVAS 進行掃描

參考網頁:
自建OpenVAS弱點掃描 資安稽核報表不求人(上) – 技術專欄 – 網管人NetAdmin
自建OpenVAS弱點掃描 資安稽核報表不求人(下) – 技術專欄 – 網管人NetAdmin

1. 選擇 Wizard / Advanced Task Wizard

[@more@]2. Task Name: 識別名稱
     Scan Config: 掃描方式
     Target Host(s): 掃描主機
     127.0.0.1 or 192.168.1.0/24 or 192.168.1.3,192.168.1.5

3. 掃描的深度,從最淺層的 Discovery 到最深層的 Full and very deep ultimate,以及用來大量找尋設備的 Host Discovery,和取得系統資訊的 System Discover。愈深層所需的掃描時間愈久,但愈能掃描出問題。

4. 新增的掃描任務

5. 掃描中

6. 當出現 Done 代表掃描完成

7. 點選日期可以查看掃描結果

8. 掃描結果

9. 下載 PDF 檔案

10. PDF 檔

在 CentOS 7.x 上安裝 OpenVAS

官方網站:
http://www.openvas.org/index.html

參考網站:
http://forums.atomicorp.com/viewtopic.php?f=31&t=8047
電腦筆記本: OpenVas8 on CentOS7
塵世浮沉近千秋: Cent OS 7 Install OpenVAS 8
OpenVAS6 – Itsmw
TWNIC 2015電子報
Install OpenVAS on CentOS 7 / RHEL 7
OpenVas – Itsmw

1) Disable SELINUX.
Edit /etc/selinux/config, save and reboot
# sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
2) Add required packages
# yum install wget bzip2 texlive net-tools 
3) Add Atomicorp repo
# wget -q -O – http://www.atomicorp.com/installers/atomic | sh
Do you agree to these terms? (yes/no) [Default: yes]

Configuring the [atomic] repo archive for this system

Installing the Atomic GPG keys: OK

Downloading atomic-release-1.0-21.el7.art.noarch.rpm: Preparing…                          ################################# [100%]
Updating / installing…
   1:atomic-release-1.0-21.el7.art    ################################# [100%]
OK

Enable repo by default? (yes/no) [Default: yes]:

The Atomic repo has now been installed and configured for your system
The following channels are available:
  atomic          – [ACTIVATED] – contains the stable tree of ART packages
  atomic-testing  – [DISABLED]  – contains the testing tree of ART packages
  atomic-bleeding – [DISABLED]  – contains the development tree of ART packages

[@more@]4) Install OpenVAS
# yum update
# yum install openvas alien

5) edit /etc/redis.conf. Add/uncomment the following
unixsocket /tmp/redis.sock
unixsocketperm 700
# cp /etc/redis.conf /etc/redis.conf.$(date +%F)
# sed -i ‘s/^# unixsocket/unixsocket/’ /etc/redis.conf

6) Restart Redis
# systemctl enable redis && systemctl restart redis
# systemctl status redis
● redis.service – Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           mqlimit.conf
   Active: active (running) since 四 2017-02-09 15:16:46 CST; 40min ago
 Main PID: 1030 (redis-server)
   CGroup: /system.slice/redis.service
           mq1030 /usr/bin/redis-server 127.0.0.1:6379

 2月 09 15:16:46 localhost.localdomain systemd[1]: Started Redis persistent key-value database.
 2月 09 15:16:46 localhost.localdomain systemd[1]: Starting Redis persistent key-value database…

7) openvas-setup
follow instructions. If rsync throws error, check that your network allows outgoing TCP 873 to internet

# /usr/bin/openvas-setup
Openvas Setup, Version: 1.0

Step 1: Update NVT, CERT, and SCAP data
Please note this step could take some time.
Once completed, this will be updated automatically every 24 hours

Select download method
* wget (NVT download only)
* curl (NVT download only)
* rsync

  Note: If rsync requires a proxy, you should define that before this step.
Downloader [Default: rsync]
Updating NVTs….
[i] This script synchronizes an NVT collection with the ‘OpenVAS NVT Feed’.
[i] The ‘OpenVAS NVT Feed’ is provided by ‘The OpenVAS Project’.
[i] Online information about this feed: ‘http://www.openvas.org/openvas-nvt-feed.html’.
[i] NVT dir: /var/lib/openvas/plugins
[w] Could not determine feed version.
[i] rsync is not recommended for the initial sync. Falling back on http.
[i] Will use wget
[i] Using GNU wget: /usr/bin/wget
[i] Configured NVT http feed: http://www.openvas.org/openvas-nvt-feed-current.tar.bz2
[i] Downloading to: /tmp/openvas-nvt-sync.Q53foiaQhA/openvas-feed-2017-02-09-1275.tar.bz2
–2017-02-09 15:26:23–  http://www.openvas.org/openvas-nvt-feed-current.tar.bz2
正在查找主機 www.openvas.org (www.openvas.org)… 5.9.98.186
正在連接 www.openvas.org (www.openvas.org)|5.9.98.186|:80… 連上了。
已送出 HTTP 要求,正在等候回應… 200 OK
長度: 28323931 (27M) [application/x-bzip2]
Saving to: ‘/tmp/openvas-nvt-sync.Q53foiaQhA/openvas-feed-2017-02-09-1275.tar.bz2’

Step 2: Configure GSAD
The Greenbone Security Assistant is a Web Based front end
for managing scans. By default it is configured to only allow
connections from localhost.

Allow connections from any IP? [Default: yes]
Redirecting to /bin/systemctl restart  gsad.service

Step 3: Choose the GSAD admin users password.
The admin user is used to configure accounts,
Update NVT’s manually, and manage roles.

Enter administrator username [Default: admin] :
Enter Administrator Password:
Verify Administrator Password:

Redirecting to /bin/systemctl start  redis.service

Setup complete, you can now access GSAD at:
  https://<IP>:9392

Created symlink from /etc/systemd/system/multi-user.target.wants/openvas-scanner.service to /usr/lib/systemd/system/openvas-scanner.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openvas-manager.service to /usr/lib/systemd/system/openvas-manager.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/gsad.service to /usr/lib/systemd/system/gsad.service.

8 ) To access OV-8 from network, either disable firewall or add exception for tcp 9392
# firewall-cmd –permanent –zone=public –add-port=9392/tcp
# firewall-cmd –reload

Go to https://<IP-ADDRESS>:9392 and login.

[Optional] : Greenbone Security Assistant (GSAD)
For those who wants to install proper SSL cert. Download certificate and key file to your CentOS box. I place them inside /etc/openvas/ssl.
Edit /etc/sysconfig/gsad and modify the OPTIONS tag e.g.

OPTIONS=”–ssl-certificate=/etc/openvas/ssl/openvas.crt –ssl-private-key=/etc/openvas/ssl/openvas.key”

Restart gsad
systemctl restart gsad

Those who wants stronger ciphers can will need to add gnutls-priorities, e.g.
OPTIONS=”–ssl-certificate=/etc/openvas/ssl/openvas.crt –ssl-private-key=/etc/openvas/ssl/openvas.key –gnutls-priorities=SECURE128:+SECURE192:-VERS-TLS-ALL:+VERS-TLS1.2″

(See explanation at http://gnutls.org/manual/html_node/Priority-Strings.html)

# openvas-check-setup
openvas-check-setup 2.3.7
  Test completeness and readiness of OpenVAS-8
  (add ‘–v6’ or ‘–v7’ or ‘–v9’
   if you want to check for another OpenVAS version)

  Please report us any non-detected problems and
  help us to improve this check routine:
  http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss

  Send us the log-file (/tmp/openvas-check-setup.log) to help analyze the problem.

  Use the parameter –server to skip checks for client tools
  like GSD and OpenVAS-CLI.

Step 1: Checking OpenVAS Scanner …
        OK: OpenVAS Scanner is present in version 5.0.7.
        OK: OpenVAS Scanner CA Certificate is present as /var/lib/openvas/CA/cacert.pem.
        OK: redis-server is present in version v=3.0.7.
        OK: scanner (kb_location setting) is configured properly using the redis-server socket: /tmp/redis.sock
        OK: redis-server is running and listening on socket: /tmp/redis.sock.
        OK: redis-server configuration is OK and redis-server is running.
        OK: NVT collection in /var/lib/openvas/plugins contains 51765 NVTs.
        WARNING: Signature checking of NVTs is not enabled in OpenVAS Scanner.
        SUGGEST: Enable signature checking (see http://www.openvas.org/trusted-nvts.html).
        OK: The NVT cache in /var/cache/openvas contains 51765 files for 51765 NVTs.
Step 2: Checking OpenVAS Manager …
        OK: OpenVAS Manager is present in version 6.0.9.
        OK: OpenVAS Manager client certificate is present as /var/lib/openvas/CA/clientcert.pem.
        OK: OpenVAS Manager database found in /var/lib/openvas/mgr/tasks.db.
        OK: Access rights for the OpenVAS Manager database are correct.
        OK: sqlite3 found, extended checks of the OpenVAS Manager installation enabled.
        OK: OpenVAS Manager database is at revision 146.
        OK: OpenVAS Manager expects database at revision 146.
        OK: Database schema is up to date.
        OK: OpenVAS Manager database contains information about 51765 NVTs.
        OK: At least one user exists.
        OK: OpenVAS SCAP database found in /var/lib/openvas/scap-data/scap.db.
        OK: OpenVAS CERT database found in /var/lib/openvas/cert-data/cert.db.
        OK: xsltproc found.
Step 3: Checking user configuration …
        WARNING: Your password policy is empty.
        SUGGEST: Edit the /etc/openvas/pwpolicy.conf file to set a password policy.
Step 4: Checking Greenbone Security Assistant (GSA) …
        OK: Greenbone Security Assistant is present in version 6.0.11.
Step 5: Checking OpenVAS CLI …
        OK: OpenVAS CLI version 1.4.5.
Step 6: Checking Greenbone Security Desktop (GSD) …
        SKIP: Skipping check for Greenbone Security Desktop.
Step 7: Checking if OpenVAS services are up and running …
        OK: netstat found, extended checks of the OpenVAS services enabled.
        OK: OpenVAS Scanner is running and listening on all interfaces.
        OK: OpenVAS Scanner is listening on port 9391, which is the default port.
        OK: OpenVAS Manager is running and listening on all interfaces.
        OK: OpenVAS Manager is listening on port 9390, which is the default port.
        OK: Greenbone Security Assistant is listening on port 9392, which is the default port.
Step 8: Checking nmap installation …
        WARNING: Your version of nmap is not fully supported: 6.47
        SUGGEST: You should install nmap 5.51 if you plan to use the nmap NSE NVTs.
Step 10: Checking presence of optional tools …
        OK: pdflatex found.
        OK: PDF generation successful. The PDF report format is likely to work.
        OK: ssh-keygen found, LSC credential generation for GNU/Linux targets is likely to work.
        OK: rpm found, LSC credential package generation for RPM based targets is likely to work.
        WARNING: Could not find alien binary, LSC credential package generation for DEB based targets will not work.
        SUGGEST: Install alien.
        OK: nsis found, LSC credential package generation for Microsoft Windows targets is likely to work.
        OK: SELinux is disabled.

It seems like your OpenVAS-8 installation is OK.

If you think it is not OK, please report your observation
and help us to improve this check routine:
http://lists.wald.intevation.org/mailman/listinfo/openvas-discuss
Please attach the log-file (/tmp/openvas-check-setup.log) to help us analyze the problem.

LVM – LV 指令

lvcreate 從 VG 中建立 LV
# lvcreate -L <size> [-n <lv name>] <vg>
# lvcreate -L 50M -n v1 diskvg
  Rounding up size to full physical extent 52.00 MiB
  Logical volume “v1” created
# lvcreate -L 150M -n v2 diskvg
  Rounding up size to full physical extent 152.00 MiB
  Logical volume “v2” created
# lvcreate -L 250M -n v3 diskvg
  Rounding up size to full physical extent 252.00 MiB
  Logical volume “v3” created
以 32 個 PE 空間來建立 LV
# lvcreate -l 32 -n v4 diskvg

lvdisplay 顯示 LV 資訊
# lvdisplay /dev/diskvg/v1
  — Logical volume —
  LV Name                /dev/diskvg/v1
  VG Name                diskvg
  LV UUID                50dHxI-bwNi-xksv-P4rS-XS1W-suNi-z3ljTc
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                52.00 MiB
  Current LE             13
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  – currently set to     1024
  Block device           253:0

[@more@]lvscan 用來掃描系統中所有 LV 的資訊
# lvscan
  inactive          ‘/dev/diskvg/v1’ [52.00 MiB] inherit
  inactive          ‘/dev/diskvg/v2’ [152.00 MiB] inherit
  inactive          ‘/dev/diskvg/v3’ [252.00 MiB] inherit
  ACTIVE            ‘/dev/diskvg/v4’ [128.00 MiB] inherit

lvextend 用來放大 Logical volume 的大小
# lvextend {-L [+]LogicalVolumeSize | -1 [+]LogicalExtentsNumber } <lv>
把 v1 空間加大 100M
# lvextend -L +100M /dev/diskvg/v1
  Extending logical volume v1 to 152.00 MiB
  Logical volume v1 successfully resized
# lvdisplay /dev/diskvg/v1
  — Logical volume —
  LV Name                /dev/diskvg/v1
  VG Name                diskvg
  LV UUID                50dHxI-bwNi-xksv-P4rS-XS1W-suNi-z3ljTc
  LV Write Access        read/write
  LV Status              NOT available
  LV Size                152.00 MiB
  Current LE             38
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto

lvremove 刪除 Logical Volume
# lvremove /dev/diskvg/v4
Do you really want to remove active logical volume v4? [y/n]: y
  Logical volume “v4” successfully removed
# lvscan
  inactive          ‘/dev/diskvg/v1’ [152.00 MiB] inherit
  inactive          ‘/dev/diskvg/v2’ [152.00 MiB] inherit
  inactive          ‘/dev/diskvg/v3’ [252.00 MiB] inherit

LVM – VG 指令

vgcreate 將一個或一個以上的 PV 組成一個 VG
 # vgcreate diskvg /dev/sdb1 /dev/sdb2 /dev/sdb3
  Volume group “diskvg” successfully created

vgdisplay 顯示 VG 的相關訊息,包括 PE 的數量、大小等資訊
# vgdisplay diskvg
  — Volume group —
  VG Name               diskvg
  System ID
  Format                lvm2
  Metadata Areas        3
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                3
  Act PV                3
  VG Size               2.99 GiB
  PE Size               4.00 MiB
  Total PE              765
  Alloc PE / Size       114 / 456.00 MiB
  Free  PE / Size       651 / 2.54 GiB
  VG UUID               KP7wM8-DDuZ-a5jy-RsBP-Be22-5nVu-dk9hCl

[@more@]vgscan 掃描系統中所有的 VG 資訊
# vgscan
  Reading all physical volumes.  This may take a while…
  Found volume group “diskvg” using metadata type lvm2

vgextend 擴充 VG 容量,把 PV 加入已存在的 VG
# vgextend diskvg /dev/sdc1
  Volume group “diskvg” successfully extended
# vgdisplay diskvg
  — Volume group —
  VG Name               diskvg
  System ID
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               3.98 GiB
  PE Size               4.00 MiB
  Total PE              1020
  Alloc PE / Size       114 / 456.00 MiB
  Free  PE / Size       906 / 3.54 GiB
  VG UUID               KP7wM8-DDuZ-a5jy-RsBP-Be22-5nVu-dk9hCl

vgchange 停止 VG 的作用,目的是讓所有程式不能再存取此 VG
# vgchange -a n diskvg
0 logical volume(s) in volume group “diskvg” now active

vgremove 刪除 VG
要先停止 VG 後,才能刪除 VG
# vgremove diskvg
Volume group “diskvg” sucessfully removed

vgreduce 移除加入到 VG 的 PV
# vgreduce diskvg /dev/sdc1
Removed “/dev/sdc1” from volume group “diskvg”

LVM – PV 指令

pvcreate 將實體的分割區轉換成 Physical Volume
# pvcreate /dev/sdb1
  Physical volume “/dev/sdb1” successfully created

pvdisplay 顯示 PV 相關資訊
# pvdisplay /dev/sdb1
  — Physical volume —
  PV Name               /dev/sdb1
  VG Name               diskvg
  PV Size               1.00 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              255
  Free PE               141
  Allocated PE          114
  PV UUID               CblZP6-Xks3-1TwD-E26S-iBkW-2c4f-zzj3vb

[@more@]pvscan 掃描系統中所有的 PV 資訊
# pvscan
  PV /dev/sdb1   VG diskvg   lvm2 [1020.00 MiB / 564.00 MiB free]
  PV /dev/sdb2   VG diskvg   lvm2 [1020.00 MiB / 1020.00 MiB free]
  PV /dev/sdb3   VG diskvg   lvm2 [1020.00 MiB / 1020.00 MiB free]
  Total: 3 [2.99 GiB] / in use: 3 [2.99 GiB] / in no VG: 0 [0   ]

pvmove 搬移 Physical Volume 內的資料
# pvmove [-n <lv>] < source pv> [<destination pv>]
pvmove 這個並不是搬移 PV,而是搬移 PV 內的資料,其實就是將 PV 中的 PE 資料搬移到同一個 VG 中的另一個 PV 內(註:一定要在同一個 VG 內的 PV),這個指令通常是用於我們要將某個 PV 從 VG 中移除時(註:利用 vgreduce 指令時),先將 PV 中的資料搬移到另一個 PV 之中,再進行移除 PV 的動作。

pvremove 移除 PV
# pvremove /dev/sdb1 /dev/sdb2 /dev/sdb3
Labels on physical volume “/dev/sdb1” successfully wiped
Labels on physical volume “/dev/sdb2” successfully wiped
Labels on physical volume “/dev/sdb3” successfully wiped

刪除邏輯卷冊 / 卷冊群組 / 實體卷冊

刪除邏輯卷冊
# umount /dev/systemVG/www_LV
# lvremove /dev/systemVG/www_LV
Do you really want to remove active logical volume www_LV? [y/n]: y
  Logical volume “www_LV” successfully removed

# pvscan
  PV /dev/sda5   VG systemVG        lvm2 [1020.00 MiB / 1020.00 MiB free]
  PV /dev/sda6   VG systemVG        lvm2 [1020.00 MiB / 1020.00 MiB free]
  PV /dev/sda7                      lvm2 [1.00 GiB]
  Total: 3 [2.99 GiB] / in use: 2 [1.99 GiB] / in no VG: 1 [1.00 GiB]

[@more@]將卷冊群組停止使用
# vgchange -a n systemVG
刪除卷冊群組
# vgremove systemVG
  Volume group “systemVG” successfully removed

刪除實體卷冊
# pvremove /dev/sda5 /dev/sda6 /dev/sda7
  Labels on physical volume “/dev/sda5” successfully wiped
  Labels on physical volume “/dev/sda6” successfully wiped
  Labels on physical volume “/dev/sda7” successfully wiped

縮放卷冊群組和邏輯卷冊的大小

增加實體卷冊到卷冊群組
# vgdisplay systemVG
— Volume group —
VG Name systemVG
System ID
Format lvm2
Metadata Areas 2
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 2
Act PV 2
VG Size 1.99 GiB
PE Size 4.00 MiB
Total PE 510
Alloc PE / Size 125 / 500.00 MiB
Free PE / Size 385 / 1.50 GiB
VG UUID oWUkZt-IOhU-1qw2-THBl-qRfY-w3xK-JDCPXe

VG Size 為 2G,Cur PV 2 由 2 個 PV 組成

[@more@]# vgextend systemVG /dev/sda7
Volume group “systemVG” successfully extended

# vgdisplay systemVG
— Volume group —
VG Name systemVG
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 3
Act PV 3
VG Size 2.99 GiB
PE Size 4.00 MiB
Total PE 765
Alloc PE / Size 125 / 500.00 MiB
Free PE / Size 640 / 2.50 GiB
VG UUID oWUkZt-IOhU-1qw2-THBl-qRfY-w3xK-JDCPXe

VG 變成 3G,Cur PV 由 3 個 PV 所組成

將實體卷冊從卷冊群組中移除
# vgreduce systemVG /dev/sda7
Removed “/dev/sda7” from volume group “systemVG”
vgreduce 指令工具可以將尚未使用到的實體卷冊從卷冊群組中移除,但如果實體卷冊已經被有存取容量空間占用時,就會無法刪除

透過指令來縮放邏輯卷冊
# df -h | grep www_LV
/dev/mapper/systemVG-www_LV 500M 33M 468M 7% /var/www

# lvdisplay | grep “LV Size”
LV Size 500.00 MiB

加大 www_LV 邏輯卷冊 加到 750M(原有 500M + 250M)
# umount /var/www
# lvextend -L +250M /dev/systemVG/www_LV
Rounding up size to full physical extent 252.00 MiB
Extending logical volume www_LV to 752.00 MiB
Logical volume www_LV successfully resized

# ls -l /var/www
總計 0
-rw-r–r– 1 root root 0 5月 17 21:16 test.html

格式化後續新增的部分
ext2/ext3 resizefs
# resize2fs -s +250M /dev/systemVG/www_LV
# resize_reiserfs -s +250M /dev/systemVG/www_LV
resize_reiserfs 3.6.21 (2009 www.namesys.com)

ReiserFS report:
blocksize 4096
block count 192000 (128000)
free blocks 183783 (119785)
bitmap block count 6 (4)

Syncing..done

resize_reiserfs: Resizing finished successfully.

重新掛載
# mount -t reiserfs /dev/systemVG/www_LV /var/www
檢查容量
# lvdisplay | grep “LV Size”
LV Size 752.00 MiB
# df -h | grep www_LV
/dev/mapper/systemVG-www_LV 750M 33M 718M 5% /var/www

縮小邏輯卷冊的大小
# umount /var/www
# resize_reiserfs -s -100M /dev/systemVG/www_LV
resize_reiserfs 3.6.21 (2009 www.namesys.com)

You are running BETA version of reiserfs shrinker.
This version is only for testing or VERY CAREFUL use.
Backup of you data is recommended.

Do you want to continue? [y/N]: y
Processing the tree: 0%….20%….40%….60%….80%….100% left 0, 0 /sec

nodes processed (moved):
int 0 (0),
leaves 1 (0),
unfm 0 (0),
total 1 (0).

check for used blocks in truncated region

ReiserFS report:
blocksize 4096
block count 166400 (192000)
free blocks 158183 (183783)
bitmap block count 6 (6)

Syncing..done

resize_reiserfs: Resizing finished successfully.

使用 lvreduce 減少 www_LV 的 100 空間
# lvreduce -L -100M /dev/systemVG/www_LV
WARNING: Reducing active logical volume to 652.00 MiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce www_LV? [y/n]: y
Reducing logical volume www_LV to 652.00 MiB
Logical volume www_LV successfully resized

重新掛載
# mount -t reiserfs /dev/systemVG/www_LV /var/www
# df -h | grep www_LV
/dev/mapper/systemVG-www_LV 650M 33M 618M 5% /var/www
# lvdisplay | grep “LV Size”
LV Size 652.00 MiB

Proxmox – LVM

掃描目前實體卷冊的狀態
# pvscan
  PV /dev/sda3   VG pve   lvm2 [118.99 GiB / 14.61 GiB free]
  Total: 1 [118.99 GiB] / in use: 1 [118.99 GiB] / in no VG: 0 [0   ]

掃描目前卷冊群組的狀態
# vgscan
  Reading all physical volumes.  This may take a while…
  Found volume group “pve” using metadata type lvm2

顯示目前系統上面的 VG 狀態
# vgdisplay pve
  — Volume group —
  VG Name               pve
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  80
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                5
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               118.99 GiB
  PE Size               4.00 MiB
  Total PE              30461
  Alloc PE / Size       26720 / 104.38 GiB
  Free  PE / Size       3741 / 14.61 GiB
  VG UUID               M7GUTE-om2m-DMcv-1D0G-o3FQ-Ta3I-HCsZa3
[@more@]

# lvs
  LV                    VG   Attr       LSize  Pool Origin        Data%  Meta%  Move Log Cpy%Sync Convert
  data                  pve  twi-aotz– 66.74g                    1.69   1.36
  root                  pve  -wi-ao—- 29.50g
  snap_vm-103-disk-1_OK pve  Vri—tz-k  8.00g data vm-103-disk-1
  swap                  pve  -wi-ao—-  8.00g
  vm-103-disk-1         pve  Vwi-a-tz–  8.00g data               13.88

顯示硬碟分割
# fdisk -l
Device      Start       End   Sectors  Size Type
/dev/sda1    2048      4095      2048    1M BIOS boot
/dev/sda2    4096    528383    524288  256M EFI System
/dev/sda3  528384 250069646 249541263  119G Linux LVM

Disk /dev/mapper/pve-root: 29.5 GiB, 31675383808 bytes, 61865984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/pve-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/pve-vm–103–disk–1: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes

掃描目前邏輯卷冊的狀態
# lvscan
  ACTIVE            ‘/dev/pve/swap‘ [8.00 GiB] inherit
  ACTIVE            ‘/dev/pve/root‘ [29.50 GiB] inherit
  ACTIVE            ‘/dev/pve/data‘ [66.74 GiB] inherit
  ACTIVE            ‘/dev/pve/vm-103-disk-1‘ [8.00 GiB] inherit
  inactive          ‘/dev/pve/snap_vm-103-disk-1_OK‘ [8.00 GiB] inherit

# vgs
  VG   #PV #LV #SN Attr   VSize   VFree
  pve    1   5   0 wz–n- 118.99g 14.61g

Firefox 52.0.2 版


直接下載最新版本安裝
Windows
x86
http://ftp.mozilla.org/pub/firefox/releases/52.0.2/win32/zh-TW/Firefox%20Setup%2052.0.2.exe
ESR 版本
http://ftp.mozilla.org/pub/firefox/releases/52.0.2esr/win32/zh-TW/Firefox%20Setup%2052.0.2esr.exe

x64
http://ftp.mozilla.org/pub/firefox/releases/52.0.2/win64/zh-TW/Firefox%20Setup%2052.0.2.exe
ESR 版本
http://ftp.mozilla.org/pub/firefox/releases/52.0.2esr/win64/zh-TW/Firefox%20Setup%2052.0.2esr.exe

Mac
http://ftp.mozilla.org/pub/firefox/releases/52.0.2/mac/zh-TW/Firefox%2052.0.2.dmg
ESR 版本
http://ftp.mozilla.org/pub/firefox/releases/52.0.2esr/mac/zh-TW/Firefox%2052.0.2esr.dmg