Mounting
is the attaching of an additional file system to the currently
accessible file-system of a computer.
#mount
to
view all mounted devices in a system. User can see the mounted device
all in /etc/fstab.
If
user want to mount a formated partition, first has to create a mount
point,
#mkdir
{/disk1}
#mount
/dev/{sda1,2,3..} /disk1
#df
/disk1 To check the mounted
device. Mounted device will be stored in /etc/mtab.
To
ensure that the system mounts the new file systems at boot time, need
to add a line for each one to /etc/fstab
#nano
/etc/fstab
Each
line lists, as required, the name of the device, mounting point, file system type, dump and pass bit.
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sda5
/home ext3 nouser,auto 0 2
Pass
bit is the count, on every 25 mounting process the file system will
be checked for fsck. User can change the checking by changing the
maximum mount count.
#tune2fs
-c {value} /dev/{sda1,2,3..}, If
the value set to 0 or -1 the file system will not check.
User
can run fsck command on file system to make sure they created properly
or error checking in file system. Don't use this command on mounted
device, device must unmounted and use the command.
#umount
/dev/{sda1,2,3..}
Now
can check the file-system:
#fsck
dev/{sda1,2,3..}, here the
problem is by default fsck will take the file system as ext3, to avoid
this, user can mention which file system need to check.
#fsck
-t zfs /dev/{sda1,2,3..}
There
is also a problem that through above command will go and check the
last checked register not check the full file system, to overcome this
we can forcefully check the file system.
#fsck
-ft zfs /dev/{sda1,2,3..}
Sometimes
user need to check the space where user stands, eg: if user need to
check the primary partition where the operating system files located.
This has to be done only in Run level 1 –
/etc/rc.d/rc1.d/ (Single user mode).
#init 1
#umount
/dev/sda1
here actually we virtually moving our location to RAM.
#fsck -ft
zfs /dev/{sda1}
No comments:
Post a Comment