Page 9 of 12 FirstFirst ... 7891011 ... LastLast
Results 121 to 135 of 172

Thread: Вопрос про Swap (своп)

  1. #121
    Join Date
    Jun 2008
    Location
    Russia, Perm
    Posts
    476
    Это нормально. У меня :
    Code:
    [/usr/local/root]$ free
                 total       used       free     shared    buffers     cached
    Mem:         30324      27788       2536          0       3900      13768
    -/+ buffers/cache:      10120      20204
    Swap:       265064       7056     258008

  2. #122
    Присоединяюсь к предыдушему вопросу, тоже выскочила строка:
    -/+ buffers/cache:
    Это нормально?

  3. #123
    Join Date
    Jun 2008
    Location
    Russia, Perm
    Posts
    476

  4. #124

    Question Как узнать работает ли у меня swap?

    Здравствуйте!

    Вопрос:
    Во второй USB я воткнул вторую 256mb флешку.
    На ней была какая-то файловая система (FAT16 или FAT32) и какие-то файлы.

    fdisk -l до операции:
    Code:
    [admin@WL-001BFC452FBD root]$ fdisk -l
    
    Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2112 MB, 2112352256 bytes
    127 heads, 32 sectors/track, 1015 cylinders
    Units = cylinders of 4064 * 512 = 2080768 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host0/bus0/target0/lun0/part1   *           1        1016     2062812    6  FAT16
    Partition 1 has different physical/logical endings:
         phys=(1023, 126, 32) logical=(1015, 21, 24)
    
    Disk /dev/scsi/host1/bus0/target0/lun0/disc: 262 MB, 262144000 bytes
    9 heads, 56 sectors/track, 1015 cylinders
    Units = cylinders of 504 * 512 = 258048 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host1/bus0/target0/lun0/part1   ?     1543921     3808821   570754815+  72  Unknown
    Partition 1 has different physical/logical beginnings (non-Linux?):
         phys=(357, 116, 40) logical=(1543920, 4, 5)
    Partition 1 has different physical/logical endings:
         phys=(357, 32, 45) logical=(3808820, 4, 35)
    Partition 1 does not end on cylinder boundary.
    /dev/scsi/host1/bus0/target0/lun0/part2   ?      334702     4176028   968014120   65  Unknown
    Partition 2 has different physical/logical beginnings (non-Linux?):
         phys=(288, 115, 43) logical=(334701, 3, 51)
    Partition 2 has different physical/logical endings:
         phys=(367, 114, 50) logical=(4176027, 2, 42)
    Partition 2 does not end on cylinder boundary.
    /dev/scsi/host1/bus0/target0/lun0/part3   ?     3710083     7551409   968014096   79  Unknown
    Partition 3 has different physical/logical beginnings (non-Linux?):
         phys=(366, 32, 33) logical=(3710082, 2, 26)
    Partition 3 has different physical/logical endings:
         phys=(357, 32, 43) logical=(7551408, 0, 25)
    Partition 3 does not end on cylinder boundary.
    /dev/scsi/host1/bus0/target0/lun0/part4   ?     5725558     5725668       27749+   d  Unknown
    Partition 4 has different physical/logical beginnings (non-Linux?):
         phys=(372, 97, 50) logical=(5725557, 7, 33)
    Partition 4 has different physical/logical endings:
         phys=(0, 10, 0) logical=(5725667, 8, 35)
    Partition 4 does not end on cylinder boundary.
    
    Partition table entries are not in disk order
    [admin@WL-001BFC452FBD root]$

    Выполнил команды -

    Code:
    [admin@WL-001BFC452FBD root]$ mkswap /dev/discs/disc1/disc
    Setting up swapspace version 1, size = 262139904 bytes
    [admin@WL-001BFC452FBD root]$ swapon /dev/discs/disc1/disc
    [admin@WL-001BFC452FBD root]$
    Ошибок не выдал.
    Перед этим flash-ку не форматировал.
    Как понять, что у меня заработал (или не заработал!) swap раздел?


    fdisk -l после операции:

    Code:
    [admin@WL-001BFC452FBD root]$ fdisk -l
    
    Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2112 MB, 2112352256 bytes
    127 heads, 32 sectors/track, 1015 cylinders
    Units = cylinders of 4064 * 512 = 2080768 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host0/bus0/target0/lun0/part1   *           1        1016     2062812    6  FAT16
    Partition 1 has different physical/logical endings:
         phys=(1023, 126, 32) logical=(1015, 21, 24)
    
    Disk /dev/scsi/host1/bus0/target0/lun0/disc: 262 MB, 262144000 bytes
    9 heads, 56 sectors/track, 1015 cylinders
    Units = cylinders of 504 * 512 = 258048 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host1/bus0/target0/lun0/part1   ?     1543921     3808821   570754815+  72  Unknown
    Partition 1 has different physical/logical beginnings (non-Linux?):
         phys=(357, 116, 40) logical=(1543920, 4, 5)
    Partition 1 has different physical/logical endings:
         phys=(357, 32, 45) logical=(3808820, 4, 35)
    Partition 1 does not end on cylinder boundary.
    /dev/scsi/host1/bus0/target0/lun0/part2   ?      334702     4176028   968014120   65  Unknown
    Partition 2 has different physical/logical beginnings (non-Linux?):
         phys=(288, 115, 43) logical=(334701, 3, 51)
    Partition 2 has different physical/logical endings:
         phys=(367, 114, 50) logical=(4176027, 2, 42)
    Partition 2 does not end on cylinder boundary.
    /dev/scsi/host1/bus0/target0/lun0/part3   ?     3710083     7551409   968014096   79  Unknown
    Partition 3 has different physical/logical beginnings (non-Linux?):
         phys=(366, 32, 33) logical=(3710082, 2, 26)
    Partition 3 has different physical/logical endings:
         phys=(357, 32, 43) logical=(7551408, 0, 25)
    Partition 3 does not end on cylinder boundary.
    /dev/scsi/host1/bus0/target0/lun0/part4   ?     5725558     5725668       27749+   d  Unknown
    Partition 4 has different physical/logical beginnings (non-Linux?):
         phys=(372, 97, 50) logical=(5725557, 7, 33)
    Partition 4 has different physical/logical endings:
         phys=(0, 10, 0) logical=(5725667, 8, 35)
    Partition 4 does not end on cylinder boundary.
    
    Partition table entries are not in disk order
    [admin@WL-001BFC452FBD root]$
    У меня заработал swap??
    Всё ли корректно создалось, версяи, там или что-то еще...?

  5. #125
    [root@Router root]$ free
    total used free shared buffers cached
    Mem: 30164 29512 652 0 492 18268
    -/+ buffers/cache: 10752 19412
    Swap: 522104 10444 511660

    Выполнить то, что жирным курсивом выделено.

  6. #126
    Выполнил:

    Code:
    [admin@WL-001BFC452FBD root]$ free
                  total         used         free       shared      buffers
      Mem:        30164        15240        14924            0         1688
     Swap:       255992            0       255992
    Total:       286156        15240       270916
    [admin@WL-001BFC452FBD root]$
    Это значит что swap работает?

  7. #127
    Quote Originally Posted by Dimedrol View Post
    Выполнил:

    Code:
    [admin@WL-001BFC452FBD root]$ free
                  total         used         free       shared      buffers
      Mem:        30164        15240        14924            0         1688
     Swap:       255992            0       255992
    Total:       286156        15240       270916
    [admin@WL-001BFC452FBD root]$
    Это значит что swap работает?
    used
    0
    Это значит, что он не работает.

  8. #128
    Ну, очевидно, что просто хватает оперативки.
    Т.е. нужно загрузить чем-то систему, чтобы понять БУДЕТ ли использоваться swap или нет.
    Правильно?

  9. #129
    Ну, очевидно, что просто хватает оперативки.
    Ну, для меня, например, это не так очевидно. Насколько мне помнится, менеджер памяти в линукс задействует своп в любом случае.

    Т.е. нужно загрузить чем-то систему, чтобы понять БУДЕТ ли использоваться swap или нет.
    Правильно?
    Попробуйте, если охото поэкспериментировать.
    Мне лично интересно, что из этого выйдет.
    Только вот не понятно, какая цель всего этого?
    Поэкспериментировать. Что получится, если включить своп на "левой" (для свопа) файловой системе. Могу предположить, что когда ядро попытается туда что-то записать ничего хорошего из этой затеи не выйдет, ну или как минимум упадет производительность.
    Получить нормальный своп. Тогда на форуме есть куча мануалов, которые сводятся к простым вещам.
    1. Создать раздел (файл) под своп.
    2. Форматнуть раздел (и не во что-то а именно в swap).
    3. Прописать раздел в fstab
    4. В pre-mount добавить swapon -a

  10. #130
    Join Date
    Feb 2008
    Location
    Moscow, Tver
    Posts
    3,962
    swap есть, но незадействован.
    Используется отнюдь не всегда. Если системе хватает памяти на все, то в своп ничего не падает.
    Если бы свопа не было, то во всех трех столбцах были бы нули.

  11. #131
    Join Date
    Apr 2008
    Location
    Географический центр Европы
    Posts
    263
    Quote Originally Posted by Dimedrol View Post
    У меня заработал swap??
    Всё ли корректно создалось, версяи, там или что-то еще...?
    Не нравиться мне собщения fdisk -l по поводу вашей флешки под своп.
    Попробуйте перед
    mkswap
    сделать
    Code:
    fdisk /dev/scsi/host1/bus0/target0/lun0/disc
    "o" "w"
    fdisk /dev/scsi/host1/bus0/target0/lun0/disc
    "n" "p" "1" Enter Enter
    "t" "1" "82"
    "w"
    для создания правильной таблицы разделов и единственного раздела по своп. А уже потом
    mkswap /dev/scsi/host1/bus0/target0/lun0/part1
    С уважением, Евгений.
    [ASUS WL500g Premium (v1) 1.9.2.7-10] + [512MB USBFlash] + [8GB USBFlash] + [USB BlueTooth DBT-122] + [USB->RS232]

  12. #132
    Евгений, сделал всё, как Вы написали.
    В конечном итоге имеем:

    Code:
    [admin@WL-001BFC452FBD tmp]$ fdisk -l
    
    Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2112 MB, 2112352256 bytes
    127 heads, 32 sectors/track, 1015 cylinders
    Units = cylinders of 4064 * 512 = 2080768 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host0/bus0/target0/lun0/part1   *           1        1016     2062812    6  FAT16
    Partition 1 has different physical/logical endings:
         phys=(1023, 126, 32) logical=(1015, 21, 24)
    
    Disk /dev/scsi/host1/bus0/target0/lun0/disc: 262 MB, 262144000 bytes
    9 heads, 56 sectors/track, 1015 cylinders
    Units = cylinders of 504 * 512 = 258048 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host1/bus0/target0/lun0/part1               1        1015      255752   82  Linux swap
    [admin@WL-001BFC452FBD tmp]$
    [admin@WL-001BFC452FBD tmp]$
    [admin@WL-001BFC452FBD tmp]$
    [admin@WL-001BFC452FBD tmp]$ free
                  total         used         free       shared      buffers
      Mem:        30164        17868        12296            0         1840
     Swap:       255744            0       255744
    Total:       285908        17868       268040
    [admin@WL-001BFC452FBD tmp]$
    Это уже хорошо?

  13. #133
    Join Date
    Apr 2008
    Location
    Географический центр Европы
    Posts
    263
    Quote Originally Posted by Dimedrol View Post
    Евгений, сделал всё, как Вы написали.
    В конечном итоге имеем:
    Code:
    [admin@WL-001BFC452FBD tmp]$ fdisk -l
    [...]
    Disk /dev/scsi/host1/bus0/target0/lun0/disc: 262 MB, 262144000 bytes
    9 heads, 56 sectors/track, 1015 cylinders
    Units = cylinders of 504 * 512 = 258048 bytes
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host1/bus0/target0/lun0/part1               1        1015      255752   82  Linux swap
    
    [admin@WL-001BFC452FBD tmp]$ free
                  total         used         free       shared      buffers
      Mem:        30164        17868        12296            0         1840
     Swap:       255744            0       255744
    Total:       285908        17868       268040
    Это уже хорошо?
    Да. Так гораздо более цивилизовано.
    С уважением, Евгений.
    [ASUS WL500g Premium (v1) 1.9.2.7-10] + [512MB USBFlash] + [8GB USBFlash] + [USB BlueTooth DBT-122] + [USB->RS232]

  14. #134

    Exclamation Swap раздел на флешке - SCSI Error

    Есть usb-флеш на 2Гб. 512 Мб выделено под раздел linux-swap, остальное под /opt. Разделы примаунчены через fstab. Все отлично работает пока не запускаю торрент. Через некоторый промежуток времени (пару минут - пару часов) в логе появляются такие ошибки:

    Code:
    Apr 15 02:20:09 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 48 bf 00 00 40 00
    Apr 15 02:20:09 kernel: Info fld=0x0, Current sd08:01: sns = f0  3
    Apr 15 02:20:09 kernel: ASC=11 ASCQ= 0
    Apr 15 02:20:09 kernel: Raw sense data:0xf0 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
    Apr 15 02:20:09 kernel:  I/O error: dev 08:01, sector 18560
    Apr 15 02:20:09 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 48 c7 00 00 38 00
    Apr 15 02:20:09 kernel: Info fld=0x0, Current sd08:01: sns = f0  3
    Apr 15 02:20:09 kernel: ASC=11 ASCQ= 0
    Apr 15 02:20:09 kernel: Raw sense data:0xf0 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
    Apr 15 02:20:09 kernel:  I/O error: dev 08:01, sector 18568
    Apr 15 02:20:09 kernel: scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 48 cf 00 00 30 00
    Apr 15 02:20:09 kernel: Info fld=0x0, Current sd08:01: sns = f0  3
    Apr 15 02:20:09 kernel: ASC=11 ASCQ= 0
    Apr 15 02:20:09 kernel: Raw sense data:0xf0 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x00 0x00
    Apr 15 02:20:09 kernel:  I/O error: dev 08:01, sector 18576
    После чего, опять же, через некоторое время 100% вылетает rTorrent и иногда lighttpd.

    Флешка не битая, проверенная. Тот же e2fsck ошибок не находит.

    Как побороть эту проблему? Сил больше нет проверять хеш недокаченных торрентов после рестартов.

    P.S.
    Девайс - WL500g V2 Premium
    Сами торренты хранятся на usb-hdd на порту scsi1. scsi0 - это usb-flash. id 0, lun 0 - это swap-раздел

    fdisk -l
    Code:
    Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2051 MB, 2051013632 bytes
    33 heads, 63 sectors/track, 1926 cylinders
    Units = cylinders of 2079 * 512 = 1064448 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host0/bus0/target0/lun0/part1               1         482      501007+  82  Linux swap
    /dev/scsi/host0/bus0/target0/lun0/part2             483        1926     1501038   83  Linux
    
    Disk /dev/scsi/host1/bus0/target0/lun0/disc: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
                                     Device Boot    Start       End    Blocks   Id  System
    /dev/scsi/host1/bus0/target0/lun0/part1               1       60801   488384032   83  Linux
    cat /etc/fstab
    Code:
    #device                 Mountpoint              FStype  Options         Dump    Pass
    /dev/discs/disc0/part1  none                    swap    sw              0       0
    /dev/discs/disc0/part2  /opt                    ext3    rw,noatime      1       1
    /dev/discs/disc1/part1  /tmp/mnt/hdd            ext3    rw,noatime      1       1
    free (после ошибок, во время работы торрента)
    Code:
                 total       used       free     shared    buffers     cached
    Mem:         30156      29604        552          0        760      19524
    -/+ buffers/cache:       9320      20836
    Swap:       500996      14840     486156
    Прошивка Pre-alpha 10.7, но те же проблемы были и на последней stable версии.

    Что еще нужно для диагностики?
    Last edited by DarkSide; 15-04-2009 at 01:28. Reason: добавил free

  15. #135
    Join Date
    Feb 2008
    Location
    Moscow, Tver
    Posts
    3,962
    Нужно своп на HDD перенести. Флешка "устала" уже.

Page 9 of 12 FirstFirst ... 7891011 ... LastLast

Similar Threads

  1. про Usd и hdd подключенным вместе?
    By yuper in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 1
    Last Post: 29-01-2008, 13:51
  2. Вопрос про роутинг
    By ynbIPb in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 1
    Last Post: 15-01-2008, 01:03
  3. Вопрос про ftp-клиент
    By Nemo_cpt in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 3
    Last Post: 28-09-2007, 21:31
  4. Swap partition causing USB instability?
    By Buld in forum WL-500g Q&A
    Replies: 4
    Last Post: 16-11-2006, 17:52

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •