Mostrando postagens com marcador Filesystem. Mostrar todas as postagens
Mostrando postagens com marcador Filesystem. Mostrar todas as postagens

Renaming a logical volume

segunda-feira, 1 de outubro de 2012

old name: /dev/vgwow/lvol1
new name: /dev/vgwow/data_lv

# umount /dev/vgwow/lvol1
# ll  /dev/vgwow/lvol1                                      take note of the minor ( e.g 0x010001 )
brw-r-----   1 root       root        64 0x010001 Dec 31 17:59 lvol1
#       create new logical volume name
# mknod  /dev/vgwow/rdata_lv c 64 0x010001
# vi /etc/fstab                                               ( reflect the new logical volume  )
# mount -a

# rmsf /dev/vgwow/lvol1
# rmsf /dev/vgwow/rlvol1

How to extend root filesystem - Usint DRD, Ignite and LVM maintenance mode

quarta-feira, 18 de janeiro de 2012

First method, using DRD:


Patches necessarie:


HP-UX 11i v2 - Jan 2012 (DRD_1123_WEB1201.depot)
HP-UX 11i v3 - Jan 2012 (DRD_1131_WEB1201.depot)
If you have installed the DRD you can do through it.
1 - Clone your system using the follow procedure:
Clone with DRD


2 - Mount your clone:
Use the "drd mount", this comand locate a inactive system image and mount it. The drd mount command automatically chooses the mount point for the inactive system image.
# drd mount


3 - Umount the "root":
# umount /dev/drd00/lvol3

4 - Now extend it:
# lvextend -l 999 /dev/drd00/lvol3

# extendfs -F vxfs /dev/drd00/rlvol3
# mount /dev/drd00/lvol3 /var/opt/drd/mnts/sysimage_001
5 - Check:
# bdf /var/opt/drd/mnts/sysimage_001


6 - Umount and activate:
# drd umount
# drd activate


7 - Reboot the server with the new DRD image:
# shutdown -y -r 0




Second method, LVM maintenance mode :


Make sure that the vg00 is un-mirrored and the space to extend the root LV is available in the same disk as continguous physical extents because the root volume allocation policy must be contiguous.
If the adjacent physical extents are occupied by any other LV move that logical volume to some other disk using pvmove command.
# pvmove -n /dev/vg00/lvolx /dev/dsk/c0txd0 /dev/dsk/c0txd0


Shutdown the machine and interrupt the normal boot process by pressing any key. From the boot admin prompt type boot pri isl you will get the isl prompt.
ISL> hpux -lm


This will take you to the logical volume maintanence mode. Don't try to mount any logical volume and don't switch to multiuser mode or a different runlevel.


The root LV will now be mounted on /dev/root instead of /dev/vg00/lvolx
Now you can execute the extendfs command on the root logical volume:
# extendfs -F vxfs /dev/vg00/rlvol3


Note down the alternate superblock locations and reboot the macine using
# reboot -n


This will cause the system to not sync the old superblock back to the filesystem and damage it.
When you boot the system normally now you will get all the allocated space for the root filesystem.
Now you will notice that the root volume is still mounted on /dev/root rather than /dev/vg00/lvol3. To correct this you remove the /etc/mnttab and you will find bdf now displays the correct logical volume.




Third method, Ignite:


  1. Make sure any external devices that need to be configured at cold-install are connected to the target system and are turned on and operational.
  2. Insert the HP-UX DVD into the drive.
  3. Stop the autoboot by pressing any key.
    The boot console menu is displayed. If you need help, enter: HELP
  4. Search for bootable devices, using the choices displayed (for example, enter searchorsea). A table similar to this is displayed:
    Path#  Device Path       Device Type
    -----  -----------       -----------
    P0     TAPE              HP TAPE
    P1     LAN.1.2.3.4.5.6   1.2.3.4 
    P2     FWSCSI.6.0        IBM DDRS-34560WS

    Of the media listed, a fast/wide SCSI device (FWSCSI) is usually a disk, whereas a single-ended SCSI device (SCSI) can be a disk or CD/DVD drive.
  5. For a legacy hardware path, boot from the Tape drive using the listed path number. For the drive shown in the previous example (P0), enter:  BOOT P0
  6.  After a few minutes, at the Interact with IPL? prompt press n.
  7. Select:
    "Media only instalation"and
    "Advanced instalation"Click OK to advance to next screen.
  8. Now select:
    "
    Boot from CD/DVD, Recover from Tape"Click OK to advance to next screen.
  9. Now you can resize your FS on the filesystem tab.
  10. Click "go!" to finish.

Allow files greater than 2GB

segunda-feira, 9 de janeiro de 2012

You have different forms to do that, I'll show how to do with the fsadm.

# fsadm -F vxfs -o largefiles /filesystem 

Adding a new disk/lun in the system

Create the special files


# insf -Cdisk

Check your new disk

# ioscan -fnCdisk

Initialize the disk for use with LVM

# pvcreate -f /dev/rdsk/cXtXdX

Add your new disk in your VG

# vgextend vgXX /dev/dsk/cXtXdX

If your are using 11.31 isn't necessary run the "insf" command to create the special files, just the ioscan will be necessary.

Removing a lvol

domingo, 8 de janeiro de 2012

This's a rotine task for a System Administrator and very simple:

Follow a example to how remove a logical volume without requiring user confirmation:

# lvremove -f /dev/vg01/lvol5
 
This process can be done trough of SMH too.
 

If your VG is in shared mode you can't remove through lvremove.

Extending a filesystem

quinta-feira, 29 de dezembro de 2011

You can resize on line your filesystems just if your box has OnLineJFS.First of all verify if you have installed in your box OnLineJFS:

# swlist -l product | grep -i vxfs
# swlist -l product | grep -i online

Verify the free space:

#vgdisplay
Use the follow equation to calculate your free space:
((PE size * Free PE)/cur pv)=Free size to use in MB


Use the follow two  commands just if you have OnLineJFS

#lvextend -L 800 /dev/vgXX/lvolY  (extend logical volume rlvolY by 800MB)
#fsadm -F vxfs -b 800M /mountpointname (use fsadm to extend or extendfs when are not using JFS)

If you have OnLineJFS that's all :) but if you don't have it.. continue with the next steps :)

#umount /FILESYSTEM
#lvextend -L 300 /dev/vg00/FILESYSTEM   //where 300MB will be  your new size
#extendfs -F vxfs /dev/vg00/rFILESYSTEM
#mount /FILESYSTEM
If you are using samba:
stop the samba before process

You can do the same process through SMH (http://server:2381)
Look for OnlineJFS or AdvJournalFS

How to create a filesystem

Creating a filesystemYou can do that through the sam (logical volumes) or command line

Create the mount point
# mkdir path_of_your_mount_point

Create a logical volume
lvcreate -m 1 -L size(in MB) -n lvname VG
Use "-m 1" if you have a mirror.

Format the fs using vxfs
# newfs -F vxfs [ -o largefiles ] /dev/vg00/rnome  (use the raw name)
Use "-o largefiles" if you need create files greater than 2gb.

Mount the fs
# mount /dev/vg/lvname /mount_point
Add this filesystem on fstab using mount options as necessary for you.