Operating System - HP-UX
1753797 Members
7360 Online
108799 Solutions
New Discussion юеВ

Re: command for HDD resize

 
SOLVED
Go to solution
Rudensky Igor
Occasional Contributor

command for HDD resize

Good day.
What command uses in HP-UX OS to resize the HDD (like fdisk /dev/hda in linux OS)
6 REPLIES 6
Antonio Cardoso_1
Trusted Contributor

Re: command for HDD resize

# diskinfo /dev/rdsk/c2t1d0
SCSI describe of /dev/rdsk/c2t1d0:
vendor: HP 73.4G
product id: MAS3735NC
type: direct access
size: 71687369 Kbytes
bytes per sector: 512
Janne_5
Advisor
Solution

Re: command for HDD resize

diskinfo shows you the size of the disk.
If you want to resize you can do it from System Administrator Manager (sam). Launch SAM as root with sam command.
Rudensky Igor
Occasional Contributor

Re: command for HDD resize

This command (I look your description) show information about HDD, but I want to resize HDD
Onur Karakan
Advisor

Re: command for HDD resize

Hello Rudensky,
Why you are asking that i don't understand. but as i know there is no command to resize the HD. Because when you add a new HD to the system you can only create it with its full size. You can resize lvs or vgs. but it is not possible to change the size of HD.
Prashant Zanwar_4
Respected Contributor

Re: command for HDD resize

Disk you cannot resized,

mediainit / diskinfo / fsadm / lvextend / mkfs/ newfs you use with HPUX for FS/ hard disk operations..

Check man pages for details
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Patrice Le Guyader
Respected Contributor

Re: command for HDD resize

Hi Igor,

As you should have already seen on LVM, you have some Volume Group (as vg00 for exemple). This Volume Groupe gather many disks called Physical Volume (PV), inside this VG you can cut out Logical Volumes (LV) which will be your futur FileSystems.The unit for LV is the PE (Physical Extend). It's these LV than you can mount on directories after creating the FS structure. You can now find LVM on linux (RedHat, Centos)

To create a Volume Groupe :
(1) pvcreate /dev/rdsk/cxtxdx (see manpage for option)
(2) mkdir /dev/
(3) mknod /dev//group c 64 0x??0000
?? is the minor number. It's an hexa number on two digit.
(4) vgcreate /dev/ /dev/dsk/cxtxdx
You can add several disk in the vgcreate or add them after see (5):
(5) vgextend /dev/ /dev/dsk/cxtxdx /dev/dsk/cxtxdy
You can add severals disks too.

Once you have added all the disk to your VG you can now cut out slices (LV) and format them in vxfs format.
(6) lvcreate -l SIZE /dev/
with SIZE in PE Number (Ex: 4Go -> 1024x4Mo so -l 1024)
lvcreate -L SIZE /dev/ with SIZE IN Mo (see manpage).
(7) newfs -F vxfs -o largefiles -b 8192 /dev//
-o largefiles : no comments
-b 8192 is the size of the bloc of the file system, for oracle FS by exemple.
(8) mount /dev// / (With option if you need; see manpage)

So after If you have to "resize" what you call your "disk" I hope it's the LVol otherwise there's noway to resize a disk. According to me, (by making the analogy) what you do with fdisk /dev/hda is to write the partition table a cutting which can be view as the equivalent of the lvols definition and sizes.

So to resize a lvol two possibilities :

(1) You have OnlineJfs and then you can do
(a)-- make a : lvextend -L of the concerned Lvol (see manpage for options)
(b)-- make a : fsadm -F vxfs -b m /

(2) You don't have OnlineJfs :
(a) Umount the FS
(b)Same as 1a above.
(c) extendfs -F vxfs /dev//r
(d) mount /dev// /

I hope I have forget nothing and I didn't make errors. :-)

Hope this helps
Kenavo
Pat
Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.