From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,6a59daf336826a46 X-Google-Attributes: gidfa528,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: Changing Partition size Date: 2000/05/04 Message-ID: <8esn0p$rkk$1@mailint03.im.hou.compaq.com>#1/1 X-Deja-AN: 619292606 Distribution: world References: X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 957472601 28308 16.82.16.67 (4 May 2000 20:36:41 GMT) Organization: Digital Equipment Corporation Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) NNTP-Posting-Date: 4 May 2000 20:36:41 GMT Newsgroups: comp.unix.tru64 In article , Mike Hudson writes: >I got a DS20E recently, running Tru64 V4.0E. The factory installation >had an a, b (swap) and a small g partition (about 700 MB) on the first of >my four 18Gb disks. g is where /usr in located. > >I would like to make this g partition bigger. Can I go ahead and resize it >using the Disk Configuration tool? Somewhere I remember reading that you >can't modify partitions if they are in use, which I assume /usr is if I am >running the Disk Config in the first place ... You can't change the size or offset of a partition that is open; has a file system mounted on it, in use for page/swap space, etc. Even if the partition were closed, you can't usefully change the size because neither UFS nor AdvFS has any tools that will convince the file system that the underlying space has grown. You might be able to find Open source for a program that can do this with UFS, but you'd want to be very careful. If you're using AdvFS and have the utilities license, you can expand the space online using addvol. You can either just add a device to the domain or migrate the files to a new device by adding the new one and removing the old one. Doing this twice will give the appearance of what you want when done: 1. Add device to existing /usr domain. 2. Remove existing device and wait for files to be migrated. 3. Resize partition of original device. 4. Add it do /usr domain. 5. Remove device from #1. The general solution which works for any file system, is to create a new file system of the desired size, backup the existing data, restore it on the target. You can do these last two steps across a pipe: # dump 0f - /usr | ( cd /mnt ; restore rf - ) For /usr it would be best to do this running single user. I have indeed left out the steps of creating and mounting the file system for /mnt. If you're using AdvFS, then use vdump instead of dump, vrestore instead of restore and the 'x' option on vrestore instead of 'r' on restore. >Don't want to risk destroying the data talready there, so advice is >appreciated. If you have a backup of your system, the risk of losing something is pretty low. If you don't have a backup, why not? > >Mike -- Alan Rollow alan@nabeth.cxo.dec.com