1832697 Members
2828 Online
110043 Solutions
New Discussion

File systems

 
SOLVED
Go to solution
Vogra
Regular Advisor

File systems

Hi All!
using SAM, I can configure file system without problem, but I know that is possible to use command line and address which controller I want to use. It's true? How can I?
Thanx.
We are spirits in the material world
11 REPLIES 11
John Waller
Esteemed Contributor

Re: File systems

Claudio,

Believe me unless you are comfortable with what you are doing I would stay with SAM. To do it manually via command line you need to be familiar with at least pvcraete, vgcreate, vgextend, lvcreate, lvextend, newfs plus many more commands. You also need to have a resonable understanding of your hardware layout so you know which path a particular disk in connected too.
Edward Alfert_2
Respected Contributor

Re: File systems

#vgcreate /dev/vg?? /dev/dsk/c?t?d?
#lvcreate -l /dev/vg??
#newfs -F vxfs /dev/vg??/lvol??
#mkdir
#mount /dev/vg??/lvol?? /
then edit /etc/fstab so it is mounted automatically during boot
"Do what you love and you will never work a day in your life." - Confucius
Santosh Nair_1
Honored Contributor

Re: File systems

Claudio,

I'm not entirely sure what you're trying to do, but if you're trying to create filesystem using the command line utilities, then you would do the following steps.

find an unused disk:
ioscan -kfnC disk #lists all the disks on the system
strings /etc/lvmtab|grep dsk # lists disks that are used on the system

Using one of the disks NOT reported by the strings command:

pvcreate /dev/rdsk/c#t#d# # where c#t#d# is one of the disks shown above

create the VG
mkdir /dev/vg??
mknod /dev/vg??/group c 64 0x0nn0000

where vg?? is the name of the VG that you're trying to create and nn is unique minor number (determined by checking ll /dev/*/group)

vgcreate /dev/vg?? /dev/dsk/c#t#d#
vgchange -a y vg??

then create the LVs and filesystems

lvcreate -L ## /dev/vg??
newfs -F vxfs /dev/vg??/lvol??
mount /dev/vg??/lvol?? /

where ## is the size of the LV you're creating, vg?? is the VG created in the previous steps, and /dev/vg??/lvol?? is the LV created in the lvcreate step and mountpoint is where you're trying to mount the filesystem.

For more information on this check the Managine Systems and Workgroups docs at:

http://docs.hp.com:80/hpux/onlinedocs/B2355-90742/B2355-90742.html

-Santosh
Life is what's happening while you're busy making other plans
Vogra
Regular Advisor

Re: File systems

Hi All!
I have an A500 server (hpux11.0) and an array 12H with two controllers. Today only one controller is in use. I will connect he second and I would like to balance the load through the controller. But, if the system can do it automatically, no problem (I think not). How about?
Thanx.
We are spirits in the material world
Edward Alfert_2
Respected Contributor

Re: File systems

This is what i currently do.

I have a D390 with 2 controller and 2 external storage enclosures (each with 7 harddrives).

I'm striping accross multiple disks to increase performance (the vg with the database is striped accross 4 drives).

Then i have Mirror/UX and i am mirroring the two for safety as well as additional performance. It will read the first available.

i have created separate physical volumes and when i mirror the drives i tell it to pick one copy from each physical volume so that one each is on separate controllers, separte external units, and of course separate harddrives.

Although you can use command line to do all this, because of the complexity i used SAM. Very easy to do that way. I don't mind doing simple creation of lvol or vg using command line but something like the above i always use SAM.
"Do what you love and you will never work a day in your life." - Confucius
Joseph C. Denman
Honored Contributor
Solution

Re: File systems

Hi Claudio,

The system does not do it automatically, you have to manually set it up at vg creation. The best way I have found is a recommendation from King Clay.

1. You should only have 2 luns of equal size on your raid. Striping of the disk is done automatically on the autoraid. Try not to use more the 60% of the available disk space to maintain 0/1 raid level.
2. Run ioscan -fnC disk. You will notice 2 paths to each lun.

such as
lun on scsi id 0 may be
/dev/dsk/c1t2d0
/dev/dsk/c2t1d0
lun on scsi id 1 may be
/dev/dsk/c1t2d1
/dev/dsk/c2t1d1

2. Get the pv ready for vg
pvcreate /dev/rdsk/c1t2d0
pvcreate /dev/rdsk/c1t2d1
3. create your group files
umask 022
cd /dev
mkdir vgraid1
cd vgraid1
mknod group c 64 0x??0000
chmod 644 group
4. create vg
vgcreate /dev/vgraid1 /dev/dsk/c1t2d0 /dev/dsk/c2t1d0
vgchange -a y /dev/vgraid1

5. extend your vg vgextend /dev/vgraid1 /dev/dsk/c1t2d1 /dev/dsk/c2t1d1

6. create your lv's

lvcreate -i 2 -I 64 -L size_in_mb -n lvol? /dev/vgraid1

7. create the fs
newfs -F vxfs /dev/vgraid1/rlvol?

