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
m
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
mount | grep ^/dev

Temporary mounting 

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

Unmount

umount /dev/sdb1

Show devices's UUIDs

blkid

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

192.168.1.3:/data/exadata /backup nfs rw,hard,tcp,vers=3,bg,nointr,rsize=32768,wsize=32768,actimeo=0 0 0

192.168.1.4:/data/oracle /backup nfs rw,hard,tcp,vers=3,bg,nointr,rsize=32768,wsize=32768,actimeo=0 0 0

192.168.1.4:/data/oracle /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 192.168.14.4:/data/col1/oracle /backup
mount 192.168.14.3:/data/col1/exadata /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
YES
Enter complex password

mkdir /secret
cryptsetup luksOpen /dev/sdb2 secret
cd /dev/mapper
\ls          device secret is here
pwd
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

Newsletter

Enter your email to join our mailing list

Quick Contact