Tuesday, August 11, 2009

Disk Administration

How to mount two or more devices in the same mount point?

1. Creating a mount point
bash-3.00# mkdir /mnt/new


2. Mounting the device in the created mount point
bash-3.00# mount /dev/dsk/c1d0s4 /mnt/new/

3. Verifying the device mounted & its mount point
bash-3.00# df -h
Align LeftFilesystem size used avail capacity Mounted on
/dev/dsk/c1d0s0 9.9G 3.2G 6.5G 34% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 22G 736K 22G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap2.so.1
9.9G 3.2G 6.5G 34% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 22G 48K 22G 1% /tmp
swap 22G 40K 22G 1% /var/run
/dev/dsk/c1d0s4 2.0G 2.0M 1.9G 1% /mnt/new

4. Now if we try to mount another device in the same mount point, we face the following error message:
bash-3.00# mount /dev/dsk/c1d0s5 /mnt/new/
mount: /dev/dsk/c1d0s5 is already mounted or /mnt/new is busy


5. So, to mount another device in the same mount point,
bash-3.00# mount -O /dev/dsk/c1d0s5 /mnt/new/


6. Verifying the device mounted & its mount point
bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1d0s0 9.9G 3.2G 6.5G 34% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 22G 736K 22G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap2.so.1
9.9G 3.2G 6.5G 34% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 22G 48K 22G 1% /tmp
swap 22G 40K 22G 1% /var/run
/dev/dsk/c1d0s4 2.0G 2.0M 1.9G 1% /mnt/new
/dev/dsk/c1d0s5 2.0G 2.0M 1.9G 1% /mnt/new
Align Left

10 comments:

  1. if we do lik this...which slice we can access..frst one or second one..?
    its showing that two slices r mounted at same mount point...

    ReplyDelete
  2. Hi Jacob,
    Initially we can access only the device that is recently mounted at the specified mount point.

    ReplyDelete
  3. Hi Guna,
    It's possible to give all root privilege to non-root user without duplicating the root id.
    I checked thro' RBAC. IT's works!!!

    ReplyDelete
  4. ok sir , thank u , i will check

    ReplyDelete
  5. Thanks for Your Information Sir.how many slice we can add like this? Any restrictions?

    ReplyDelete
  6. Hi Senthil,
    I dont't think any restriction is there! You can mount as many slices available to the same mount point!!!

    ReplyDelete
  7. what is the use of mounting slices in the same mount point? if i have 2 slices with size of 5gb each mounted to the same mount point,what will happen when i want to save a file which is larger than 5gb? it will be stored in 2 slices or how?

    ReplyDelete
  8. For eg: First Slice has 50gb. If we are adding 25gb to the same mount point , it will increase the total size of mount point to 75gb?

    ReplyDelete
  9. To Senthil,
    Slice space is no way related to mount point and hence there'll be no change in the size of the mount point.

    ReplyDelete
  10. To Anonymous,
    1. Just imagine a scenario where you not are permitted to create any new directory due to permission ship/lack of inodes, this works.
    2. Mount point is no way related to the space of the slice. Mount point is only a directory through which we access/store data to a slice.
    3. The data will be stored to the slice which is recently mounted.

    ReplyDelete