Automatically mounting a filesystem after a reboot

Hi All,

I am new to AIX. I am having problems mounting a filesystem after a system reboot.

Steps:

  1. Create and Map LUN to host

  2. On the host, to detect/configure the LUN: /usr/sbin/cfgmgr

  3. Create a filesystem: mkfs -V vxfs /dev/hdisk757

  4. Create a mountpoint: mkdir -p /mnt/testlun; chmod 777 /mnt/testlun

  5. Mount the filesystem: mount -V vxfs -o log=INLINE /dev/hdisk757 /mnt/testlun

  6. Populate the /etc/filesystems:
    echo '
    /mnt/testlun:
    dev = /dev/hdisk757
    vfs = vxfs
    log = INLINE
    mount = automatic <--- Tried using "true"
    check = false' >> /etc/filesystems

  7. touch a file

  8. ls /mnt/testlun
    testfile1

  9. reboot

After the system reboots, I don't see the filesystem in the df output.

Are the above steps correct?. Do I need to use some kind of container like volume group or diskgroup for veritas, before I can create a filesystem on it.?. :confused:

Thanks...

Hmmm...

I have never heard about a "vxfs" filesystem. In AIX JFS (journaling file system) and its successor JFS2 are common.

The "containers" as you have called them are integrated parts of AIX. Without having created a volume group or having added your disk to an existing one you will not even be able to use it, so perhaps your filesystem (if you created any) is now on some other disk.

For short: your problem can easily be corrected by editing the file /etc/filesystems and add the line

mount           = true

To the filesystems stanza. Assuming your filesystem is mounted on /path/to/fs this would look similar to that (the line to insert/change is marked bold):

/path/to/fs:
        dev             = /dev/my_new_lv
        vfs             = jfs2
        log             = /dev/hd8
        mount           = true
        check           = true
        vol             = /path/to/fs
        free            = false
        quota           = no

Right now I'm a bit short on time, but as i see much confusion over this issue now and again i will write a detailed explanation of the LVMs workings over the next few days. Until then you might read some information about the LVM (Logical Volume Manageer) on the IBM Website (the link to the redbook site is pinned in the links section this forum) and read the following (part-)explanations i have written in answering one or the other question.

I hope this helps.

bakunin

vxfs is a type of hpux OS filesystem.. I think you take wrong place. and the first answer is correct way to deal this problem in AIX.

vxfs is the veritas filesystem used with veritas volume manager, which is also used on hpux, solaris and other os

but I've never used it on AIX, can't help you on that