<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                **操作之前建議先做快照** 1. 遠程連接實例。 2. 運行 fdisk -l 命令查看實例是否有數據盤。如果執行命令后,沒有發現 /dev/vdb,表示您的實例沒有數據盤,無需格式化數據盤,請忽略本文后續內容。 - 如果您的數據盤顯示的是 dev/xvd?,表示您使用的是非 I/O 優化實例。 - 其中 ? 是 a?z 的任一個字母。 3. 創建一個單分區數據盤,依次執行以下命令: a. 運行 fdisk /dev/vdb:對數據盤進行分區。 b. 輸入 n 并按回車鍵:創建一個新分區。 c. 輸入 p 并按回車鍵:選擇主分區。因為創建的是一個單分區數據盤,所以只需要創建主分區。 > 說明 > 如果要創建 4 個以上的分區,您應該創建至少一個擴展分區,即選擇 e。 d. 輸入分區編號并按回車鍵。因為這里僅創建一個分區,可以輸入 1。 e.輸入第一個可用的扇區編號:按回車鍵采用默認值 1。 f.輸入最后一個扇區編號:因為這里僅創建一個分區,所以按回車鍵采用默認值。 g.輸入 wq 并按回車鍵,開始分區。 ``` [root@iXXXXXXX ~]# fdisk /dev/vdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x5f46a8a2. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-41610, default 1): 1 Last cylinder, +cylinders or +size{K,M,G} (1-41610, default 41610): Using default value 41610 Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. ``` 4. 查看新的分區:運行命令 `fdisk -l` 。如果出現以下信息,說明已經成功創建了新分區 /dev/vdb1。 ``` [root@iXXXXXXX ~]# fdisk -l Disk /dev/vda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00053156 Device Boot Start End Blocks Id System /dev/vda1 * 1 5222 41942016 83 Linux Disk /dev/vdb: 21.5 GB, 21474836480 bytes 16 heads, 63 sectors/track, 41610 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x5f46a8a2 Device Boot Start End Blocks Id System /dev/vdb1 1 41610 20971408+ 83 Linux ``` 5. 在新分區上創建一個文件系統:運行命令 `mkfs.ext4 /dev/vdb1` 。 - 本示例要創建一個 ext4 文件系統。您也可以根據自己的需要,選擇創建其他文件系統,例如,如果需要在 Linux、Windows 和 Mac 系統之間共享文件,您可以使用 `mkfs.vfat` 創建 VFAT 文件系統。 - 創建文件系統所需時間取決于數據盤大小。 ``` [root@iXXXXXXX ~]# mkfs.ext4 /dev/vdb1 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 1310720 inodes, 5242852 blocks 262142 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 160 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 37 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. ``` 6. 執行命令: `mount /dev/vdb1 /mnt` 先將數據盤掛載上 7. 查看是否掛載成功 `df -lh` ``` Filesystem Size Used Avail Use% Mounted on /dev/vda1 40G 37G 882M 98% / devtmpfs 1.9G 0 1.9G 0% /dev tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs 1.9G 400K 1.9G 1% /run tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/vdb1 99G 61M 94G 1% /mnt tmpfs 380M 0 380M 0% /run/user/0 ``` 8. 停止服務,運行命令 `systemctl stop alfresco` 服務停止后 `systemctl status alfresco` 檢查一下是否完全停止 如果顯示紅色 stop 則停止了,如果沒有成功停止 執行一下幾條命令: ``` killall java killall postgres.bin ``` 9. 拷貝數據到云盤,運行命令 `cp -rp /opt/alfresco-community/* /mnt/` 復制完成后執行 `ls /mnt/` 查看數據確保數據復制完成后 執行命令 `rm -rf /opt/alfresco-community/* ` 刪除源數據 釋放存儲空間(注意:一定要確認數據復制完成) > 這里數據少的話可以考慮使用`mv /opt/alfresco-community/* /mnt/` 就不需要刪除源數據 12. 備份 /etc/fstab:運行命令 cp /etc/fstab /etc/fstab.bak。 13. 向 /etc/fstab 寫入新分區信息:運行命令 `echo /dev/vdb1 /opt/alfresco-community ext4 defaults 0 0 >> /etc/fstab` 。 14. 查看 /etc/fstab 中的新分區信息:運行命令 `cat /etc/fstab` 。 ``` [root@iXXXXXXX ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Thu Feb 23 07:28:22 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=3d083579-f5d9-4df5-9347-8d27925805d4 / ext4 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/vdb1 /opt/alfresco-community ext4 defaults 0 0 ``` 15. 重啟服務器 `reboot` 10. 重啟完成后查看目前磁盤空間和使用情況:運行命令 `df -h` 。如果出現新建文件系統的信息,說明掛載成功,可以使用新的文件系統了。 ``` Filesystem Size Used Avail Use% Mounted on /dev/vda1 40G 37G 882M 98% / devtmpfs 1.9G 0 1.9G 0% /dev tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs 1.9G 400K 1.9G 1% /run tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/vdb1 99G 61M 94G 1% /opt/alfresco-community tmpfs 380M 0 380M 0% /run/user/0 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看