8. create the mount point
mkdir /mountpoint_name

9. mount the fs
mount -F vxfs /dev/vgraid1/lvol? /mountpoint_name

10. add entry to /etc/fstab

11. change the timeout for the devices. The raid needs a larger timeout than the default.

pvchange -t 120 /dev/rdsk/c1t2d0
pvchange -t 120 /dev/rdsk/c1t2d1

This is just a rough example of what I do, mostly based on several post. It works great. Data is spread over both controlers in 64K chunks.

Hope this helps.

...jcd...
If I had only read the instructions first??
Deshpande Prashant
Honored Contributor

Re: File systems

HI
Certainly you can create filesystems using command line.
1. First find the available disks using
#ioscan -fnC disk
2. Locate the free disks, if you are not sure, you may have to use pvdisplay on each disk to find out if it's free.
3. Then #
pvcreate /dev/rdsk/c#t#d#
4. Create the VG
#mkdir /dev/vg??
find out the next free group number.
#ls -l /dev/*/group will list all group files in system.
#mknod /dev/vg??/group c 64 0x0nn0000
#vgcreate /dev/vg?? /dev/dsk/c#t#d#
#vgchange -a y vg??

5.Create the LVs and filesystems

#lvcreate -L ## /dev/vg??
#newfs -F vxfs /dev/vg??/lvol??
#mount /dev/vg??/lvol?? /
6. Add entries in /etc/fstab for created filesystems.
7. Add alternate links if any using vgextend command.


All above command have different options, the default options might be different from you might need in environment.


Good luck.
Prashant.

Take it as it comes.
John Waller
Esteemed Contributor

Re: File systems

Claudio,

You didn't mention before you had a 12H array. I presume it works similar to an FC60, if so then consider the following idea.

Try using alternate links.

You will have already partitioned your array using the array manager software so you have a number of smaller partitions which are accessed by the HP as single disk devices (i.e /dev/dsk/c1t1d0, /dev/dsk/c1t2d0 etc.), where the number after the c indicates the controller on the server. I believe that when you connect your second controller you will see extra disk devices added (/dev/dsk/c2t1d0 , /dev/dsk/c2t2d0 etc.). where the t1d0 part of the device corresponds to the relevent c1 device. Using the vgextend command, add these to you volume groups as follows ensuring you match the correct controller 1 device with the coresponding controller 2 device.

# vgextend /dev/vgnn /dev/dsk/c?t?d?

This way if you loose a contoller you can still access your data via the second controller. To balance the load more evenly when you create your VG's alternate which device you add first
e.g.

1st VG craete with c1t1d0 and extend with c2t1d0 ,
2nd VG create with c2t2d0 and extend with c1t2d0
3rd VG create with c1t3d0 and extend with c2t3d0

etc. etc. etc.

I hope this is what you are looking for.
Vogra
Regular Advisor

Re: File systems

Hi John!
I have been reading some materials about it. about my system... I had a D270/2 connected to an array 12H. This connetion had two cables of data(controller X and Y). Then, I had to connect an A500 server to the same array, it was done through controller X and the D270/2 keep using the controller Y. It situation was not supported from HP, but I had to do it.
Well, I migrate the systems (ERP/ORACLE) from D270/2 to A500 and now I have to reconnect the second cable from A500 server to array, to restabilish redundant controller connection. But, (I said but,) I heard that is possible to especificate how controller I want to be used to connect to specific disk (and some people already show me how to). Now, my doubt is: if I already have the file system configured, it's possible to change the controller that access one (or more) disk ?
thanx in advance.
We are spirits in the material world
A. Clay Stephenson
Acclaimed Contributor

Re: File systems

Hi Claudio:

Here is how you do what you want to give you multiple data paths for speed and alternate data paths for redundancy:

D270 Controller 1 (SCSI ID 6) --> 12H Controller X --> A500 Controller 1 (SCSI ID 7)

D270 Controller 2 (SCSI ID 6) --> 12H Controller Y --> A500 Controller 2 (SCSI ID 7)

The FWD controllers on you D-box have jumpers to allow you to set the SCSI ID to a different value than the default 7.

This is essentially how you would connect your 12H in a ServiceGuard cluster. Note that the two controllers must have different SVSI ID's and that the controllers serve as the terminators. MAKE CERTAIN THAT ONLY ONE OF THE HOSTS ACCESSES ANY GIVEN LUN. LUN's 0 & 1 could be could as a volume group for you D box and LUN's 2 & 3 could be used as a volume group for your A box. It is perfectly legal for boths hosts to have both volume groups active at the ssame time.

If you have a volume group with two LUN's configured but both are now primary path'ed through 12H controller X, you can fix that as well. Do a vgchange a n /dev/vgxx and a vgexport -m /tmp/vgxx.map. Then recreate your /dev/vgxx directory and group file as usual. You then vgimport but on every other LUN reverse the order of the PV paths to make one LUN's primary path go through controller X (alternate Y) and the next LUN's primary path go through controller Y (alternate X).

I hope I have been semi-clear, Clay
If it ain't broke, I can fix that.