Operating System - HP-UX
1832854 Members
3091 Online
110047 Solutions
New Discussion

Re: Problem with mount command

 
SOLVED
Go to solution
Alan Vargas
Regular Advisor

Problem with mount command

He

i try to mount a fs BUT this fs will be have all disk, /dev/dsk/c0t9d0 is my disk and i did the following step

pvcreate /dev/dsk/c0t9d0
mkdir /myfs/mydir
mount /dev/dsk/cot9d0 /myfs/mydir

but this operation failed,
Any idea

the /etc/fstab is already modified

Thanks

10 REPLIES 10
David Child_1
Honored Contributor

Re: Problem with mount command

You need to create a file system on the disk first:

mkfs -F vxfs [-o largefiles] /dev/dsk/c0t9d0
David Child_1
Honored Contributor

Re: Problem with mount command

Sorry, I forgot to mention; if you are just using the disk without LVM then you don't need to perform the pvcreate. That just creates the LVM information on the disk.

David
Uday_S_Ankolekar
Honored Contributor

Re: Problem with mount command

To mount a filesystem you must create a logical volume and it should be a part of volume group
once that is done you have to run newfs to create a file system and then you can mount it.
A logical volume that DOES NOT contain a file system cannot be mounted.

-USA..

Good Luck..
Mobeen_1
Esteemed Contributor

Re: Problem with mount command

Alan,
I concur with Uday posting.

The following is hierarchy in the Unix file systems

Volume Group (You add HDD to the VG)
Logical Volume (These are created in VGs)
File System (This is created in a LV)

Then you can mount the file system.

regards
Mobeen
Victor BERRIDGE
Honored Contributor

Re: Problem with mount command

Hi,
Followin the previous postings, you have now since you did a pvcreate the choice of adding the PV to an existing VG using vgextend command or create a new VG (vgcreate)...
Once you decided which option, create a logical volume using lvcreate then a filesystem with newfs, but all this can be done using SAM which will guide you since it is interactive...

All the best
Victor
Naveej.K.A
Honored Contributor

Re: Problem with mount command

Hi,

#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgcreate /dev/vg01
#vgimport /dev/vg01 /dev/dsk/c0t9d0
#vgchange -a y /dev/vg01
#ll /dev/vg01/lvol* and mount the volumes

Create lvols
lvcreate vg01
lvextend -L 8000 /dev/vg01
(creates a partition of 8GB)

create filesystem.
mkfs -F vxfs -o largefiles /dev/vg01/lvol1

now modify the /etc/fstab to include /dev/vg01/lvol1 instead of /dev/dsk/c0t9d0 and then do a mountall to mount the filesystem.

Regards,
Naveej


practice makes a man perfect!!!
Suraj Singh_1
Trusted Contributor
Solution

Re: Problem with mount command

Hi,

Do you require to create filesystem on whole disk or on LVM?

From your post i understand that you nbeed to create the fs on whole disk.

Perform the following steps:

I) If you have already created physical volume on that disk, remove it:
# pvremove /dev/rdsk/c0t9d0

II) Make filesystem on this disk:
# newfs -F vxfs /dev/rdsk/c0t0d0

If you need to pass some options, you may do want to see the man pages of newfs.

III) Mount the filesystem:
# mount -F vxfs /dev/dsk/c0t9d0 /myfs/mydir.

Regards,
Suraj
What we cannot speak about we must pass over in silence.
Alan Vargas
Regular Advisor

Re: Problem with mount command

He everyone

I did not tell you that i do not use LVM command, the /etc/fstab must be in my server in this way

prueba: more /etc/fstab
# System /etc/fstab file. Static information about the file systems
# See fstab(4) and sam(1M) for further details on configuring devices.
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /home vxfs delaylog 0 2
/dev/vg00/lvol5 /opt vxfs delaylog 0 2
/dev/vg00/lvol6 /setm vxfs delaylog 0 2
/dev/vg00/lvol7 /tmp vxfs delaylog 0 2
/dev/vg00/lvol8 /usr vxfs delaylog 0 2
/dev/vg00/lvol9 /var vxfs delaylog 0 2
/dev/dsk/c0t8d0 /setm/base1 hfs defaults 0 2
/dev/dsk/c0t10d0 /setm/base hfs defaults 0 2
prueba:

you can see that last part file there is 2 disk mount without LVM command (without VG), i try to following but ...

# pvcreate /dev/rdsk/c0t9d0 = ok
# mkdir /setm/base = ok
# mount /dev/dsk/c0t9d0 /setm/base
/dev/dsk/c0t9d0: unrecognized file system = ERROR


I need to use to the Whole-disk Approach

Suraj Singh_1
Trusted Contributor

Re: Problem with mount command

Hi Alan,

In order to create a filesystem using "whole disk" you are not supposed to run "pvcreate" command.

Perform the steps outlined in my post above, and you should be able to mount the same.

Regards,
Suraj
What we cannot speak about we must pass over in silence.
Alan Vargas
Regular Advisor

Re: Problem with mount command

Thanks very much Suraj Singh, it works like you told me

thanks again