Welcome to fdisk (util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m forhelp): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): First sector (20971487-41943039, default 20971520): Last sector, +sectors or +size{K,M,G,T,P} (20971520-41943039, default 41943039):
Created a new partition 2 of type'Linux' and of size 10 GiB.
Command (m forhelp): w The partition table has been altered. Syncing disks.
[root@servera iscsi-review]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 252:0 0 20G 0 disk ├─vda1 252:1 0 10G 0 part / └─vda2 252:2 0 10G 0 part vdb 252:16 0 5G 0 disk
[root@servera ~]# targetcli Warning: Could not load preferences file /root/.targetcli/prefs.bin. targetcli shell version 2.1.fb49 Copyright 2011-2013 by Datera, Inc and others. For help on commands, type'help'.
/> /backstores/block create iscsi_store /dev/myvg/myvg Created block storage object iscsi_store using /dev/myvg/myvg. /> /iscsi create iqn.2014-11.com.example:servera Created target iqn.2014-11.com.example:servera. Created TPG 1. Global pref auto_add_default_portal=true Created default portal listening on all IPs (0.0.0.0), port 3260. /> /iscsi/iqn.2014-11.com.example:servera/tpg1/luns create /backstores/block/iscsi_store Created LUN 0. /> /iscsi/iqn.2014-11.com.example:servera/tpg1/acls create iqn.2014-11.com.example:serverb Created Node ACL for iqn.2014-11.com.example:serverb Created mapped LUN 0. /> /iscsi/iqn.2014-11.com.example:servera/tpg1/portals delete 0.0.0.0 3260 Deleted network portal 0.0.0.0:3260 /> /iscsi/iqn.2014-11.com.example:servera/tpg1/portals create 172.25.250.10 3260 Using default IP port 3260 Created network portal 172.25.250.10:3260.
Welcome to fdisk (util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0xf9fbdda4.
Command (m forhelp): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p):
Using default response p. Partition number (1-4, default 1): First sector (2048-6291455, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-6291455, default 6291455): +2100M
Created a new partition 1 of type'Linux' and of size 2.1 GiB.
Command (m forhelp): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
[root@serverb ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 3G 0 disk └─sda1 8:1 0 2.1G 0 part vda 252:0 0 20G 0 disk └─vda1 252:1 0 10G 0 part / vdb 252:16 0 5G 0 disk [root@serverb ~]# mkfs.ext4 /dev/sda1 mke2fs 1.44.6 (5-Mar-2019) Creating filesystem with 537600 4k blocks and 134640 inodes Filesystem UUID: 74d0c4f2-cc5f-46cc-a80d-5750690b5f56 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912
Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done
# # /etc/fstab # Created by anaconda on Tue Oct 29 16:26:01 2019 # # Accessible filesystems, by reference, are maintained under '/dev/disk/'. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. # # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. # UUID=f7614c41-2835-4125-bb13-50772dc2f30c / xfs defaults 0 0 servera.lab.example.com:/nfsshare /share nfs defaults 0 0 UUID='74d0c4f2-cc5f-46cc-a80d-5750690b5f56' /mnt/data ext4 _netdev 0 0 [root@serverb ~]# mount /mnt/data [root@serverb ~]# df -ht ext4 Filesystem Size Used Avail Use% Mounted on /dev/sda1 2.0G 6.2M 1.9G 1% /mnt/data [root@serverb ~]#