File System
Mounting Storage
configuration file: /etc/fstab
sudo mount -o remount,noexec,nosuid /tmp: remount /tmp with noexec, nosuid
Mount option
noexec: prevent the execution of any executable files on that filesystem.
nosuid: Do not allow set-user-identifier or set-group-identifier bits to take effect which means the executable always run as the user that run it, not the owner or group
Logical Volume
List physical disk: fdisk -l
List Physical Volume: pvdisplay
List Volume Group: vgdisplay
List Logical Volume: lvdisplay
Check free space: df -h
Create new logical Volume
pvcreate /dev/sdb1
vgcreate newvg /dev/sdb1
lvcreate -L 50G -n datalv newvg
mkfs.xfs /dev/newvg/datalv
mkdir /mnt/data
mount /dev/newvg/datalv /mnt/data
# Make it persistent by adding to /etc/fstab
/dev/appvg/datalv /mnt/data xfs defaults 0 0Rename Logical volume
lvrename appvg oldnamelv newnamelv
Extend Volume Group
vgextend appvg /dev/sdb2
Extend Logical Volume
lvextend -l +100%FREE /dev/appvg/home: extend /home logical volumne to use 100% of free space
Last updated