Mount Point

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active


IMPORTANT: Before you begin any disk changes create FULL backup of your server

Show partitions

frisk -l 

Modify partitions 

fdisk /dev/sdb
p, n, p, Enter, Enter, +10G or Enter for full usage, p, w

Update kernel partition

partprobe /dev/sdb 

Show partitions

cat /proc/partitions

Available file systems 

mkfs + tab, + tab
mkfs.xfs --help
mkfs.btrfs --help
mkfs.xfs -L myfs /dev/sdb1 set label

Info of mounted devices

mount | grep ^/dev

Temporary mounting 

mount /dev/sdb1 /mn
mount LABEL=myfs /mnt


umount /dev/sdb1

Show devices's UUIDs


Permanent mount nfs, cifs

rpm -qa | grep nfs-utils

yum install nfs-utils

yum install nfs-utils-lib

yum install nfs4-acl-tools

yum install portmap

rpm -qa | grep cifs-utils

mkdir /backup

vi /etc/fstab /backup nfs rw,hard,tcp,vers=3,bg,nointr,rsize=32768,wsize=32768,actimeo=0 0 0 /backup nfs rw,hard,tcp,vers=3,bg,nointr,rsize=32768,wsize=32768,actimeo=0 0 0 /backup nfs defaults 0 2

systemctl enable rpcbind
chkconfig rpcbind on 

systemctl start rpcbind
systemctl start nfs-server
service rpcbind start

systemctl status rpc-statd.service 

mount /backup
mount /backup
mount /backup

mount -a          mount all not mounted mount points

Show options of xfs command

xfs_ +tab +tab

Ecrypted partitions, create/connect/disconnect

cryptsetup luksFormat /dev/sdb2
Enter complex password

mkdir /secret
cryptsetup luksOpen /dev/sdb2 secret
cd /dev/mapper
\ls          device secret is here
mkfs.ext4 /dev/mapper/secret
mount /dev/mapper/secret /secret
vi /etc/fstab
/dev/mapper/secret /secret ext4 defaults 1 2
vi /etc/crypttab
/secret /dev/sdb2 none          none - passphrase will ask at Linux startup, or enter "yes"
reboot                                      mount -a on't work, because it uses fstab information

umount /secret
cryptsetup luksClose /dev/mapper/secret 

journalctl -xb                         show boot messages


Enter your email to join our mailing list

Quick Contact