Tuesday, August 7, 2012

Linux. How to mount a new filesystem?


1. Edit /etc/fstab. Add a line similar to the last one:
[root@localhost ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
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
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
shmfs                   /dev/shm                tmpfs   size=2g         0 0
/dev/sdb1               /u02                    ext3    defaults        1 2
[root@localhost ~]#
2. Mount the filesystem:
[root@localhost ~]# mount /u02
3. Verify that it is available:
[root@localhost ~]# df -h /u02
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1              30G  173M   28G   1% /u02
[root@localhost ~]#

No comments: