From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078619210719.tru64-unix-managers.marc@archive.invalid> From: Mike Grau Date: Wed, 26 Nov 1997 20:02:30 +0000 To: tru64-unix-managers Subject: SUMM: disklabel & swxcr X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078619210719 Thanksgiving for: Michael Matthews Martin J. Moore alan@nabeth Susan Rodriguez hl@tekla All of whom set me straight: Three DUH's here... 1. I was indeed trying to disklabel the active partition. "disklabel -r -w re1 swxcr" defaults to the "a" partition 2. I was swapping on "b" as per my fstab. 3. The fact that the disks are RAID is of no consequence for this. Specifically, I followed Susan's steps: I removed the drives from fstab, rebooted and 1. Zero out your disklabel # disklabel -z re1 2. Write a blank disklabel # disklabel -r -w re1 SWXCR 3. Edit the disklabel to create the custome partition sizes # disklabel -e re1 (edit label) 4. newfs each partion to be used for filesystem As long as I was savaging the system, I also changed / and /usr in this manner, booting from the CDROM, using the install gui to size the partitions leaving them as "unused" exiting the gui and using "disklabel -s" set the fstype of each partition. (Vi seemed flaky in single user mode, booted from CD.) I then mounted the drives and restored root and usr from backup. See responses and original question below: ............................................... You can't modify the partition information of any active partition. This includes swap, which is probably the culprit here (swapon -s will tell you where you're swapping to). You don't need to break down any RAID information -- as far as disklabel is concerned, it's just a big disk. ............................................... The only problem is that you were trying to modify the size of an open partition (a) because disklabel reads from partition a by default if you just specify the disk name, rather than the full device name. i.e., disklabel -e re1 is equivalent to disklabel -e /dev/rre1a. You could have done disklabel -e /dev/rre1c (since the disklabel, being on block 0, can be accessed either through partitions a or c, or any other that starts at block 0.) ............................................... When you specify the general device name (re1) instead of a specific partition, the disklabel command has to pick a partition to use. I think it uses 'a'. So, when you're trying to change 'a', it is indeed open and the driver won't let you change the size or offset of an open partition. Use 'c' as the specific partition: disklabel -e /dev/rre1c ............................................... Are any of the partitions for your target device listed in /etc/fstab? I would look in that file and run the mount command. Make sure that the device isn't doing something. Check swapon -s also. Doing a new disklabel means redoing any swap partitions that live on that device. You might have to disable or move the swapdefault link in /sbin if it's pointing to your target device. You shouldn't have to run swxcrmgr just for partition changes. Try this: 1. Zero out your disklabel # disklabel -z re1 2. Write a blank disklabel # disklabel -r -w re1 SWXCR 3. Edit the disklabel to create the custome partition sizes # disklabel -e re1 (edit label) 4. newfs each partion to be used for filesystem ............................................... one partition is 'open' i.e. in use. Either the 'a' partition is mounted, or swap on the 'b' partition is enabled. Unmounting 'a' is easy, but you need to reboot to disable swap to the 'b' partition. Also remember to remove the device from fstab... ............................................... Original Query: > 4.0b patch 0005 > > Having changed the partitions once on a re1, how do I do it a > second time? > > I have a RAID 5 disk composed of 3 rz29's originally partitioned > as per disktab. I want to double the "a" & "b" partions at the > expense of the rest of the disk (g). I doubled the swap partition > using the CDE interface. Everything seemed OK. However, I am unable > to change the partitions a second time. The gui fails referring me to > the man page. The command line: > disklabel -rw re1 swxcr > fails, complaining about modifiying the size of an open partiton. > > Do I need to re-initialize the re1 with the swxcrmgr each time I > re-partition a disk. Or do I first need to break the re1 up, disklabel > each rz29's as such and the re-create my re1? > I have since done a "disklabel -z re1". Not a good idea? > > TIA ... mg >