Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mounting
# 1  
Old 05-06-2011

I have a big confusion in please tell me whats the exact meaning of it nd do other os have this concept or not?
# 2  
Old 05-06-2011
1) Operating Systems other than unix do have the concept of mounting filesystems. This includes Microsoft Windows and Mainframe Operating Systems.
2) A mount operation is used to map a storage medium into the host computer's filestore. In the case of unix we are mapping named directory (a "mountpoint") to some storage medium.
# 3  
Old 05-06-2011
Storage devise like any hardware part or simply created directory in linux????
# 4  
Old 05-06-2011
OK, imagine that you have an empty directory called /media/cdrom. And you have a cdrom disc in your hand. You put the disc in the drive and type:mount /dev/cdrom /media/cdrom and now /media/cdrom no longer appears to be empty. The files on that cd disc have appeared in the directory. That is mounting. It might happen automatically when you insert the disc, but manual or automatic, it has to happen if you are going to see the contents of that disc.
# 5  
Old 05-06-2011
Originally Posted by Mac91
Storage devise like any hardware part or simply created directory in linux????
Storage Devices..
Storage device can be part of hardware (like ide,scsi,sata,ssd..) or not so it can be from san devices (as luns) from san storage (as emc,clarion..) or iscsi unit from network and usb sources and the others...
If you attached (for exa scsi disk) , kernel detected signals from the bus and for this , it creates one device(maybe more devices) representation of detected disk.This devices must be structure for processing on it and must cover our device. Actually we access our disk by the hardware - kernel(operations,processing) - driver(how to interact interacts with our hardware , modul (driver) contains code about our hardware for realize to process what we want and it usually written assembly language or c ) . So kernel use system drivers for access our scsi disk. We manage it by various utilities (packages , which is executable in operating system (dependicies must be in) via open,write,list by kernel syscalls.

And actually mount processing is sameway.Eventually we buy a disk from hardware vendor.Firstly we use fdisk utulity for create partitons and create a new partiton table.After than we have to format it for create appropriate fs structure to our system.And we attach it so install disk in our hardware..After than our operating system (actually kernel) handles for after that.."Resume Storage Devices .."

After kernel detects and identify (assing to a avaliable disk device ) we can mount this via matched the disk device (/dev/sda1 ). we use a directory as mount point or create newly.And than we call the mount..
Before the mount , i must mention vfs (virtual file system mechanism) in kernel.firstly all systems have a vfs layer in its own this point , you can think mount operation is a trigger for adding processes a vfs entry to vsflist
for mount devices.but in mount operation is differ by fs type,
int mount(const char *source, const char *target,
const char *filesystemtype, unsigned long mountflags,
const void *data);
now we can call mount then these parameters passing to kernel by mount syscall
after than mount then vfs searchs filesystem types in the kernel filesystem table that system supports (vfs knows previously, it looks to where for table
list) and if finds so found valid fs and then it can call routines -fs specific- by appropriate fs this modul(driver) for reading superblock (contains fs
type , its size,a magic number , free blocks and startup and end adresses , inode list and free inodes ...). if not , vfs return this state to kernel then
kernel try to find appropriate fs modul in your modules if its then load memory and register this in to kernel.if is not return to mount it as unknown
filesystem type.
at the now vfs will read the superblock of device by fs modul and create a VFS superblock by sys_mount (vfsmount). sys_mount() finds avaliable disk device for our new disk..
in VFS the sys_mount()
sys_mount arguments:
dev_name - name of the block special file, e.g., /dev/sda1
dir_name - name of the mount point, e.g., /mnt/mydisk
fstype - name of the filesystem type, e.g., ext3
flags - mount flags, e.g., read-only
data - filesystem-specific data

Vfs process , ext2 and ext3 (and ext4)
filesystem mount is easy at this point for other than because structure is familiar.
Endly a mounted fs is like a part of system and you can list or find files that file structures and inode(caches) or [vfs inode], dentrys as open system
call and the others(e.g. getdents,fstat..)..

I hope you could help some..

# 6  
Old 05-07-2011
Thanx Ygemici for ur long explanation...............i appreciate it.
tell me one another thing.............
suppose a condition i open the file /etc/fstab nd change some predefined label condition in '/' directiory and restart the system then system cant boot nd give the error of mounting of '/' directory.................what should i do for it?????
# 7  
Old 05-07-2011
Originally Posted by Mac91
Thanx Ygemici for ur long explanation...............i appreciate it.
tell me one another thing.............
suppose a condition i open the file /etc/fstab nd change some predefined label condition in '/' directiory and restart the system then system cant boot nd give the error of mounting of '/' directory.................what should i do for it?????
if you change only in fstab that means your configuration is remaing missing. you must apply same change in your boot file (grub.conf or elilo.conf or lilo.conf or others..) for rootfs mount in booting process.because kernel must mount as rootfs with appropriate labeled with correct root device.

if you dont help this information then you can write the output the boot conf and fstab file in here..

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. HP-UX

Mounting LUN on HP 11.31

Hello, I want monting a LUN on a RX2660 I have created a LUN of 100Go with HP StorageWorks EVA and associated to my server. For the moment I see it with the command below but after i can't used it # ioscan -fnkC disk Class I H/W Path Driver S/W State H/W Type Description ... (10 Replies)
Discussion started by: letters
10 Replies

2. Filesystems, Disks and Memory


I generally use mount many times to mount an iso image or as a bind between directories or mounting a squash file system. Y does one require root permission to do a mount --bind between two of his own directories or just mount an iso/squash image in directory he owns? Also I wish mount had an... (0 Replies)
Discussion started by: bbala
0 Replies

3. UNIX for Dummies Questions & Answers

Need help with mounting my USB

My previous post seems to be erased and I didn't get any help. I'm logged as root now but no mounting command seems to work, I've tried: Mount -t vfat /dev/sdc1 /mnt/USB Changing "sdc1" for hda1-7, and sdc1-7, and still nothing. Sometimes i get: "special device not found" and others "device... (4 Replies)
Discussion started by: Dax01
4 Replies

4. UNIX for Dummies Questions & Answers

Mounting fs ext3

I'm trying to find a correct command that will mount a filesystem ext3 the device /dev/sda1 to mount point /mnt/usb but not allow any programs to run from it. I want to be honest as I've read the forum rules... This is a homework question BUT, i'm generally interested in the correct process and... (3 Replies)
Discussion started by: CasperQuiet
3 Replies

5. BSD


Hi I mounted disk which have two partition C: , D: ( i am not sure if both partition have same file system) with this commad: mount -t msdosfs /dev/ad2s1 /mnt/windows but this is mounted only first partition with fat file system. ( in windows XP C: ) How can i mount another partition... (2 Replies)
Discussion started by: sniper007
2 Replies

6. UNIX for Dummies Questions & Answers

Mounting help.

Hello, I am trying to mount a second scsi hard drive on a SCO box. (5.0.5.) And I can't figure out what the device file for it is so I can mount it. Can anyone help me? thanks. (1 Reply)
Discussion started by: iconn
1 Replies

7. UNIX for Dummies Questions & Answers

Mounting cdrom on DG/UX

Hi, I'm looking to mount a cd on an old AViiON system we have. No one here really has any expertise with this platform so any help will be appreciated. I * think* the device is sd(apsc(pci(1),B,0,7),5,0), however I'm not sure at all. Thanks! (0 Replies)
Discussion started by: madesjardins
0 Replies

8. Solaris

Mounting root

Hello, How do I mount root on networked machines in Solaris 2.5 and 7? I did it before but I lost the clue. Was it something in vfstab? root=? I want to give some machines or users rootaccess on other machines on the lan. Do I specify users or machines at the root is option? Thanks in... (1 Reply)
Discussion started by: Albert
1 Replies

9. Filesystems, Disks and Memory


Hi everyone, this is the first time I have ever properly used Linux - I run Red Hat Linux 8. I have two hardrives, my main 80gig, and my "extra" 15gig, I would like to be able to gain access to my 15gig and view the files. I know to view files on a floppy disk or a cd you need to mount the... (1 Reply)
Discussion started by: mo0ness
1 Replies
Login or Register to Ask a Question

Featured Tech Videos