国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁 > 營銷資訊 > 網(wǎng)站運營 > 一次不太成功的Esxi虛擬機下群暉NAS硬盤擴容經(jīng)歷

一次不太成功的Esxi虛擬機下群暉NAS硬盤擴容經(jīng)歷

時間:2023-07-13 00:00:01 | 來源:網(wǎng)站運營

時間:2023-07-13 00:00:01 來源:網(wǎng)站運營

一次不太成功的Esxi虛擬機下群暉NAS硬盤擴容經(jīng)歷:

記錄我一次不太成功的Esxi虛擬機下群暉NAS硬盤擴容經(jīng)歷

1、先在esxi虛擬機設(shè)置中編輯 ,將群暉虛擬機的數(shù)據(jù)盤的硬盤擴大 由100G 擴大到150G

2、再打開群暉的SSH 服務(wù),默認端口22,使用win10 命令行用SSH登錄

3、使用fdisk -l 命令查看硬盤情況

fdisk -lDisk /dev/ram0: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram1: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram2: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram3: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram4: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram5: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram6: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram7: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram8: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram9: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram10: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram11: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram12: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram13: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram14: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/ram15: 640 MiB, 671088640 bytes, 1310720 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/synoboot: 128 MiB, 134217728 bytes, 262144 sectorsDisk model: Virtual SATA Hard DriveUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xf110ee87Device Boot Start End Sectors Size Id Type/dev/synoboot1 2048 100351 98304 48M 83 Linux/dev/synoboot2 100352 253951 153600 75M 83 Linux/dev/synoboot3 253952 262143 8192 4M 83 LinuxDisk /dev/sdc: 150 GiB, 161061273600 bytes, 314572800 sectorsDisk model: Virtual SATA Hard DriveUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x66e7e9b1Device Boot Start End Sectors Size Id Type/dev/sdc1 2048 4982527 4980480 2.4G fd Linux raid autodetect/dev/sdc2 4982528 9176831 4194304 2G fd Linux raid autodetect/dev/sdc3 9437184 209703455 200266272 95.5G f W95 Ext'd (LBA)/dev/sdc5 9453280 209494623 200041344 95.4G fd Linux raid autodetectDisk /dev/md0: 2.4 GiB, 2549940224 bytes, 4980352 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/zram0: 579 MiB, 607125504 bytes, 148224 sectorsUnits: sectors of 1 * 4096 = 4096 bytesSector size (logical/physical): 4096 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/md1: 2 GiB, 2147418112 bytes, 4194176 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/md2: 95.4 GiB, 102420119552 bytes, 200039296 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/vg1-syno_vg_reserved_area: 12 MiB, 12582912 bytes, 24576 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/vg1-volume_1: 95 GiB, 102005473280 bytes, 199229440 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/cachedev_0: 95 GiB, 102005473280 bytes, 199229440 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes 可看到 sdc已經(jīng)擴展到 150G了,

再使用parted /dev/sdc命令,可看到

parted /dev/sdc

GNU Parted 3.2

Using /dev/sdc

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

print

Model: VMware Virtual SATA Har (scsi)

Disk /dev/sdc: 161GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Disk Flags:




Number Start End Size Type File system Flags

1 1049kB 2551MB 2550MB primary raid

2 2551MB 4699MB 2147MB primary raid

3 4832MB 107GB 103GB extended lba

5 4840MB 107GB 102GB logical raid

但可看到 最后面還是102GB

(parted)

注意這里是針對 3,而不是5 ,針對5會出錯,針對3 是成功





4、將sdc3容量擴展到100%parted /dev/sdc resizepart 3 100%:

執(zhí)行后可能會提示“you may need to update /etc/fstab" 可以去更新這個,也可先不更新。

這時分區(qū)已經(jīng)擴容成功:




可看到硬盤是擴容了,但群暉里的存儲空間 還是100G(91.5G)

而存儲空間擴容這里也還是95G

5、通過lsof kill等命令關(guān)閉正在使用的 進程 及umount volume

直接umount volume1 不行,因為它正在被使用。要先把使用它的一些進程kill掉

群暉中沒有內(nèi)置lsof , fuser等命令,而有些命令也與標準Linux命令不同,如加了syno前綴。




6、要在群暉中安裝lsof,要通過以下步驟:

