Saturday, May 23, 2020

How to Mount or unmount Filesystem on Unix server



1)Create the appropriate entry in /etc/fstab to ensure that the file system is mounted at boot time.


cat /etc/fstab

UUID=2eb83701-0f05-41bc-bb0d-755922dadf8d /                       ext4    defaults        1 1
UUID=d3fceab3-da77-4766-afd3-50374e8ab323 /boot                   ext4    defaults        1 2
UUID=47e9f773-c63a-4b29-94ea-4e83304eeeb7 swap                    swap    defaults        0 0
UUID=db3dce5c-21db-4027-9cf4-7305c4b19d4f  /oracle                ext4    defaults        1 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
//192.6.0.100/rmanbackup        /extdrive       cifs    username=Administrator,password=welcome123 ,uid=root,gid=root,_netdev,sec=ntlm,auto     0 0

Mounted file systems  information is in the proc file system 

cat /proc/mounts

2) Login as root user and issue below command to mount 

mount /dev/xvdf1 /test

mount shared file system :

sudo mount -t cifs -o username=Administrator //192.6.0.100/rmanbackup     /extdrive

3) Login as root user and issue below command to unmount 

sudo umount -l  /extdrive

No comments: