Menu

reiser4 ssd trim

2015-04-14
2015-05-20
1 2 > >> (Page 1 of 2)
  • Rosen Aleksandrov

    Hello i've gonna to use reiser4 for my OCZ Vertex 450 SSD. I read from mailing list how to use it.

                        6. How to test
    

    Apply the patch against reiser4-for-3.17.3:
    http://sourceforge.net/projects/reiser4/files/patches/3.17.3-reiser4-precise-discard-support.patch.gz

    Format a reiser4 partition with reiser4progs-1.0.9. Use mkfs option
    -d to "discard" the whole partition on your SSD drive at format time.

    We recommend to use compression for SSD drives (by default it is
    turned on).

    Mount a reiser4 partition with mount option "discard".
    Find a kernel message about discard support:
    reiser4: sdX: enable discard support (erase unit Y bytes,
    alignment Z bytes)

    We recommend to use Write-Anywhere (AKA Copy-On-Write) transaction
    model for SSD drives (mount option "txmod=wa").

    Also we recommend to use mount option "noatime" for SSD drives.

    I follow all steps but i wonder for that in dmesg no message about trim for mounted partition.

    dmesg
    [60848.320168] reiser4: sdc7: found disk format 4.0.0.
    [60848.352440] reiser4: sdc7: using Write-Anywhere Transaction Model.

    and mount
    /dev/sdc7 on /mnt/gentoo type reiser4 (rw,noatime,atom_max_size=0xf9c0a,atom_max_age=0x927c0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)

    there no discard anywhere..
    Is this normal ?

    root@Gentoo-KDE [ 8:37:33 ] [ 04/14/15 ] [ pts/10 ] ~ # uname -a
    Linux Gentoo-KDE 3.18.11-gentoo #1 SMP PREEMPT Mon Apr 6 09:14:44 EEST 2015 x86_64 AMD FX(tm)-8320 Eight-Core Processor AuthenticAMD GNU/Linux

    With patch for 3.18.6

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Nope. There should be something like this:

    reiser4: sdb1: enable discard support (erase unit 512 bytes, alignment 0 bytes)

    Make sure you do "mount -o discard", if no effect, please, send all you kernel logs..

     
  • Rosen Aleksandrov

    Привет снова!
    Я уверен что выполнил mount -o discard /dev/sdc7 /mnt/gentoo

    root@Gentoo-KDE [ 9:23:29 ] [ 04/14/15 ] [ pts/10 ] ~ # mount -o discard /dev/sdc7 /mnt/gentoo
    root@Gentoo-KDE [ 9:23:42 ] [ 04/14/15 ] [ pts/10 ] ~ #

    из mount
    /dev/sdc7 on /mnt/gentoo type reiser4 (rw,relatime,atom_max_size=0xf9c0a,atom_max_age=0x927c0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)

    https://gist.github.com/154dd3e1d174e7ef9124 вот и dmesg

     
  • Rosen Aleksandrov

    root@Gentoo-KDE [ 9:28:23 ] [ 04/14/15 ] [ pts/10 ] ~ # fstrim -v /mnt/gentoo
    fstrim: /mnt/gentoo: the discard operation is not supported

    Тоже когда вручную выполняю fstrim -v /mnt/gentoo такой результат.

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    А с другой фс поддержка discard работает на этом девайсе?

     
  • Rosen Aleksandrov

    Я не уверен. Я сейчас на ext4

    root@Gentoo-KDE [ 9:51:17 ] [ 04/14/15 ] [ pts/10 ] ~ # fstrim -av
    /: 0 B (0 bytes) trimmed

    Но похоже работает. Как можно потестит ?

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    патч этот точно наложили?
    3.17.3-reiser4-precise-discard-support.patch.gz

     
  • Rosen Aleksandrov

    Могу сказать что работает на btrfs за пример.

    1 root@Gentoo-KDE [ 9:55:16 ] [ 04/14/15 ] [ pts/10 ] ~ # mkfs.btrfs /dev/sdc7 -f
    Detected a SSD, turning off metadata duplication. Mkfs with -m dup if you want to force metadata duplication.
    btrfs-progs v3.19.1
    See http://btrfs.wiki.kernel.org for more information.

    Performing full device TRIM (39.24GiB) ...
    Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
    Turning ON incompat feature 'skinny-metadata': reduced-size metadata extent refs
    fs created label (null) on /dev/sdc7
    nodesize 16384 leafsize 16384 sectorsize 4096 size 39.24GiB

    [65733.725919] BTRFS: device fsid 6da34b94-0512-4bde-8136-cc76270969d1 devid 1 transid 3 /dev/sdc7
    [65759.386947] BTRFS info (device sdc7): turning on discard
    [65759.386950] BTRFS info (device sdc7): disk space caching is enabled
    [65759.386951] BTRFS: has skinny extents
    [65759.386952] BTRFS: flagging fs with big metadata feature
    [65759.388085] BTRFS: detected SSD devices, enabling SSD mode
    [65759.388232] BTRFS: creating UUID tree

    /dev/sdc7 on /mnt/gentoo type btrfs (rw,relatime,ssd,discard,noacl,space_cache)

    root@Gentoo-KDE [ 9:58:22 ] [ 04/14/15 ] [ pts/9 ] ~ # fstrim -v /mnt/gentoo
    /mnt/gentoo: 45,3 MiB (47497216 bytes) trimmed

     
  • Rosen Aleksandrov

    [ 167.658123] reiser4: sdc7: enable discard support (erase unit 512 bytes, alignment 0 bytes)
    [ 167.659757] reiser4: sdc7: found disk format 4.0.0.
    [ 167.692152] reiser4: sdc7: using Write-Anywhere Transaction Model.

    /dev/sdc7 on /mnt/gentoo type reiser4 (rw,noatime,atom_max_size=0xf9c0a,atom_max_age=0x927c0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)

    Как оно сейчас ? Работает или нет ?

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Ну, а что тогда удивляться. Инструкции - они для кого?

    Если нормально патчится и соборается, то с большой вероятностью пойдёт и для 3.18.
    Команда fstrim для reiser4
    а) не работает без этой серии патчей: http://www.spinics.net/lists/reiserfs-devel/msg04601.html
    б) не нужна, потому что у вас будет фича "precise discard" - автоматический сбор мусора.

    С ув.,
    Э.Ш.

     
  • Rosen Aleksandrov

    Ага команда fstrim не работает. Ну mount -o discard это безопасный параметр ? Я читал что не надо для других FS. Извиняюсь если я надоел просто еще новичок на SSD и не знаю на что верую. И также какой статус у reiser4 он стабильный или еще нет ?

    С Уважение Росен Александров.

     
  • Rosen Aleksandrov

    Перевел систему на Reiser4 раздел.. И располагаются что никакой trim.

    root@Gentoo-KDE [ 11:00:52 ] [ 04/14/15 ] [ pts/8 ] ~ # dmesg| grep reiser4
    [ 0.960662] reiser4: sdc7: found disk format 4.0.0.
    [ 1.002201] reiser4: sdc7: using Hybrid Transaction Model.

    /dev/sdc7 / reiser4 discard,txmod=wa,noatime 0 1

    даже параметры fstab не делает..

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Будут проблемы - обращайтесь..

     
  • Rosen Aleksandrov

    что можно сделать в этом случае ?
    вернутся на ext4 сейчас?

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Опции монтирования для корневого раздела передаются загрузчику операционной стстемы.

     
  • Rosen Aleksandrov

    я на grub-efi
    Reiser4 не сможет работать как / ?

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Всё должно работать. Погуглите, почитайте. Прошу прощения: у меня нет времени на такую поддержку.

     
  • Rosen Aleksandrov

    для reiser4 в гугле ничего. Все старое.
    Но большое спасибо!

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Вам не reiser4 нужно искать, а как передавать опции монтирования корневого раздела ядру при загрузке. Попробуйте через опцию rootflags=
    https://www.kernel.org/doc/Documentation/kernel-parameters.txt

     
  • Rosen Aleksandrov

    rootflags=discard noatim и есть noatime и discard думаю.

    /dev/sdc7 on / type reiser4 (rw,noatime,atom_max_size=0xf9bcd,atom_max_age=0x927c0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)

    root@Gentoo-KDE [ 15:56:37 ] [ 04/14/15 ] [ pts/7 ] ~ # dmesg | grep reiser4
    [ 0.962835] reiser4: sdc7: enable discard support (erase unit 512 bytes, alignment 0 bytes)
    [ 0.963799] reiser4: sdc7: found disk format 4.0.0.
    [ 1.005593] reiser4: sdc7: using Hybrid Transaction Model.
    [ 1.005598] VFS: Mounted root (reiser4 filesystem) readonly on device 8:39.

    Только если вставить и txmod=wa оно вылетает. Можно не знаю как ставить. Но думаю это не так важно как discard.

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-14

    Поздравляю с прогрессом!
    Уверен, что со временем научитесь передавать и txmod=wa.
    Я рекомендую иногда проверять ваш корневой раздел утилитой fsck.reiser4
    Для этого имейте возможность загружаться на запасной корневой раздел,
    или найдите Live CD с поддержкой reiser4.

    С ув.,
    Э.Ш.

     
  • Rosen Aleksandrov

    Не могу найти способ. Вобще с груб не знакомы.. Пожалуйста подскажи как сделать 3 параметры в rootflags ? Сейчас из них только один работает.

     
  • Rosen Aleksandrov

    Все было странно получал kernel panic с rootflags=discard,txmod=wa потом пробул и с rootfstype=reiser4 и не был паник. Думаю что получилось наконец.

    /dev/sdc7 on / type reiser4 (rw,noatime,atom_max_size=0xf9bcd,atom_max_age=0x927c0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)

    root@Gentoo-KDE [ 17:18:00 ] [ 04/14/15 ] [ pts/8 ] ~ # dmesg | grep reiser4
    [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.18.11-gentoo root=/dev/sdc7 rootflags=discard,txmod=wa rootfstype=reiser4 init=/usr/lib/systemd/systemd iommu=soft quiet vconsole.font=ter-k12n nomodeset usbhid.mousepoll=2
    [ 0.000000] Kernel command line: root=/dev/sdc4 init=/usr/lib/systemd/systemd iommu=soft quiet vconsole.font=ter-k12n nomodeset usbhid.mousepoll=2 BOOT_IMAGE=/boot/vmlinuz-3.18.11-gentoo root=/dev/sdc7 rootflags=discard,txmod=wa rootfstype=reiser4 init=/usr/lib/systemd/systemd iommu=soft quiet vconsole.font=ter-k12n nomodeset usbhid.mousepoll=2
    [ 0.970497] reiser4: sdc7: enable discard support (erase unit 512 bytes, alignment 0 bytes)
    [ 0.971548] reiser4: sdc7: found disk format 4.0.0.
    [ 1.013882] reiser4: sdc7: using Write-Anywhere Transaction Model.
    [ 1.013888] VFS: Mounted root (reiser4 filesystem) readonly on device 8:39.
    root@Gentoo-KDE [ 17:18:12 ] [ 04/14/15 ] [ pts/8 ] ~ #
    Если все в порядки спасибо за поддержки.

     
  • Edward Shishkin

    Edward Shishkin - 2015-04-16

    Ну что там, всё работает? Live CD нашли?

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.