Pomoc Przeniesienie pliku SWAP na dysk SSD

Kamil004

Nowy użytkownik
Noobie
6 Kwiecień 2019
5
0
1
37
QNAP
null
Ethernet
null
Witam szanowne grono, ostatnio postanowilem przeniesc system na dysk SSD w celu przyspieszenia wspolpracy z NASikiem.
Wszystko bylo dobrze do ostatniej aktualizacji oprogramowania, lub poprostu byl to przypadek i wystarczyl ktorys restart z kolei.

Mianowicie, do tej pory wszystko bylo po mojej mysli, aplikacje oraz wszelakie dane byly odczytywane z dysku SSD jak i plik wymiany (SWAP)
Czyli obrazujac to do ponizszego screena HDD nie bylo uzywane na plik wymiany, natomiast wolumen SSD tak.
Ponizszy screen przedstawia juz sytuacje gdzie plik wymiany jest na HDD, a dysku SSD za chiny ludowe nie chce uzyc.
Jest to o tyle uciazliwe ze znowu strasznie muli i grzebie tym dyskiem jak opetany.

adsc.cloud_8f49d4_Screen_Shot_2020_11_25_22_37_39.89.png


Konfiguracje dyskow mam nastepujaca:
adsc.cloud_8f49d4_Screen_Shot_2020_11_25_22_37_28.73.png


Znalazlem poradnik odnosnie wylaczenia HDD z udzialow pliku wymiany:
Udzielamy pomocy - Dyski chroboczą bez przerwy

Jednak polecenie:
Kod:
swapoff /dev/md256
Wylacza wolumin SSD z zasobow systemowych jako dysk do pliku wymiany, wiec chyba nie tedy droga.

Komenda:
Kod:
swapoff=bash /dev/md322
Zwraca mi komunikat: -sh: /dev/md322: Permission denied

Komendy
Kod:
swapoff
swapoff /share/CACHEDEV1_DATA/.swap/qnap_swap
Wydaja sie dzialac, niemniej plik wymiany na HDD dalej jest obecny i uzywa tego dysku

Dodam ze jesli chodzi o grzebanie w takich sprawach jestem zielony i bede wdzieczny za pomoc, jesli bedzie potrzeba moge doslac wiecej informacji ktore beda istotne dla wyzej wymienionego problemu.

Wersja oprogramowania Firmware: 4.5.1 Build 1495
Model serwera: QNAP TS-228A
 
Jak już chcesz grzebać to na przez SSH zrób:
Kod:
cat /proc/swaps
dostaniesz listę partycji i plików swap.
Potem:
Kod:
fdisk -l
dostaniesz listę wszystkich partycji. Zlokalizuj swap na HDD.
A potem go wyłącz (zastępując XXX nazwą swojej partycji):
Kod:
swapoff /dev/mdXXX

Ważne:
  • Zmiany będą obowiązywać do restartu urządzenia.
  • Jak napisano wyżej: swap na SSD zużywa SSD (inaczej: skraca jego żywotność). Do Twojej decyzji. Wg mnie szybciej zmienisz QNAP/dyski niż ten SSD padnie z powodu swapa.
 
Tak tak, przez SSH sie lacze.

No wiec tak to wyglada u mnie:

[~] # cat /proc/swaps
Filename Type Size Used Priority
/dev/md256 partition 530108 502944 -1
/dev/md322 partition 7235132 387140 -2
/share/CACHEDEV1_DATA/.swap/qnap_swap file 16777212 0 -3


[~] # fdisk -l

Disk /dev/sda: 3000.5 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 267350 2147483647+ ee EFI GPT

Disk /dev/mmcblk0: 3959 MB, 3959422976 bytes
8 heads, 32 sectors/track, 30208 cylinders
Units = cylinders of 256 * 512 = 131072 bytes

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 17 2160 83 Linux
/dev/mmcblk0p2 * 18 1910 242304 83 Linux
/dev/mmcblk0p3 1911 3803 242304 83 Linux
/dev/mmcblk0p4 3804 3936 17024 5 Extended
/dev/mmcblk0p5 3804 3868 8304 83 Linux
/dev/mmcblk0p6 3869 3936 8688 83 Linux

Disk /dev/mmcblk0boot1: 2 MB, 2097152 bytes
4 heads, 16 sectors/track, 64 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/mmcblk0boot1 doesn't contain a valid partition table

Disk /dev/mmcblk0boot0: 2 MB, 2097152 bytes
4 heads, 16 sectors/track, 64 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/mmcblk0boot0 doesn't contain a valid partition table

Disk /dev/sdb: 240.0 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 29186 234431063+ ee EFI GPT

Disk /dev/md9: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md9 doesn't contain a valid partition table

Disk /dev/md13: 469 MB, 469893120 bytes
2 heads, 4 sectors/track, 114720 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md13 doesn't contain a valid partition table

Disk /dev/md321: 8482 MB, 8482521088 bytes
2 heads, 4 sectors/track, 2070928 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md321 doesn't contain a valid partition table

Disk /dev/md256: 542 MB, 542834688 bytes
2 heads, 4 sectors/track, 132528 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md256 doesn't contain a valid partition table

Disk /dev/md322: 7408 MB, 7408779264 bytes
2 heads, 4 sectors/track, 1808784 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md322 doesn't contain a valid partition table

Disk /dev/md1: 229.8 GB, 229863522304 bytes
2 heads, 4 sectors/track, 56119024 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 2990.3 GB, 2990399094784 bytes
2 heads, 4 sectors/track, 730077904 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/dm-1: 68.7 GB, 68719476736 bytes
255 heads, 63 sectors/track, 8354 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 4 MB, 4194304 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-2 doesn't contain a valid partition table

Disk /dev/dm-3: 4 MB, 4194304 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-3 doesn't contain a valid partition table

Disk /dev/dm-4: 158.8 GB, 158842486784 bytes
255 heads, 63 sectors/track, 19311 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-4 doesn't contain a valid partition table

Disk /dev/dm-5: 158.8 GB, 158842486784 bytes
255 heads, 63 sectors/track, 19311 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-5 doesn't contain a valid partition table

Disk /dev/dm-6: 157.2 GB, 157257039872 bytes
255 heads, 63 sectors/track, 19118 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-6 doesn't contain a valid partition table

Disk /dev/dm-7: 157.2 GB, 157257039872 bytes
255 heads, 63 sectors/track, 19118 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-7 doesn't contain a valid partition table

Disk /dev/dm-8: 156.0 GB, 156095217664 bytes
255 heads, 63 sectors/track, 18977 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-8 doesn't contain a valid partition table

Disk /dev/dm-10: 68.7 GB, 68719476736 bytes
255 heads, 63 sectors/track, 8354 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-10 doesn't contain a valid partition table

Disk /dev/dm-11: 4 MB, 4194304 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-11 doesn't contain a valid partition table

Disk /dev/dm-12: 4 MB, 4194304 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-12 doesn't contain a valid partition table

Disk /dev/dm-13: 2891.7 GB, 2891775475712 bytes
255 heads, 63 sectors/track, 351571 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-13 doesn't contain a valid partition table

Disk /dev/dm-14: 2891.7 GB, 2891775475712 bytes
255 heads, 63 sectors/track, 351571 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-14 doesn't contain a valid partition table

Disk /dev/dm-15: 2890.0 GB, 2890097754112 bytes
255 heads, 63 sectors/track, 351367 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-15 doesn't contain a valid partition table

Disk /dev/dm-16: 2890.0 GB, 2890097754112 bytes
255 heads, 63 sectors/track, 351367 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-16 doesn't contain a valid partition table

Disk /dev/dm-17: 2888.9 GB, 2888902377472 bytes
255 heads, 63 sectors/track, 351222 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-17 doesn't contain a valid partition table

Disk /dev/dm-0: 156.0 GB, 156095217664 bytes
255 heads, 63 sectors/track, 18977 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-9: 2888.9 GB, 2888902377472 bytes
255 heads, 63 sectors/track, 351222 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-9 doesn't contain a valid partition table
[~] #

Szczerze mowiac to za wiele mi to nie mowi ;)
Natomiast tak jak wyzej pisalem polecnie
Kod:
swapoff /dev/md256
Wylacza mi dysk SSD do uzytku przez SWAP

Natomiast polecenie:
Kod:
swapoff /dev/md322
Spowodowalo czesciowe zrzucenie SWAPa z HDD do SSD, dziwnie sie to zachowuje musze przyznac ;)
Pytanie czy da sie teraz jakos calkiem wylaczyc HDD

Jesli chodzi o zmiany do restartu to wiem o tym, pokombinuje z plikiem autostartu.
A co do zywotnosci SSD, jak to sie mowi who cares ;) to ma dzialac i tylko tyle oczekuje.


adsc.cloud_8f49d4_Screen_Shot_2020_11_26_17_13_02.28.png
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. 228a firmware
  2. Dyski chrobocza bez przerwy
  3. przeniesienie dysków