Most of the people will get confused when to use /dev/dsk/c0t1d0s7 and /dev/rdsk/c0t1d0s7 device files.
Generally /dev/dsk is a block disk device whereas /dev/rdsk is a character disk device
As a thumb rule raw devices are used before filesystem creation.Block devices are user after filesystem creation.
E.g., In Solaris whenever you create a new slice using format command a raw physical slice or a Raw Device will be created which is addressed as /dev/rdsk/c#t#d#s#
After formatting it with newfs command the slice will be addressed as /dev/dsk/c#t#d#s# which can now be used for mounting.
newfs /dev/rdsk/c0t1d0s4
mkdir /oracle
mount /dev/dsk/c0t1d0s4 /oracle
After mounting /dev/dsk/c#t#d#s# is called as Block Device
Showing posts with label Filesystems. Show all posts
Showing posts with label Filesystems. Show all posts
01 July 2008
21 November 2007
File format of /etc/fstab in Linux
fstab is a configuration file that contains information of all the partitions and storage devices in your computer.
*File system specifier: For disk-based file systems,either a device file,or a device label specification
*Mount point : Except swap partitions,this field specifies the mount point to be used when the file system is mounted
*File system type : Type of file system present on the specified device
*Mount Options : A comma-separated list of options that can be used to control mount's behaviour
*Dump frequency : If the dump backup utility is used,the number in this field will control dump's handling of the specified file system
*File system check order: Controls the order in which the file system checker fsck checks the integrity of the file systems.
Mount options common to all filesystems are:
*File system specifier: For disk-based file systems,either a device file,or a device label specification
*Mount point : Except swap partitions,this field specifies the mount point to be used when the file system is mounted
*File system type : Type of file system present on the specified device
*Mount Options : A comma-separated list of options that can be used to control mount's behaviour
*Dump frequency : If the dump backup utility is used,the number in this field will control dump's handling of the specified file system
*File system check order: Controls the order in which the file system checker fsck checks the integrity of the file systems.
Mount options common to all filesystems are:
auto/noautoWith the auto option, the device will be mounted automatically (at bootup, or when we issue the mount -a command). auto is the default option. If you don't want the device to be mounted automatically, use the noauto option in /etc/fstab. With noauto, the device can be mounted only explicitly.dev/nodev
Interpret/do not interpret block special devices on the filesystem.exec/noexec- exec lets you execute binaries that are on that partition, whereas noexec doesn't let you do that. noexec might be useful for a partition that contains binaries you don't want to execute on your system, or that can't even be executed on your system. This might be the case of a Windows partition.
ro- Mount read-only.
rw- Mount the filesystem read-write.
sync/async- How the input and output to the filesystem should be done. sync means it's done synchronously. If you look at the example fstab, you'll notice that this is the option used with the floppy.,this means that copy a file to the floppy, the changes are physically written to the floppy at the same time you issue the copy command.
suid/nosuid- Permit/Block the operation of suid, and sgid bits.
user/nouser- Permit any user to mount the filesystem. This automatically implies noexec, nosuid,nodev unless overridden. If
nouseris specified, only root can mount the filesystem. defaults- Use default settings. Equivalent to
rw,suid,dev,exec,auto,nouser,async.
20 November 2007
Filesystems that cannot be configured in Linux
The /bin,/dev,/etc,/lib and /sbin directories may not be on separate filesystems they must be a part of / filesystem otherwise system will not boot properly
Subscribe to:
Posts (Atom)