1833599 Members
3465 Online
110061 Solutions
New Discussion

file system

 
SOLVED
Go to solution
Grayh
Trusted Contributor

file system

How to create a 100GB (/oracle) filesystem


newfs ??
15 REPLIES 15
James R. Ferguson
Acclaimed Contributor

Re: file system

Hi:

Yes, 'newfs' is what one uses to create a filesystem. See the manpages (your friend! for more information, in particular 'newfs_vxfs(1M)'.

Regards!

...JRF...
Grayh
Trusted Contributor

Re: file system

Hi JRF..

Thank you..

I actually have VG01...

how do I go from there
Patrick Wallek
Honored Contributor
Solution

Re: file system

You need to first create a logical volume.

# man lvcreate

for details on how to do that.

You can then use newfs on that LV.

# man newfs

for details.
Grayh
Trusted Contributor

Re: file system

# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk4_p2

# vgdisplay
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4356
VGDA 2
PE Size (Mbytes) 32
Total PE 4347
Alloc PE 998
Free PE 3349
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 2178g
VG Max Extents 69696

# cat /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 vxfs tranflush 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2


Can you help me out with the steps plz
Grayh
Trusted Contributor

Re: file system

Also for /oracle of 100 G which one is recommended ----hsf or vxfs
James R. Ferguson
Acclaimed Contributor

Re: file system

Hi (again):

I suggest you read chapter-6 of this document:

http://docs.hp.com/en/B2355-90950/index.html

I would urge you *NOT* to add non-standard, non-operating system filesystems and logical volumes into vg00. Keep vg00 devoted to the standard HP-UX logical volumes. This makes upgrades, cloning and disaster recovery much cleaner and easier.

Regards!

...JRF...
Grayh
Trusted Contributor

Re: file system

I have created VG01 on the second disk... But they want me to create the filesystem on the first disk itself...

Can you give me a push/Starting from where I can carry on...

maybe shell i create a new VG or directly shell i start from lvcreate
Grayh
Trusted Contributor

Re: file system

Shell I create a VG with fs of 100G

what is the command to make it 100 G





James R. Ferguson
Acclaimed Contributor

Re: file system

Hi (again):

HFS filesystems are deprecated. Use VxFS ones.

> I have created VG01 on the second disk... But they want me to create the filesystem on the first disk itself...

What volume group? You only have vg01 in your 'lvmtab'. Basically:

# pvcreate /dev/rdsk/
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01
# lvcreate -L 100000 -n lvol1 /dev/vg01
# newfs -F vxfs -v -o largefiles /dev/vg01/rlvol1

# cat << !EOF >> /etc/fstab
/dev/vg01/lvol1 /oracle vxfs rw,suid,largefiles,delaylog,datainlog 0 2
!EOF

# mount -a

Regards!

...JRF...
Grayh
Trusted Contributor

Re: file system

# ioscan -kfnC disk
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
disk 3 0/2/1/0.0.0.0.0 sdisk CLAIMED DEVICE HP DG146BABC
F
/dev/dsk/c0t0d0 /dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s2
/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0 /dev/rdsk/c0t0d0s3
/dev/dsk/c0t0d0s2 /dev/rdsk/c0t0d0s1
disk 2 0/2/1/0.0.0.1.0 sdisk CLAIMED DEVICE HP DG146BABC
F
/dev/dsk/c0t1d0 /dev/rdsk/c0t1d0
# pvcreate /dev/rdsk/c0t0d0
Physical volume "/dev/rdsk/c0t0d0" has been successfully created.
# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk4_p2
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01
Usage:
For creating version 1.0 volume group,
vgcreate
[-V 1.0]
[-f]
[-A Autobackup]
[-x Extensibility]
[-e MaxPhysicalExtents]
[-l MaxLogicalVolumes]
[-p MaxPhysicalVolumes]
[-s PhysicalExtentSize]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath ...

For creating version 2.x volume group,
vgcreate -V Version -S VolumeGroupSize -s PhysicalExtentSize
[-A Autobackup]
[-x Extensibility]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath ...

For volume group version 2.x,
vgcreate -V Version -E
{-S VolumeGroupSize |
-s PhysicalExtentSize}

Note: The "-f" option is not available for volume group version 2.0 or h
igher.
More arguments required.
#
Grayh
Trusted Contributor

Re: file system

# lvcreate -L 102400 -n oracle vg01
lvcreate: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
Patrick Wallek
Honored Contributor

Re: file system

Well, according to the 'strings /etc/lvmtab' output you provided earlier you only have VG00.

So if you want VG01 to have the other disk, you must create.

With the vgcreate statement you ran earlier you did not supply a disk to create the VG on. Try the vgcreate again, but specify the disk to use as well and then try your lvcreate statement.

# man vgcreate
for more information
SKR_1
Trusted Contributor

Re: file system

vgcreate -v 2.0 -s pe_size vg_size /dev/vg01 /dev/disk

Thanks

SKR
Grayh
Trusted Contributor

Re: file system

Thanks everyone...
SKR_1
Trusted Contributor

Re: file system

Typo error

Full command

vgcreate -v 2.0 -s 32 -S 2t /dev/vg01 /dev/disk

Thanks

SKR