sudo -i #先以root管理員身份

wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh

chmod +x syno-i686-bootstrap_1.2-7_i686.xsh

sh syno-i686-bootstrap_1.2-7_i686.xsh

ipkg update #更新ipkg

ipkg install lsof #安裝lsof命令包

安裝完可使用lsof 了。

7、逐個kill進程 再umount /volume1 發(fā)現(xiàn)進程馬上就在使用volume1了,必須使用下面的連續(xù)命令

一次殺掉多個PID: kill -9 25718 25719 25811 25812一次排在后邊就行了

kill -9 25718 25719 25811 25812; umount /volume1 就可以了,連續(xù)執(zhí)行,不能分2次命令

8、查看md設(shè)備:# cat /proc/mdstat




可以看到總共3個md設(shè)備,1是主系統(tǒng),0是引導(dǎo),2是數(shù)據(jù)。估計是。但是2一定是數(shù)據(jù)。

md2是raid1,由sdc3分區(qū)組成。

現(xiàn)在讓md2中的sdc3離線,# mdadm /dev/md2 -f /dev/sdc3 (我在此步一直無法成功)

提示:mdadm: set /dev/sdc3 faulty in /dev/md2代表成功了。

這是群暉會說整列已降級運行。

從md2中移除sdc3分區(qū):mdadm /dev/md2 -r /dev/sdc3

提示:mdadm: hot removed /dev/sdc3 from /dev/md2




9、最后再 重新分區(qū)及加到Raid

fdisk /dev/sdc

按p打印當前分區(qū)信息,一定要記住現(xiàn)在的分區(qū)信息,后面要用:(我在第8步就卡住了,以下步驟內(nèi)容摘自網(wǎng)上網(wǎng)友 robin_lee 的文章內(nèi)容:原文地址,非我原創(chuàng))

Command (m for help): p

Disk /dev/sdc: 120 GiB, 128849018880 bytes, 251658240 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

Disklabel type: dos

Disk identifier: 0xe2700574




Device Boot Start End Sectors Size Id Type

/dev/sdc1 2048 4982527 4980480 2.4G fd Linux raid autodetect

/dev/sdc2 4982528 9176831 4194304 2G fd Linux raid autodetect

/dev/sdc3 9437184 66904063 57466880 27.4G fd Linux raid autodetect




輸入:d刪除分區(qū),默認刪除最后一個。按回車。再輸入w回車保存。

然后關(guān)閉群暉。將ESXi中的DSM虛擬機的磁盤改為150GB.

開機后,putty連接群暉: sudo -i




現(xiàn)在再運行: fdisk /dev/sdc

打印分區(qū),可以看到只有2個分區(qū)。

我們把最后一個分區(qū)添加上,輸入n回車,詢問分區(qū)類型,直接回車,默認主分區(qū)。

詢問起始扇區(qū):輸入9437184,就是原來第三分區(qū)的起始扇區(qū),默認不是這個,一定記得輸入。

回車后結(jié)束山區(qū)啥的都默認就可以了。

輸入w保存分區(qū)表。




3. 將這快盤的三個分區(qū)掛載到群暉的md0,md1,md2上去。

#mdadm /dev/md0 -a /dev/sdc1

#mdadm /dev/md1 -a /dev/sdc2

#mdadm /dev/md2 -a /dev/sdc3

掛載成功,每個語句都會提示:mdadm: added /dev/sdc3 這樣的。

10、最后去到群暉存儲管理員,會看到一個提示說,空間可以升級到150GB。

點擊管理-》擴充即可,然后會提示數(shù)據(jù)擴充中,這個時間會比較久。完成了容量就變150GB了。




我在做到第8步時,總是提示設(shè)備正在使用或忙 無法操作,分析原因是可能是因為要先停掉群暉所有服務(wù),由于dsm7.0 的命令有變化,早期dsm6.0的命令 syno_poweroff_task 已不再支持

我找到所有官網(wǎng)的文章,找到類似的命令:

/usr/syno/bin/synopkg onoffall stop

所有服務(wù)是停止了,但還是無法完成第8步。




有熟悉這個的網(wǎng)友請在評論區(qū)給些幫助或建議



關(guān)鍵詞:經(jīng)歷,成功,虛擬

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點擊下載Chrome瀏覽器
關(guān)閉