Operating System - HP-UX
1748006 Members
4498 Online
108757 Solutions
New Discussion юеВ

Re: how to add newfs in vi/etc/fstab

 
sriprabhu
Occasional Contributor

how to add newfs in vi/etc/fstab

please tell how to add newfs in vi/etc/fstab
and saving procedure
4 REPLIES 4
Bill Hassell
Honored Contributor

Re: how to add newfs in vi/etc/fstab

You need to explain what you want to do. /etc/fstab is a list of volumes and mountpoints. It is used by the mount and umount command. newfs erases (destroys) the contents of a volume.


Bill Hassell, sysadmin
Emil Velez
Honored Contributor

Re: how to add newfs in vi/etc/fstab



echo /dev/vg00/lvol12 /newfilesys defaults 0 2 >> /etc/fstab

if you use SMH to create the filesystem it will add it to /etc/fstab if you specify.
vishnu.khandare
Respected Contributor

Re: how to add newfs in vi/etc/fstab

Hi SriPabhu,

Its Easy to add newfs in vi /etc/fstab,
U must have root privilege's, as ur done with mount point creation.
vi /etc/fstab

For getting the mount point mounted automatically as system reboots u should add line in /etc/fstab as,
/dev/vg00/lvolX /ABC FILE_System delaylog 0 2,
ur logical volumeX its mount point name ABC
file system, delaylog, Backup Frequency, and Fsck Order
in best practice we use above values.
Dont forget to save entry in this filewhile u create mount point, to avoid juggling after reboot.....

To save this vi file-----> wq!

To create files system on newly created lvol
use this cmd
#newfs -F filesystem -o largefils /dev/vgXX/rlovlx

Hope this solves ur issues..
Don't forget to assign points..


Regards
Vishnu Khandare


You should deserve before U desire!!!!
aneez
Regular Advisor

Re: how to add newfs in vi/etc/fstab

hi


if you are creating Filesystem through sam , there is is an option for automatic saving into the /etc/fstab.

other wise follow the below steps

Making a file system usable involves four basic steps.

Create the new file system using the newfs command.
eg:
newfs -F vxfs -o largefiles /dev/vg03/rlvol5

Create a mount point for the file system using the mkdir command. A mount point is a directory on which the file system is mounted.

Eg:
mkdir /mnt

Mount the new file system on the mount point using the mount command.

Eg:
mount -F vxfs /dev/vg03/lvol04 /mnt


Create an entry in the /etc/fstab file for the file system so that it is automatically mounted every time you boot up your system.
A typical entry for a file system may be as follows.


Eg:
/dev/vg03/lvol4 /mnt vxfs delaylog 0 2


if any doubt feel free to ask