Set the mount option for new file systems
AnthonyEnglish 270000RKFN Comments (5) Visits (14459)
When you create a file system using SMITTY, the default action is for the file system NOT to mount after a reboot.
Now it might occur to you that generally when you create a file system, you probably want it to be available after a reboot. So you naturally hit the F4 key (or Esc 4 or just the Tab key) so that you can set the option to True.
Here's what to do if you've forgotten that option and found your file system hasn't mounted after a reboot.
From the command line:
The fix is quite easy using the chfs command, and you don't need to edit /etc/filesystems. Here's some relevant information taken from the command documentation for the chfs command
So for a single file system to mount automatically after a reboot, you'd run:
In our example above, that would be:
Fix the lot of 'em
What if you create a few file systems at a time, and have overlooked this mount = true option? Simple! Just run the chfs command for all file systems in a volume group.
You can list all the file systems in a volume group using the very simple and elegant lsvgfs command.
Update using xargs
Or, even better, as a reader suggested, use xargs.
Now you can reboot, or simply run mount -a. This will attempt to mount all file systems with the true mount attribute set in /etc/filesystems. What about those which are already mounted? You'll get an error telling you not to try to mount them again. Ignore it.
Geek of the Week award
For the really keen AIXers, here's some homework. Which is correct: "filesystems" or "file systems"? One word or two? Include links to official IBM documentation in your answer. First prize wins Geek of the Week award.