Operating System - HP-UX
1752808 Members
6989 Online
108789 Solutions
New Discussion юеВ

Putting bigger discs in server

 
SOLVED
Go to solution
Sridhar Bhaskarla
Honored Contributor

Re: Putting bigger discs in server

Hi Mark,

The command I usually use is 'fbackup' to copy data across the filesystems. I found it very reliable. It compares the files on the source and destination directories and copy only the files that changed/additional on the source directory.

#cd /srcdir;/usr/sbin/fbackup -i . -f - |(cd /dstdir; /usr/sbin/frecover -v -r -f -)

Try it on some test directories first before doing it on your production filesystems.

I assume other people might have answered the rest. Regarding your point 3) HP-UX doesn't care where the disks are located. The configuration is dependent on how you add the disks to the VG.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
bhavin asokan
Honored Contributor

Re: Putting bigger discs in server


hi,

vgexport and vgimport affects the /etc/lvmtab file and it adds or removes the block & character files in the respective vg.this is not creating any changes in your disks.

vgexport -s -p -v -m vg02.map /dev/vg02
command creates a map file with VGID and whatever the lvols within the /dev/vg02.
this file is a ascii file and you can see by more command.

-p is used for preview mode so that it will not remove the VG when creating map file.if you omit this it will remove the VG entry also from lvmtab file.

-s is used for shared mode .this option will include the VGID in the map file. at the time of importing you don't have to mention the pvs if you are using this option.
system will automatically findout the disks(which is connected to system)which is having same VGID and it will get added to specified VG .otherwise you should have to manually specify the pvs in that volume group.

-m used for specifying map file.if you are not using map file , at the time of vgimport it will create the lvs with default naming convention. ie. lvol1 ,lvol2 ,lvol3 ,.... in this order. if you are having some different names for lvols for your convenience like sales , admin (which you may have identified/mounted for using by specific depts) will not be imported on the same name with out map file.(map file contains the existing lvol names)



at the time of importing you can specify
first
vgimport -s -p -v -m vg02.map /dev/vg02
for checking .

then if no error use

vgimport -s -v -m vg02.map /dev/vg02.


you can import to the same system also if vg configuration getting corrupted or after installing OS in a new hdd you want to use the VG.
one situation where map file comes in use is below.
i implemented SAN switch recently.before implementing the switch i created the map file of all VGs .after implementing the switch all the disk devices(from the disk array) got changed.after i got new disk devices on my system using ioscan ,i exported all the VGs without preview option.
then i created the group files for each VGs and done the vgimport with map file successfully.

if you are using databases like oracle with raw filesystem ,the names of vgs/lvs are so important.


regds

MarkSyder
Honored Contributor

Re: Putting bigger discs in server

I've now copied all the data across and tried to run vgchange -a etc., but it tells me that the device is busy.

I'm the only person logged in to the server and I'm in a directory on a different vg. How do I get out of this?

Mark
The triumph of evil requires only that good men do nothing
bhavin asokan
Honored Contributor

Re: Putting bigger discs in server

hi,

did you unmounted all the lvols from that vg.unmount all the lvols (which is the part of vg you want to unmount)

assuming vg02 and its lvols are mounted on /mnt1 ,/mnt2 etc..

#fuser -cu /mnt1
#fuser -cu /mnt2
.............
............
............
if it shows any user on that mount point

#fuser -ku /mnt1
#fuser -ku /mnt2
.......
.........
.......
if it is not showing any user accessing that lvols then unmount that mount points.

#umount /mnt1
...
...


after that disable the vg

vgchange -a n vg02


regds,
MarkSyder
Honored Contributor

Re: Putting bigger discs in server

Thanks.

I thought fuser would be involved somewhere, but I've never used it and wasn't sure of the syntax.

Unfortunately, I'd gone home by the time this post came in, so everyone will have to wait till next Monday for their points - Friday afternoon is the only time I can do this job.

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: Putting bigger discs in server

One step forward?

I ran fuser -cu /int2 and got the result:

/int2: 18971o(root)

I then ran fuser -ku /int2 and appeared to get rid of this process.

I then ran vgchange again and got exactly the same result - Device busy. I reran fuser -cu etc. and the process had restarted.

Advice on Monday will be fine - I've got one phone call to make, then I'll be going home.

Mark
The triumph of evil requires only that good men do nothing
Robert-Jan Goossens_1
Honored Contributor

Re: Putting bigger discs in server

Hi Mark,

could descibe very short what you did before the vgchange ?

RJ
MarkSyder
Honored Contributor

Re: Putting bigger discs in server

You were quick off the mark Robert-Jan! One last post before I leave for the day.

fuser -cu /int2
fuser -ku /int2
vgexport -s -p -v -m /tmp/vg02.mymap /dev/vg02
vgchange -a n /dev/vg02

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: Putting bigger discs in server

I intend having another go tomorrow afternoon.

As there have been no suggestions about why fuser didn't work, I intend bringing the server up in single-user mode so I can de-activate the disc before vg02 is loaded.

Can anyone see anything wrong with this plan?

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: Putting bigger discs in server

Hi everyone, and thanks for the help so far.

The 73Gb disc is now up and running and it has been a seamless transition for the users.

For the benefit of anyone else who ever needs to do this, I didn't need to bring the server up in single-user mode: the vgchange and vgexport worked fine after a simple reboot.

Now on to the next stage: sam and ioscan still show the 18Gb disc, even though I removed it this morning and replaced it with the second 73Gb disc. Do I need to reboot? If so, it will wait - there's no desperate rush for the second disc yet.

Mark
The triumph of evil requires only that good men do nothing