ZFS dataset partition enlarge

zfs set volsize=1200g storage/iscsi/elk
zfs get volsize,reservation storage/iscsi/elk

virsh pool-list
virsh pool-destroy elk

tgt-admin –show
tgt-admin –update tid=12
tgt-admin –show

virsh pool-start elk
virsh pool-autostart elk

virsh start elk.cesal.cz

sudo fdisk /dev/sda

# sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.29).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Příkaz (m pro nápovědu): p
Disk /dev/sda: 1,2 TiB, 1288490188800 bytes, 2516582400 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: 0xa2b9ffcc

Zařízení Zaveditelný Start Konec Sektory Size Id Druh
/dev/sda1 * 2048 62912511 62910464 30G 83 Linux

Příkaz (m pro nápovědu): d
Selected partition 1
Partition 1 has been deleted.

Příkaz (m pro nápovědu): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Číslo oddílu (1-4, default 1):
First sector (2048-2516582399, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-2516582399, default 2516582399):

Created a new partition 1 of type ‚Linux‘ and of size 1,2 TiB.
Partition #1 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: Y

The signature will be removed by a write command.

Příkaz (m pro nápovědu): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Příkaz (m pro nápovědu): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Zařízení nebo zdroj jsou používány

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).


shutdown -r now

sudo resize2fs /dev/sda1