Search This Blog

Showing posts with label mount. Show all posts
Showing posts with label mount. Show all posts

Thursday, 5 August 2010

Creating more than 8 loop back devices in Linux

By default Linux  supports only 8 loop back devices which means we can mount maximum 8 loop back devices(for Eg: 8 iso images)and maximum supported loop back devices by OS is 64.  If you tried to mount the 9 th devices, you may get an error "mount could not find a spare loop device" error.  Below script create the loop back devices from 8 to 64 

for ((i=8;i<64;i++)); do
[ -e /dev/loop$i ] || mknod -m 0600 /dev/loop$i b 7 $i
done


Enjoy.... Now you can mount up to 64

Thursday, 15 July 2010

Deporting and importing Veritas volumes- simple steps

We are going to deport chg2_dg from node1 and and import on node2.

List the existing VGs
root@node1 # vxdg list
NAME         STATE           ID
locksdg      enabled,shared,cds   1279009022.267.node1
ch2_dg       enabled,cds          1279010647.271.node1
infranet_dg  enabled,shared,cds   1279010983.273.node1

Unmount all the file systems related to ch2_dg from node1

root@node1 # df -h|grep ch2_dg
/dev/vx/dsk/ch2_dg/var_ch2_mqm_vol    48G    77M    45G     1%    /var/ch2/mqm
/dev/vx/dsk/ch2_dg/opt_ch2_mqm_vol   4.0G    18M   3.7G     1%    /opt/ch2/mqm
/dev/vx/dsk/ch2_dg/opt_ch2_rel_vol    98G    90M    92G     1%    /opt/ch2/rel
root@node1 # umount /opt/ch2/rel
root@node1 # umount /opt/ch2/mqm
root@node1 # umount /var/ch2/mqm

Stop all the Veritas volumes from node1

root@node1 # vxvol -g ch2_dg stopall

Deporting the volume

root@node1 # vxdg deport ch2_dg


Node 2:

Listing all existing volume before import.

root@node2 # vxdg list
NAME         STATE           ID
locksdg      enabled,shared,cds   1279009022.267.node1
infranet_dg  enabled,shared,cds   1279010983.273.node1

Importing DG to node2

root@node2 # vxdg import ch2_dg

Mounting file systems on node2 (if mount point is not exist, it must be created before mount.)


root@node2 # vxvol -g ch2_dg startall
root@node2 # mount -F vxfs /dev/vx/dsk/ch2_dg/opt_ch2_rel_vol /opt/ch2/rel
root@node2 # mount -F vxfs /dev/vx/dsk/ch2_dg/opt_ch2_mqm_vol /opt/ch2/mqm
root@node2 # mount -F vxfs /dev/vx/dsk/ch2_dg/var_ch2_mqm_vol /var/ch2/mqm