Partition Table
| fdisk -cul <device> | show partition table (sector view) |
| fdisk -cu <device> | edit partition table |
| partprobe <device> | force Kernel to update his partitiontable "view" |
| partprobe -s <device> | show summary of partitiontable "view" |
Filesystem
| mkfs | |
| blkid | display uuid and others |
Encryption
| cryptsetup luksFormat <partition> | encrypt volume and set PW |
| cryptsetup luksOpen <partition> <name> | unlock encrypted volume and provide /dev/mapper/<name> |
| now you can add a filesystem to /dev/mapper/<name> |
| cryptsetup luksClose <name> | remove unencrypted version of <partition> |
for automatic provisioning during boot use /etc/crypttab
<name> <partition> /path/to/passwordfile
create passworfile:
cryptsetup luksAddKey <partition> </path/to/passwordfile
then add /dev/mapper/<name> to /etc/fstab
Swapspace
- create Partition with partition type "0x82 Linux Swap"
- prepare Partition with
mkswap <partition> - get the uuid for the
/etc/fstab with blkid <partition> - add partition to the
/etc/fstab swapon -a activates swapspaceswapon -s shows summaryswapoff <partition> deactivate partition
iSCSI
- Package required:
iscsi-initiator-utils - Package recommended:
iscsi-inlsscsi-0.23-2.el6.x86_64 - Documentation
/usr/share/doc/iscsi-initiator-utils-*/README - Own initiator IQN is in
/etc/iscsi/initiatorname.iscsi - search for provided luns ("targets")
| lsscsi | Shows all known SCSI-Devices (iSCSI!) |
| iscsiadm -m discovery -t st -p <lunprovider ip> | provides target lists I can mount (see <Target IQN> below) |
| iscsiadm -m node -T <Target IQN> -p <lunprovider ip> -l | connect <Target IQN> from <lunprovider> localy |
| service iscsi status | show currently connected luns |
| ls -l /dev/disk/by-path/*iscsi* | Display the devicenames of the mounted Targets |
| iscsiadm -m node -T <Target IQN> -p <lunprovider ip> -u | disconnect <Target IQN> from <lunprovider> temporarily |
| iscsiadm -m node -T <Target IQN> -p <lunprovider ip> -o delete | remove <Target IQN> from <lunprovider> permanently |
- make sure that iscsi devices are onyl mounted with the
_netdev option in the /etc/fstab - the
iscsi and iscsid services should be started at boot - check
/var/lib/iscsi/nodes/... it should include node.startup = automatic