当前位置: 首页 > 工具软件 > Btrfs > 使用案例 >

iscsi btrfs 扩容操作

樊琦
2023-12-01

iscsi扩容扫描不同于传统的扫描

传统:

echo "- - -" > /sys/class/scsi_host/host1/scan

应使用iscsi的专用扫描命令

iscsiadm -m session -R

其他参考命令:

# lsblk
# lsscsi -ds
[7:0:0:0]    disk    TrueNAS  iSCSI Disk       360   /dev/sdc [8:32]  42.9GB
[7:0:0:1]    disk    TrueNAS  iSCSI Disk       360   /dev/sdd [8:48]   107GB

7是通道, :0与:1是LUN

使用parted 命令调整sdc1盘的空间

# parted /dev/sdc
GNU Parted 3.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) resizepart
Partition number? 1
Warning: Partition /dev/sdc1 is being used. Are you sure you want to continue?
Yes/No? yes
End?  [42.9GB]? 64GB
(parted) print list
Model: TrueNAS iSCSI Disk (scsi)
Disk /dev/sdc: 64.4GB
Sector size (logical/physical): 512B/131072B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  64.0GB  64.0GB  primary  btrfs

使用btrfs专用命令扩容至最大

# btrfs filesystem resize max /mnt/disks/TrueNAS_iSCSI_Disk01
Resize device id 1 (/dev/sdc1) from 40.00GiB to max

重新查空间确认是否成功

# df -h
 类似资料: