Sponsored Content
Operating Systems HP-UX Steps to Create a FileSystem HP-UX Post 302216751 by veer on Monday 21st of July 2008 05:48:30 AM
Old 07-21-2008
In HPUX the default disk manager is LVM. So steps as per LVM would be:
1) #vgdisplay VOLGRPNAME
for e.g. vgdisplay /dev/vg01
This should be done to check whether u have enough extents free to create a file system of the required size. Also just make sure the the Physical volumes or Hard disks are mirrored or not. Bcos If mirrored then the Free PEs available should be divided by 2 for 2 no. of hard disks.

2) #lvcreate -L SizeM (-n lvname) /dev/vg01
-n is optional u can give any name u like or the filesystem name being created. for .e.g lvcreate -L 100M -n mytmp /dev/vg01
This will create LV of size 100MB /dev/vg01/mytmp and /dev/vg01/rmytmp or else without -n would create /dev/vg01/lvol6 and /dev/vg01/rlvol6, if lvol5 already exists.

3) Now time to create FIlesystem.
Remember the default File system is mentioned on most UNIX systems and so on HPUX system in /etc/default/fs. The default mentioned is VXFS if u have BASE JFS product atleast installed or else will be HFS.
#newfs /dev/vg01/rmytmp
The above will create a new VXFS filesystem with NOLARGEFILES and NOQUOTA arrangement. If u want to enable them then u will need to modify the cmd line like
#newfs -o largefiles,quota /dev/vg01/rmytmp
This is appropriate for files being created above 2GB in size and u can put quota system for users too.
NOTE: the lv name should be starting with 'r' like 'rmytmp'.
4) To make the filesystem available after reboot make the entry in /etc/fstab file.
 

9 More Discussions You Might Find Interesting

1. Solaris

How to create a 2 TB UFS filesystem?

Hi, I have a 2,1 TB RAID0 Array (3- 750GB discs). I have Solaris 10 x86 installed. When I try to create a volume on this drive I receive the following error: " WARNING: /pci@0/pci8086/..../sd@6,0 (sd7) disk capacity is too large for current cbd length " I assume I can not format... (5 Replies)
Discussion started by: narrok
5 Replies

2. SCO

create filesystem on file

Hello, iam pretty new to SCO, installed it yesterday in vm. Now, i'd like to create a filesystem on a file like you can do on lnx or bsd. But seems not possible for me to do so on SCO OpenServer 6.0.0. Thats what i get: bash-3.00# uname -a SCO_SV scosysv 5 6.0.0 i386 bash-3.00# mkfs... (0 Replies)
Discussion started by: user5
0 Replies

3. Solaris

what command was used to create a filesystem

How do we determine what command was used (either newfs or mkfs) to create a filesystem? Thanks, (2 Replies)
Discussion started by: Pouchie1
2 Replies

4. Shell Programming and Scripting

How to create ext3 filesystem on regular file?

After doing something like: dd if=/dev/zero of=ext3.img bs=1024 count=1048576 I'd like to put an ext3 filesystem on ext3.img. What should I run? Thanks (2 Replies)
Discussion started by: stevenswj
2 Replies

5. Red Hat

how to create a Filesystem

Hi everybody, I work with UNIX-AIX OS, I have to install db2 connect , somebody could explain to me how to create a Filesystem?, user, group, and password? ( I read a little and I know there many types of Filesystems) I have no idea how to do it, Linux version 2.6.18-92.el5... (2 Replies)
Discussion started by: lauelmar
2 Replies

6. AIX

How to create a filesystem with the correct computation of PP

Hi everyone, im having a problem with the computation of the PP size for creating a filesystem. for example my requirement is to create a new filesystem with 10gig of system on aix 5.1 and aix 5.3 system. here's the result when i run lsvg vgSAN-sparkle could any provide me an exact... (3 Replies)
Discussion started by: cwiggler
3 Replies

7. UNIX for Dummies Questions & Answers

hwo to find shared filesystem and local filesystem in AIX

Hi, I wanted to find out that in my database server which filesystems are shared storage and which filesystems are local. Like when I use df -k, it shows "filesystem" and "mounted on" but I want to know which one is shared and which one is local. Please tell me the commands which I can run... (2 Replies)
Discussion started by: kamranjalal
2 Replies

8. AIX

Mount Filesystem in AIX Unable to read /etc/filesystem

Dear all, We are facing prolem when we are going to mount AIX filesystem, the system returned the following error 0506-307The AFopen call failed : A file or directory in the path name does not exist. But when we ls filesystems in the /etc/ directory it show -rw-r--r-- 0 root ... (2 Replies)
Discussion started by: m_raheelahmed
2 Replies

9. Solaris

ZFS flash install "Unable to create Filesystem error"

Hi, I am trying to get an HPz420 workstation instaled (zfs root pool) via a jump-start server. I have a zfs image (from this workstation) the Solaris release is 10 1/13 update 11. I use a sparc U25 install server, upgraded to the same solaris build 10 1/13. This server is configured to install... (8 Replies)
Discussion started by: sc0rpie
8 Replies
File::Finder::Steps(3pm)				User Contributed Perl Documentation				  File::Finder::Steps(3pm)

NAME
File::Finder::Steps - steps for File::Finder SYNOPSIS
## See File::Finder for normal use of steps ## subclassing example: BEGIN { package My::File::Finder; use base File::Finder; sub _steps_class { "My::File::Finder::Steps" } } BEGIN { package My::File::Finder::Steps; use base File::Finder::Steps; sub bigger_than { # true if bigger than N bytes my $self = shift; my $bytes = shift; return sub { -s > $bytes; } } } my $over_1k = My::File::Finder->bigger_than(1024); print "Temp files over 1k: "; $over_1k->ls->in("/tmp"); DESCRIPTION
"File::Finder::Steps" provide the predicates being tested for "File::Finder". STEPS METHODS These methods are called on a class or instance to add a "step". Each step adds itself to a list of steps, returning the new object. This allows you to chain steps together to form a formula. As in find, the default operator is "and", and short-circuiting is performed. or Like find's "or". left Like a left parenthesis. Used in nesting pairs with "right". right Like a right parenthesis. Used in nesting pairs with "left". For example: my $big_or_old = File::Finder ->type('f') ->left ->size("+100")->or->mtime("+90") ->right; find($big_or_old->ls, "/tmp"); You need parens because the "or" operator is lower precedence than the implied "and", for the same reason you need them here: find /tmp -type f '(' -size +100 -o -mtime +90 ')' -print Without the parens, the -type would bind to -size, and not to the choice of -size or -mtime. Mismatched parens will not be found until the formula is used, causing a fatal error. begin Alias for "left". end Alias for "right". not Like find's "!". Prefix operator, can be placed in front of individual terms or open parens. Can be nested, but what's the point? # list all non-files in /tmp File::Finder->not->type('f')->ls->in("/tmp"); true Always returns true. Useful when a subexpression might fail, but you don't want the overall code to fail: ... ->left-> ...[might return false]... ->or->true->right-> ... Of course, this is the find command's idiom of: find .... '(' .... -o -true ')' ... false Always returns false. comma Like GNU find's ",". The result of the expression (or subexpression if in parens) up to this point is discarded, and execution continues afresh. Useful when a part of the expression is needed for its side effects, but shouldn't affect the rest of the "and"-ed chain. # list all files and dirs, but don't descend into CVS dir contents: File::Finder->type('d')->name('CVS')->prune->comma->ls->in('.'); follow Enables symlink following, and returns true. name(NAME) True if basename matches NAME, which can be given as a glob pattern or a regular expression object: my $pm_files = File::Finder->name('*.pm')->in('.'); my $pm_files_too = File::Finder->name(qr/pm$/)->in('.'); perm(PERMISSION) Like find's "-perm". Leading "-" means "all of these bits". Leading "+" means "any of these bits". Value is de-octalized if a leading 0 is present, which is likely only if it's being passed as a string. my $files = File::Finder->type('f'); # find files that are exactly mode 644 my $files_644 = $files->perm(0644); # find files that are at least world executable: my $files_world_exec = $files->perm("-1"); # find files that have some executable bit set: my $files_exec = $files->perm("+0111"); type(TYPE) Like find's "-type". All native Perl types are supported. Note that "s" is a socket, mapping to Perl's "-S", to be consistent with find. Returns true or false, as appropriate. print Prints the fullname to "STDOUT", followed by a newline. Returns true. print0 Prints the fullname to "STDOUT", followed by a NUL. Returns true. fstype Not implemented yet. user(USERNAME|UID) True if the owner is USERNAME or UID. group(GROUPNAME|GID) True if the group is GROUPNAME or GID. nouser True if the entry doesn't belong to any known user. nogroup True if the entry doesn't belong to any known group. links( +/- N ) Like find's "-links N". Leading plus means "more than", minus means "less than". inum( +/- N ) True if the inode number meets the qualification. size( +/- N [c/k]) True if the file size meets the qualification. By default, N is in half-K blocks. Append a trailing "k" to the number to indicate 1K blocks, or "c" to indicate characters (bytes). atime( +/- N ) True if access time (in days) meets the qualification. mtime( +/- N ) True if modification time (in days) meets the qualification. ctime( +/- N ) True if inode change time (in days) meets the qualification. exec(@COMMAND) Forks the child process via "system()". Any appearance of "{}" in any argument is replaced by the current filename. Returns true if the child exit status is 0. The list is passed directly to "system", so if it's a single arg, it can contain "/bin/sh" syntax. Otherwise, it's a pre-parsed command that must be found on the PATH. Note that I couldn't figure out how to horse around with the current directory very well, so I'm using $_ here instead of the more traditional "File::Find::name". It still works, because we're still chdir'ed down into the directory, but it looks weird on a trace. Trigger "no_chdir" in "find" if you want a traditional find full path. my $f = File::Finder->exec('ls', '-ldg', '{}'); find({ no_chdir => 1, wanted => $f }, @starting_dirs); Yeah, it'd be trivial for me to add a no_chdir method. Soon. ok(@COMMAND) Like "exec", but displays the command line first, and waits for a response. If the response begins with "y" or "Y", runs the command. If the command fails, or the response wasn't yes, returns false, otherwise true. prune Sets $File::Find::prune, and returns true. xdev Not yet implemented. newer Not yet implemented. eval(CODEREF) Ah yes, the master escape, with extra benefits. Give it a coderef, and it evaluates that code at the proper time. The return value is noted for true/false and used accordingly. my $blaster = File::Finder->atime("+30")->eval(sub { unlink }); But wait, there's more. If the parameter is an object that responds to "as_wanted", that method is automatically called, hoping for a coderef return. This neat feature allows subroutines to be created and nested: my $old = File::Finder->atime("+30"); my $big = File::Finder->size("+100"); my $old_or_big = File::Finder->eval($old)->or->eval($big); my $killer = File::Finder->eval(sub { unlink }); my $kill_old_or_big = File::Finder->eval($old_or_big)->ls->eval($killer); $kill_old_or_big->in('/tmp'); Almost too cool for words. depth Like find's "-depth". Sets a flag for "as_options", and returns true. ls Like find's "-ls". Performs a "ls -dils" on the entry to "STDOUT" (without forking), and returns true. tar Not yet implemented. [n]cpio Not yet implemented. ffr($ffr_object) Incorporate a "File::Find::Rule" object as a step. Note that this must be a rule object, and not a result, so don't call or pass "in". For example, using "File::Find::Rule::ImageSize" to define a predicate for image files that are bigger than a megapixel in my friends folder, I get: require File::Finder; require File::Find::Rule; require File::Find::Rule::ImageSize; my $ffr = File::Find::Rule->file->image_x('>1000')->image_y('>1000'); my @big_friends = File::Finder->ffr($ffr) ->in("/Users/merlyn/Pictures/Sorted/Friends"); contains(pattern) True if the file contains "pattern" (either a literal string treated as a regex, or a true regex object). my $plugh_files = File::Finder->type('f')->contains(qr/plugh/); Searching is performed on a line-by-line basis, respecting the current value of $/. EXTENDING A step consists of a compile-time and a run-time component. During the creation of a "File::Finder" object, step methods are called as if they were methods against the slowly-growing "File::Finder" instance, including any additional parameters as in a normal method call. The step is expected to return a coderef (possibly a closure) to be executed at run-time. When a "File::Finder" object is being evaluated as the "File::Find" "wanted" routine, the collected coderefs are evaluated in sequence, again as method calls against the "File::Finder" object. No additional parameters are passed. However, the normal "wanted" values are available, such as $_, $File::Find::name, and so on. The "_" pseudo-handle has been set properly, so you can safely use "-X" filetests and "stat" against the pseudo-handle. The routine is expected to return a true/false value, which becomes the value of the step. Although a "File::Finder" object is passed both to the compile-time invocation and the resulting run-time invocation, only the "options" self-hash element is properly duplicated through the cloning process. Do not be tempted to add additional self-hash elements without overriding "File::Finder"'s "_clone". Instead, pass values from the compile-time phase to the run-time phase using closure variables, as shown in the synopsis. For simplicity, you can also just mix-in your methods to the existing "File::Finder::Steps" class, rather than subclassing both classes as shown above. However, this may result in conflicting implementations of a given step name, so beware. SEE ALSO
File::Finder BUGS
None known yet. AUTHOR
Randal L. Schwartz, <merlyn@stonehenge.com> COPYRIGHT AND LICENSE
Copyright (C) 2003,2004 by Randal L. Schwartz, Stonehenge Consulting Services, Inc. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available. perl v5.10.0 2005-04-08 File::Finder::Steps(3pm)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy