Amazon Ad

Featured Post

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, September 26, 2022

Useful Linux iSCSI Settings


iscsid.startup = /bin/systemctl start iscsid.socket iscsiuio.socket
node.conn[0].iscsi.HeaderDigest = None
node.session.err_timeo.lu_reset_timeout = 300
node.session.err_timeo.tgt_reset_timeout = 300
node.session.nr_sessions = 1
node.session.timeo.replacement_timeout = 10
node.startup = automatic

Tuesday, January 22, 2019

SuSE Updates


SuSEConnect -p sle-sdk/12/x86_64
zypper in -t srcpackage 'systemd'

zypper in -t pattern Basis-Devel
zypper in build

Sunday, December 23, 2018

Linux/MacOS - List files sorted by file size


ls -lartSh

How to format an NVMe drive

To understand the little things in life: https://whatsdathing.blogspot.com/


The following are concise instructions on how to format NVMe drives in Linux.

First, identify the format required:

nvme id-ns /dev/nvme1n1 | grep LBA
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0x1 Better 
LBA Format  1 : Metadata Size: 8   bytes - Data Size: 512 bytes - Relative Performance: 0x3 Degraded 
LBA Format  2 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best  (in use)
LBA Format  3 : Metadata Size: 8   bytes - Data Size: 4096 bytes - Relative Performance: 0x2 Good

Explanation


  • Each format has an id: 0, 1, 2, 3 in this example.
  • There are two data sector sizes - 512 bytes and 4K. Typically the 4K formats provide the best performance and endurance.
  • Metadata - some drives provide the capability to add a few bytes for additional metadata for each sector. This is typically used for T10/DIF CRC.

Format

nvme format /dev/nvme1n1 -l 0

where l represents the LBA format id as listed in nvme id-ns.

Wednesday, December 11, 2013

Create a multi-session iSCSI setup in Linux

root@mktgmysql3:~#  iscsiadm --mode session
tcp: [1] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session
tcp: [1] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [2] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2013-12.com.reduxio:red2, portal: 172.17.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session
tcp: [1] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [2] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [3] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [4] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [5] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [6] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [7] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
tcp: [8] 172.17.40.35:3260,1 iqn.2013-12.com.reduxio:red2
root@mktgmysql3:~#