Задать вопрос
  • Как расширить раздел var в Linux (LVM encryption)?

    @ProForensic Автор вопроса
    Не совсем понятно, делать ли это все из live-окружения или непосредственно в системе? И как указать, что именно из Home нужно взять свободное место?

    lvdisplay выдает вот это:

    root@Ivanov:/home/serg# /sbin/lvdisplay
    File descriptor 46 (anon_inode:inotify) leaked on lvdisplay invocation. Parent PID 5398: bash
    File descriptor 50 (/memfd:pulseaudio (deleted)) leaked on lvdisplay invocation. Parent PID 5398: bash
    --- Logical volume ---
    LV Path /dev/Ivanov-vg/root
    LV Name root
    VG Name Ivanov-vg
    LV UUID ba0JPg-de43-z1tN-UdIg-X2vU-kk69-tI60Pf
    LV Write Access read/write
    LV Creation host, time Ivanov, 2023-06-15 23:06:08 +0300
    LV Status available
    # open 1
    LV Size 23.28 GiB
    Current LE 5960
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:1

    --- Logical volume ---
    LV Path /dev/Ivanov-vg/var
    LV Name var
    VG Name Ivanov-vg
    LV UUID pJ24A6-ex2d-N1aT-cY9E-2VAF-O6gq-ppu8n6
    LV Write Access read/write
    LV Creation host, time Ivanov, 2023-06-15 23:06:08 +0300
    LV Status available
    # open 1
    LV Size 9.31 GiB
    Current LE 2384
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:2

    --- Logical volume ---
    LV Path /dev/Ivanov-vg/swap_1
    LV Name swap_1
    VG Name Ivanov-vg
    LV UUID lbn5su-bEmD-d3X3-c5R5-1N3p-e9hV-HeexGR
    LV Write Access read/write
    LV Creation host, time Ivanov, 2023-06-15 23:06:08 +0300
    LV Status available
    # open 2
    LV Size 976.00 MiB
    Current LE 244
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:3

    --- Logical volume ---
    LV Path /dev/Ivanov-vg/tmp
    LV Name tmp
    VG Name Ivanov-vg
    LV UUID ubwQvJ-4rC9-JtDP-7RvR-0km0-H9QF-Sc5q92
    LV Write Access read/write
    LV Creation host, time Ivanov, 2023-06-15 23:06:09 +0300
    LV Status available
    # open 1
    LV Size <1.86 GiB
    Current LE 476
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:4

    --- Logical volume ---
    LV Path /dev/Ivanov-vg/home
    LV Name home
    VG Name Ivanov-vg
    LV UUID WWj7so-dntc-S8Hc-LSAM-KueQ-1mFF-LR5SbM
    LV Write Access read/write
    LV Creation host, time Ivanov, 2023-06-15 23:06:09 +0300
    LV Status available
    # open 1
    LV Size 3.60 TiB
    Current LE 944543
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:5
    Написано
  • Как восстановить пропавшие файлы на зашифрованном zfs датасете?

    @ProForensic Автор вопроса
    elbrus56, mayton2019, также я думаю, что файлы там все-таки есть, т.к. размер указан 1 ТБ, а не пустой:
    sudo zfs list
    NAME USED AVAIL REFER MOUNTPOINT
    pool1 1.04T 4.29T 104K /mnt/data
    pool1/dset1 2.31G 4.29T 2.31G /mnt/data/dset1
    pool1/encdset1 1.04T 4.29T 1.04T /mnt/data/encdset1
  • Как восстановить пропавшие файлы на зашифрованном zfs датасете?

    @ProForensic Автор вопроса
    elbrus56, root@debian:~# zfs get all
    NAME PROPERTY VALUE SOURCE
    pool1 type filesystem -
    pool1 creation Sat Apr 1 12:55 2023 -
    pool1 used 1.04T -
    pool1 available 4.29T -
    pool1 referenced 104K -
    pool1 compressratio 1.01x -
    pool1 mounted yes -
    pool1 quota none default
    pool1 reservation none default
    pool1 recordsize 128K default
    pool1 mountpoint /mnt/data local
    pool1 sharenfs off default
    pool1 checksum on default
    pool1 compression lz4 local
    pool1 atime on default
    pool1 devices on default
    pool1 exec on default
    pool1 setuid on default
    pool1 readonly off default
    pool1 zoned off default
    pool1 snapdir hidden default
    pool1 aclmode discard default
    pool1 aclinherit restricted default
    pool1 createtxg 1 -
    pool1 canmount on default
    pool1 xattr sa local
    pool1 copies 1 default
    pool1 version 5 -
    pool1 utf8only off -
    pool1 normalization none -
    pool1 casesensitivity sensitive -
    pool1 vscan off default
    pool1 nbmand off default
    pool1 sharesmb off default
    pool1 refquota none default
    pool1 refreservation none default
    pool1 guid 8951178990091246272 -
    pool1 primarycache all default
    pool1 secondarycache all default
    pool1 usedbysnapshots 0B -
    pool1 usedbydataset 104K -
    pool1 usedbychildren 1.04T -
    pool1 usedbyrefreservation 0B -
    pool1 logbias latency default
    pool1 objsetid 54 -
    pool1 dedup off default
    pool1 mlslabel none default
    pool1 sync standard default
    pool1 dnodesize legacy default
    pool1 refcompressratio 1.00x -
    pool1 written 104K -
    pool1 logicalused 1.06T -
    pool1 logicalreferenced 46K -
    pool1 volmode default default
    pool1 filesystem_limit none default
    pool1 snapshot_limit none default
    pool1 filesystem_count none default
    pool1 snapshot_count none default
    pool1 snapdev hidden default
    pool1 acltype off default
    pool1 context none default
    pool1 fscontext none default
    pool1 defcontext none default
    pool1 rootcontext none default
    pool1 relatime on local
    pool1 redundant_metadata all default
    pool1 overlay on default
    pool1 encryption off default
    pool1 keylocation none default
    pool1 keyformat none default
    pool1 pbkdf2iters 0 default
    pool1 special_small_blocks 0 default
    pool1/dset1 type filesystem -
    pool1/dset1 creation Sat Apr 1 12:56 2023 -
    pool1/dset1 used 2.31G -
    pool1/dset1 available 4.29T -
    pool1/dset1 referenced 2.31G -
    pool1/dset1 compressratio 1.00x -
    pool1/dset1 mounted yes -
    pool1/dset1 quota none default
    pool1/dset1 reservation none default
    pool1/dset1 recordsize 128K default
    pool1/dset1 mountpoint /mnt/data/dset1 inherited from pool1
    pool1/dset1 sharenfs off default
    pool1/dset1 checksum on default
    pool1/dset1 compression lz4 inherited from pool1
    pool1/dset1 atime on default
    pool1/dset1 devices on default
    pool1/dset1 exec on default
    pool1/dset1 setuid on default
    pool1/dset1 readonly off default
    pool1/dset1 zoned off default
    pool1/dset1 snapdir hidden default
    pool1/dset1 aclmode discard default
    pool1/dset1 aclinherit restricted default
    pool1/dset1 createtxg 28 -
    pool1/dset1 canmount on default
    pool1/dset1 xattr sa inherited from pool1
    pool1/dset1 copies 1 default
    pool1/dset1 version 5 -
    pool1/dset1 utf8only off -
    pool1/dset1 normalization none -
    pool1/dset1 casesensitivity sensitive -
    pool1/dset1 vscan off default
    pool1/dset1 nbmand off default
    pool1/dset1 sharesmb on local
    pool1/dset1 refquota none default
    pool1/dset1 refreservation none default
    pool1/dset1 guid 9953029504498238387 -
    pool1/dset1 primarycache all default
    pool1/dset1 secondarycache all default
    pool1/dset1 usedbysnapshots 0B -
    pool1/dset1 usedbydataset 2.31G -
    pool1/dset1 usedbychildren 0B -
    pool1/dset1 usedbyrefreservation 0B -
    pool1/dset1 logbias latency default
    pool1/dset1 objsetid 772 -
    pool1/dset1 dedup off default
    pool1/dset1 mlslabel none default
    pool1/dset1 sync standard default
    pool1/dset1 dnodesize legacy default
    pool1/dset1 refcompressratio 1.00x -
    pool1/dset1 written 2.31G -
    pool1/dset1 logicalused 2.32G -
    pool1/dset1 logicalreferenced 2.32G -
    pool1/dset1 volmode default default
    pool1/dset1 filesystem_limit none default
    pool1/dset1 snapshot_limit none default
    pool1/dset1 filesystem_count none default
    pool1/dset1 snapshot_count none default
    pool1/dset1 snapdev hidden default
    pool1/dset1 acltype off default
    pool1/dset1 context none default
    pool1/dset1 fscontext none default
    pool1/dset1 defcontext none default
    pool1/dset1 rootcontext none default
    pool1/dset1 relatime on inherited from pool1
    pool1/dset1 redundant_metadata all default
    pool1/dset1 overlay on default
    pool1/dset1 encryption off default
    pool1/dset1 keylocation none default
    pool1/dset1 keyformat none default
    pool1/dset1 pbkdf2iters 0 default
    pool1/dset1 special_small_blocks 0 default
    pool1/encdset1 type filesystem -
    pool1/encdset1 creation Sat Apr 1 16:55 2023 -
    pool1/encdset1 used 1.04T -
    pool1/encdset1 available 4.29T -
    pool1/encdset1 referenced 1.04T -
    pool1/encdset1 compressratio 1.01x -
    pool1/encdset1 mounted no -
    pool1/encdset1 quota none default
    pool1/encdset1 reservation none default
    pool1/encdset1 recordsize 128K default
    pool1/encdset1 mountpoint /mnt/data/encdset1 inherited from pool1
    pool1/encdset1 sharenfs off default
    pool1/encdset1 checksum on default
    pool1/encdset1 compression lz4 inherited from pool1
    pool1/encdset1 atime on default
    pool1/encdset1 devices on default
    pool1/encdset1 exec on default
    pool1/encdset1 setuid on default
    pool1/encdset1 readonly off default
    pool1/encdset1 zoned off default
    pool1/encdset1 snapdir hidden default
    pool1/encdset1 aclmode discard default
    pool1/encdset1 aclinherit restricted default
    pool1/encdset1 createtxg 2829 -
    pool1/encdset1 canmount on default
    pool1/encdset1 xattr sa inherited from pool1
    pool1/encdset1 copies 1 default
    pool1/encdset1 version 5 -
    pool1/encdset1 utf8only off -
    pool1/encdset1 normalization none -
    pool1/encdset1 casesensitivity sensitive -
    pool1/encdset1 vscan off default
    pool1/encdset1 nbmand off default
    pool1/encdset1 sharesmb on local
    pool1/encdset1 refquota none default
    pool1/encdset1 refreservation none default
    pool1/encdset1 guid 16776182306085815410 -
    pool1/encdset1 primarycache all default
    pool1/encdset1 secondarycache all default
    pool1/encdset1 usedbysnapshots 0B -
    pool1/encdset1 usedbydataset 1.04T -
    pool1/encdset1 usedbychildren 0B -
    pool1/encdset1 usedbyrefreservation 0B -
    pool1/encdset1 logbias latency default
    pool1/encdset1 objsetid 2236 -
    pool1/encdset1 dedup off default
    pool1/encdset1 mlslabel none default
    pool1/encdset1 sync standard default
    pool1/encdset1 dnodesize legacy default
    pool1/encdset1 refcompressratio 1.01x -
    pool1/encdset1 written 1.04T -
    pool1/encdset1 logicalused 1.06T -
    pool1/encdset1 logicalreferenced 1.06T -
    pool1/encdset1 volmode default default
    pool1/encdset1 filesystem_limit none default
    pool1/encdset1 snapshot_limit none default
    pool1/encdset1 filesystem_count none default
    pool1/encdset1 snapshot_count none default
    pool1/encdset1 snapdev hidden default
    pool1/encdset1 acltype off default
    pool1/encdset1 context none default
    pool1/encdset1 fscontext none default
    pool1/encdset1 defcontext none default
    pool1/encdset1 rootcontext none default
    pool1/encdset1 relatime on inherited from pool1
    pool1/encdset1 redundant_metadata all default
    pool1/encdset1 overlay on default
    pool1/encdset1 encryption aes-256-gcm -
    pool1/encdset1 keylocation prompt local
    pool1/encdset1 keyformat passphrase -
    pool1/encdset1 pbkdf2iters 1553683 -
    pool1/encdset1 encryptionroot pool1/encdset1 -
    pool1/encdset1 keystatus available -
    pool1/encdset1 special_small_blocks 0 default
  • Как восстановить пропавшие файлы на зашифрованном zfs датасете?

    @ProForensic Автор вопроса
    mayton2019, все возможно, но все-таки я надеюсь, что не такой криворукий. Было как-то странно, все работало, собственно оставил на майские работающий комп - приехал к неработающему.

    Смущает, что после переустановки этот датасет не подцепился к samba, т.е. незашифрованный при импорте образовал общий ресурс, как и раньше, а зашифрованный не образовал ничего.
    Я откопал памятку для себя, в которой писал, что и как я создавал. По ней получается, что еще один SSD был выделен по кэширующий.

    lsblk
    sudo ls -lh /dev/disk/by-id
    sudo zpool create -f -o ashift=12 -m /mnt/data pool1 wwn-0x5000039a78cafc43
    sudo zpool add pool1 cache nvme-eui.00000000000000000026b76853063e85
    sudo zfs set compression=lz4 pool1
    sudo zfs set xattr=sa pool1
    sudo zfs set relatime=on pool1
    sudo zpool status -v pool1
    sudo zfs create -o encryption=aes-256-gcm -o keylocation=prompt -o keyformat=passphrase -o pbkdf2iters=1553683 pool1/encdset1
    sudo zfs set sharesmb=on pool1/encdset1
    sudo chown -R serg:serg /mnt/data
    sudo smbpasswd -a serg