Tuesday, June 26, 2012

Mount ISO files in Linux,Solaris,HP-Ux Servers

LINUX SERVERS
-----------------------------
1. Run the following command to create an empty directory
   where the ISO file can be mounted:
    mkdir /isoimg
2. Run the following command to mount the ISO file on the
   mount point:
    mount -o loop /tmp/<ISO_file> /isoimg
3. Run the following command to unmount the ISO file:
    umount /isoimg

SOLARIS SERVERS
-----------------------------
1. Run the following command to create an empty directory
   where the ISO file can be mounted:
    mkdir /isoimg
2. Run the following command to create a pseudo device:
    lofiadm -a /tmp/<ISO_file> /dev/lofi/1
3. Run the following command to mount the pseudo device
   on the mount point:
    mount -F hsfs -o ro /dev/lofi/1 /isoimg
4. Run the following command to unmount the ISO file:
    umount /isoimg

HP-UX 11.11 and HP-UX 11.23 SERVERS
-----------------------------
1. Run the following command to create an empty directory
   where the ISO file can be mounted:
    mkdir /isoimg
2. Run the following command to start the pfs mount daemon
    nohup pfs_mountd &
3. Run the following command to start the pfs daemon
    nohup pfsd &
4. Run the following command to mount the iso image
   using following command
    pfs_mount -o xlat=UNIX /tmp/<ISO_file> /isoimg
5. Run the following command to unmount the ISO file:
    umount /isoimg

HP-UX 11.31 SERVERS
-----------------------------
1. Install the ISOIMAGE-ENH enhancement bundle
(also dependant patches PHCO_39672, PHCO_39673,
  PHCO_39674, and PHCO_39675)
2.Run the following command to create an empty directory
  where the ISO file can be mounted:
   mkdir /isoimg
3. Run the following command to mount the ISO File:
   mount F cdfs /tmp/<ISO_file> /isoimg
   If the mount command generates an invalid operand
   error, try the following command to load the correct
   kernel module:
   kcmodule fspd=loaded
(If prompted, proceed with the automatic
  backup configuration.)
  Finally, try the mount command again.
5. Run the following command to unmount the ISO File:
    umount /isoimg

Wednesday, June 6, 2012

File system not mounting during system boot Unix

       I had a strange problem when I added a new file system to one of my Linux box. The file system is not mounting. But it turned out to be a funny mistake :)

I have added the file system like this in /etc/fstab

/dev/vg00/lvol03        /usr                   ext3    defaults        1 2
/dev/vg00/lvol04        /usr/src             ext3    defaults        1 2
/dev/vg00/lvol07      /var/crash        ext3    defaults     1 2
/dev/vg00/lvol02        /var                   ext3    defaults       1 2

See the file system in bold. You guess it  correctly !!

Before mounting the /var file system, os is trying to mount  /var/crash, simply it  fails :)

Change the fstab entry like this it will work..








/dev/vg00/lvol03        /usr                   ext3    defaults        1 2
/dev/vg00/lvol04        /usr/src             ext3    defaults        1 2
/dev/vg00/lvol02        /var                   ext3    defaults       1 2
/dev/vg00/lvol07      /var/crash        ext3    defaults     1 2



Monday, June 4, 2012

Useful scsimgr commands hp-ux 11.31

To get LUN  ID of a device

# scsimgr get_attr -H 3/0/10/1/0/4/0.0x50001fe1501ef98f.0x400a000000000000 -a lunid

        SCSI ATTRIBUTES FOR LUN PATH : 3/0/10/1/0/4/0.0x50001fe1501ef98f.0x400a000000000000

name = lunid
current =0x400a000000000000 (LUN # 10, Flat Space Addressing)
default =
saved =

To get www id and serial no of a device

scsimgr get_attr -D /dev/rdisk/disk535 -a wwid -a serial_number

        SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk535

name = wwid
current = 0x600508b4000cefeb0000600002150000
default =
saved =

name = serial_number
current = "PAFURB49SXC01Y"
default =
saved =

To get www id and serial no of a device in single line


# scsimgr -p get_attr -D /dev/rdisk/disk535 -a wwid -a serial_number
0x600508b4000cefeb0000600002150000:"PAFURB49SXC01Y"