Jun 18, 2012

Install SUN QFS in Solaris 10

Install SUN QFS in Solaris and Create new Filesystem

Oracle Solaris 10_X86


1)      Copy the SUN QFS iso image file from cd to /opt filesystem

2)      Mount the iso image using the below command

# lofiadm -a /opt/SUN_QFS_5.2.iso

# mount –F hsfs /dev/lofi/1 /mnt/

3)      Install the QFS package using the pkgadd command’

# cd /mnt/x64/2.10/
# pkgadd -d . SUNWqfsr SUNWqfsu

Note: The above command asks some confirmation like license agreement, give yes to all. Finally we got output like “Installation of was successful

4)      By default the QFS package installed in /opt filesystem. So we need to manually add this to the PATH variable to use QFS command.

# vi /.profile

export PATH

5)      Copy the default mcf file to the /etc/opt/SUNWsamfs directory

# cd /etc/opt/SUNWsamfs
# cp /opt/SUNWsamfs/examples/mcf .

6)      Create the Slices in second disk to create QFS filesystem.

# format –e

Searching for disks...done

       0. c0t0d0
       1. c2t0d0

Specify disk (enter its number): 1

selecting c2t0d0
[disk formatted]

        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        inquiry    - show vendor, product and revision
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !     - execute , then return

format> p

        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        8      - change '8' partition
        9      - change `9' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        ! - execute , then return

partition> 0
Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting Sector[34]:
Enter partition size[20971520b, 20971553e, 10240mb, 10gb, 0tb]: 10gb

Note: Create the next slice from the last sector of the first slice. We can get that value by listing all the partitions using “p” option.

partition> 4
Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting Sector[20971554]: 20971554
Enter partition size[629145600b, 650117153e, 307200mb, 300gb, 0tb]: 300gb

partition> 5
Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting Sector[650117154]: 650117154
Enter partition size[629145600b, 1279262753e, 307200mb, 300gb, 0tb]: 300gb

partition> l
[0] SMI Label
[1] EFI Label
Specify Label type[1]:
Ready to label disk, continue? y

partition> q
format> q

7)      Edit the mcf file

# vi /etc/opt/SUNWsamfs/mcf

qfs1000              10    ma   qfs1000       on
/dev/dsk/c0t0d0s7    11    mm   qfs1000       on
/dev/dsk/c2t0d0s5    12    mr   qfs1000       on
/dev/dsk/c2t0d0s6    13    mr   qfs1000       on

Note: Here Select equipment type according to your environment. Otherwise you got an error message. In my configuration file the metadata information are stored in the first disk and the filesystem created in the second disk.

ms          Defines a file system that stores both data and metadata on the same device (an md device).
ma          Defines a file system that stores metadata on a separate device (an mm device). The data in an ma file system can be stored on md, or mr devices.
md          Defines a striped or round-robin device that uses dual allocation for storing file data. See also Dual and Single Allocation Schemes.
mm         Defines a metadata device for storing inode and other metadata information. You can specify multiple metadata devices. Metadata (including inodes, directories, allocation maps, and so on) on ma file systems is located on metadata devices, separated from the file data devices. By default, metadata is allocated using round-robin allocation if you have multiple metadata devices.
mr           Defines a round-robin or striped data device that uses single allocation for storing file data. See also Dual and Single Allocation Schemes.

8)      Issue “samd config” command to update the configuration changes to the sam-fsd daemon.

# samd config

9)      Now create the QFS filesystem

# sammkfs qfs1000

10)   Mount the QFS filesystem using the below command

# mkdir /qfs1000
# mount –F samfs qfs1000 /qfs1000

11)   For the permanent mount add the below entry in the vfstab file

# vi /etc/vfstab

qfs1000 -       /qfs1000        samfs   -   yes     -

12)   Once restart the server and confirm, whether QFS filesystem auto mounted or not

# reboot