growing /root (can i take the jump) - Systems Maintenance(Archived)

I run into the problem that i have installed solaris once with a small root partition. I can't remember why i did that, but i limited it extremely.
# prtvtoc /dev/dsk/c1t0d0s0
* /dev/dsk/c1t0d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*   17819 cylinders
*   17817 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*           0   8418060   8418059
*    79778790 206451315 286230104
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    8418060  31471335  39889394   /
       1      3    01      16065   8401995   8418059
       2      5    00          0 286230105 286230104
       3      0    00   39889395  31471335  71360729
       8      1    01          0     16065     16064
#Can i just move the startcylinder of slice 3 to anothe point and then alter the root slice 0 to the startingpoint of slice 3?
I think i did this once already, but i need to be sure this time since it is a running production system.
(as far as i can remember i even did it with webmin ?) 

Where_s_the_manual2 wrote:
I run into the problem that i have installed solaris once with a small root partition. I can't remember why i did that, but i limited it extremely. If you haven't done much, it's probably easier to re-install.
Changing this is possible, but it's very tricky. The OS doesn't give you tools to do it.
First Sector Last
Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 8418060 31471335 39889394 /
1 3 01 16065 8401995 8418059
2 5 00 0 286230105 286230104
3 0 00 39889395 31471335 71360729
8 1 01 0 16065 16064
Can i just move the startcylinder of slice 3 to anothe point and then alter the root slice 0 to the startingpoint of slice 3? Changing the table of contents doesn't actually move any data or alter filesystems. Your root filesystem will still be at the same spot on the disk and will be the same size. So no, this isn't an effective way of making the changes you want.
What is slice 3 used for now? Is there much data on it? You could destroy the filesystem on slice 3 and just add whatever space you need to root. That's probably the easiest thing to do. If it's not much data, copy it off, then restore it later.
I usually just put everything in root on UFS root systems.
--
Darren

Related

Why parition table is different between S10 3/05 and S10 6/06?

I want to set up RAID 1 (mirroring) using the Solaris Volume Manager (SVM) on my Solaris 10 6/06 x86 machine. I have 2 identical Seagate 40GB HDD's (model ST340016A).
The partition table on the primary disk was already defined by Solaris 10 3/05 OS before I reinstalled the OS (Solaris 10 6/06). The partition table of the primary disk is as follows:
leopard $ prtvtoc /dev/rdsk/c0d0s2
* /dev/rdsk/c0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 32 tracks/cylinder
* 2016 sectors/cylinder
* 38771 cylinders
* 38769 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 20984544 57173760 78158303
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 6048 8390592 8396639 /
1 3 01 8396640 2098656 10495295
2 5 00 0 78158304 78158303
3 7 00 10495296 2098656 12593951 /var
4 0 00 12593952 4195296 16789247 /opt
5 8 00 16789248 4195296 20984543 /home
8 1 01 0 2016 2015
9 9 01 2016 4032 6047
It has 38771 cyclinders.
Now I want to create exactly the same partition table on the secondary disk, but it refuses to match the same partition table to the primary disk. It stills gives 40GB, but the number of cycliners is not the same. Below is the partition table of the secondary disk.
leopard $ prtvtoc /dev/rdsk/c0d1s2
* /dev/rdsk/c0d1s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 255 tracks/cylinder
* 16065 sectors/cylinder
* 4864 cylinders
* 4862 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 48195 78059835 78108029
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
2 5 01 0 78108030 78108029
8 1 01 0 16065 16064
9 9 00 16065 32130 48194
leopard $
It has 4864 cyclinders not 38771. Why?
You can see the disk dimension is different between these 2 disks. I tried to redefine it to match the primary disk, but it keeps coming back to the different table.
Do you know why the partition table defined by Solaris 10 6/06 differs to what Solaris 10 3/05 had defined? How do I force the parition table to match with the primary disk? Both disks must match so that SVM would work.
Can anyone shed any light as to why it happens? Thank you for your help.
Trevor

resize/create new partitons on Solaris 10/i386

Hello:
I basically did a default install of the January release/build of Solaris 10 and now have the following partition table (I couldn't modify the default settings during install):
Info from prtvtoc:
-bash-3.00# prtvtoc /dev/rdsk/c1d0s0
* /dev/rdsk/c1d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 32 tracks/cylinder
* 2016 sectors/cylinder
* 39827 cylinders
* 39825 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 1054368 13436640 14491007 /
1 3 01 6048 1048320 1054367
2 5 00 0 80287200 80287199
7 8 00 14491008 65796192 80287199 /export/home
8 1 01 0 2016 2015
9 9 01 2016 4032 6047
and format>partition>print:
Current partition table (original):
Total disk cylinders available: 39825 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 523 - 7187 6.41GB (6665/0/0) 13436640
1 swap wu 3 - 522 511.88MB (520/0/0) 1048320
2 backup wm 0 - 39824 38.28GB (39825/0/0) 80287200
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 home wm 7188 - 39824 31.37GB (32637/0/0) 65796192
8 boot wu 0 - 0 0.98MB (1/0/0) 2016
9 alternates wu 1 - 2 1.97MB (2/0/0) 4032
I would like to resize the /export/home partition since I don't need that much space (home user desktop) and create a new partition for system use. From this forum, I appently need to use the format command, but I'm not sure which route to go (fdisk, modify, ?).
Thanks in advance.
How much disk space is used under /export/home?
Can you also post 'df -k ' output?

File system mounted on Slice 2 during Solaris 10 install: how to undo?

Hello,
During the Solaris 10 install, I created a File System on the Slice 2 of my Disk. Is there a a way to restore the Slice 2 so it can be the image of the whole disk again and move the File System in Slice 2 to another Slice? Could you, please, let me know how to do that?
Thank you in advance,
Alex 
Is this a boot disk? You may not care.
Can you show the output of either format->partition->print or 'prtvtoc' from the disk?
Unless you want to do a lot of work, you can pick another slice on the disk to encompass the same cylinders, then use that slice instead of 2 to access the filesystem.
Then if it's not already (I assume it is), you can make sure slice 2 encompasses all cylinders.
--
Darren 
Darren,
Thank you for your answer. Indeed this is the boot disk.
This is the output of the prtvtoc command:
# prtvtoc /dev/dsk/c2t0d0s2
* /dev/dsk/c2t0d0s2 (volume "boot") partition map
*
* Dimensions:
* 512 bytes/sector
* 424 sectors/track
* 24 tracks/cylinder
* 10176 sectors/cylinder
* 14089 cylinders
* 14087 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 20484288 12292608 32776895
1 7 00 32776896 12292608 45069503
2 0 00 45069504 94077120 139146623
3 3 01 0 20484288 20484287
4 0 00 139146624 101760 139248383
7 8 00 139248384 4100928 143349311
Partitions 5 and 6 seem to be unused, do you think I can take one of those to encompass the same cylinders? then mount the filesystem on it?
But then, what do I do with the Slice 2 so it can encompass all the cylinders?
Thank you,
Alex 
alexhzgz wrote:
Darren,
Thank you for your answer. Indeed this is the boot disk.
This is the output of the prtvtoc command:
# prtvtoc /dev/dsk/c2t0d0s2
* /dev/dsk/c2t0d0s2 (volume "boot") partition map
*
* Dimensions:
* 512 bytes/sector
* 424 sectors/track
* 24 tracks/cylinder
* 10176 sectors/cylinder
* 14089 cylinders
* 14087 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 20484288 12292608 32776895
1 7 00 32776896 12292608 45069503
2 0 00 45069504 94077120 139146623
3 3 01 0 20484288 20484287
4 0 00 139146624 101760 139248383
7 8 00 139248384 4100928 143349311Unfortunately that doesn't show if any of the slices are in use. You'll have to make sure of that through other means (what's mounted with 'df'? Is anything configured to use a volume manager? Do you know where swap and dump devices are? etc.)
Partitions 5 and 6 seem to be unused, do you think I can take one of those to encompass the same cylinders?If truly unused, sure. This appears to be a SPARC system, yes?
then mount the filesystem on it?I'm not sure what you mean there. The filesystem is already in the cylinders. You mount the filesystem from the slice, not on the slice.
But then, what do I do with the Slice 2 so it can encompass all the cylinders?Change it so that it encompasses all the cylinders. You can change it like any other slice from within 'format'.
--
Darren

Error when trying to create a Files System with newfs

HI,
I am running Solaris 8 on a Sun Ultra 10 workstation
I am in the process of configuring the slices on my primary 20 gig hard drive. I have partitioned the hard drive as follows.
# prtvtoc /dev/dsk/c0t0d0s2
* /dev/dsk/c0t0d0s2 (volume "edi_main") partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 39535 cylinders
* 39533 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 27265392 12583872 39849263 /
1 2 00 0 1049328 1049327
2 5 00 0 39849264 39849263
3 2 00 1049328 26216064 27265391 /edi
The root filesystem was created at installation, and I executed newfs on partition 3 to create the /edi filesystem, and both of them are mounted. I now need to create a filesystem on slice 1 but the newfs command is not working. I get the following output from newfs:
# newfs -v /dev/dsk/c0t0d0s1
newfs: /dev/dsk/c0t0d0s1: Unable to read Disk geometry
Could someone tell me what is wrong with this partition.
Any help would be appreciated.
I e-mailed tech support and got my answer.
I should have been using /dev/rdsk and not /dev/dsk when specifying the disk slice to put the file system on.

growfs not growing the FS

Hi.. There is a task to add space on one of the FS with 10GB.
Storage team has allocated the disk name "emcpower7a" having 10GB size. i have formatted, labelled the disk before adding it into the metadevice d80. but after doing the # metattach d80 emcpower7a and doing growfs on the FS, the FS size remained the same. Is there any way to remove the device emcpower7a from d80 that i have attached earlier, reformat it and reattach and do a growfs on the FS.
root#modena> metastat -p d80
d80 4 1 emcpower0a \
1 emcpower4a \
1 emcpower7a \
1 emcpower10a
root#modena> df -kh|grep -i d80
/dev/md/dsk/d80 97G 64G 32G 67% /apps/ora/oradata
root#modena> metastat d80
d80: Concat/Stripe
Size: 204565760 blocks (97 GB)
Stripe 0:
Device Start Block Dbase Reloc
emcpower0a 0 No No
Stripe 1:
Device Start Block Dbase Reloc
emcpower4a 1280 No No
Stripe 2:
Device Start Block Dbase Reloc
emcpower7a 640 No No
Stripe 3:
Device Start Block Dbase Reloc
emcpower10a 640 No No
Device Relocation Information:
Device Reloc Device ID
emcpower0a No -
emcpower4a No -
emcpower7a No -
emcpower10a No -
Thanks for your help in advance. 
How about showing us the output of the command:
<pre>/usr/sbin/prtvtoc /dev/rdsk/emcpower7a</pre> 
root#modena> /usr/sbin/prtvtoc /dev/rdsk/emcpower7a
* /dev/rdsk/emcpower7a partition map
*
* Dimensions:
* 512 bytes/sector
* 10 sectors/track
* 64 tracks/cylinder
* 640 sectors/cylinder
* 32768 cylinders
* 32766 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 20951040 19200 20970239
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 0 20951040 20951039 
Ok that looks like I would expect. May we see the prtvtoc output from the other three disks please?
Go ahead and include a "metastat -t d80" while you are at it.
Edited by: bobthesungeek76036 on Feb 21, 2012 10:52 AM 
These are the prtvtoc outputs for the other disks..
========================================
root#modena> /usr/sbin/prtvtoc /dev/rdsk/emcpower0a
* /dev/rdsk/emcpower0a partition map
*
* Dimensions:
* 512 bytes/sector
* 17 sectors/track
* 128 tracks/cylinder
* 2176 sectors/cylinder
* 65535 cylinders
* 65533 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 0 142599808 142599807
=============================================
root#modena> /usr/sbin/prtvtoc /dev/rdsk/emcpower4a
* /dev/rdsk/emcpower4a partition map
*
* Dimensions:
* 512 bytes/sector
* 10 sectors/track
* 128 tracks/cylinder
* 1280 sectors/cylinder
* 32768 cylinders
* 32766 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 40755200 1185280 41940479
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 0 40755200 40755199
2 5 01 0 41940480 41940479
==========================================
root#modena> /usr/sbin/prtvtoc /dev/rdsk/emcpower10a
* /dev/rdsk/emcpower10a partition map
*
* Dimensions:
* 512 bytes/sector
* 10 sectors/track
* 64 tracks/cylinder
* 640 sectors/cylinder
* 32768 cylinders
* 32766 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 20951040 19200 20970239
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 0 20951040 20951039
2 5 01 0 20970240 20970239
======================================
root#modena> metastat -t d80
d80: Concat/Stripe
Size: 204565760 blocks (97 GB)
Stripe 0:
Device Start Block Dbase Reloc
emcpower0a 0 No No
Stripe 1:
Device Start Block Dbase Reloc
emcpower4a 1280 No No
Stripe 2:
Device Start Block Dbase Reloc
emcpower7a 640 No No
Stripe 3:
Device Start Block Dbase Reloc
emcpower10a 640 No No
Device Relocation Information:
Device Reloc Device ID
emcpower0a No -
emcpower4a No -
emcpower7a No -
emcpower10a No -
==================================
Edited by: 915004 on Feb 21, 2012 11:33 AM 
I am disturbed the timestamps didn't show when you specified the "-t". Also your block counts are not adding up right. If you subtract the blocks from the disk you added you are left with a lower number than the size of d80. 
Yes.. That is my concern too.. The timestamp for all the volumes with devices emcpower* is not showing up but all looks good for those with the internal device.
Is it possible that this might have happened when i allocated the disk, the disk was not fomatted/labelled properly?
If we try to remove the device emcpower7a from d80, would it corrupt the data already available in d80?
as far as i'm aware, when i ran growfs after adding emcpower7a to d80, there was no change in the size of the FS.. but after i added emcpower10a (10GB in size), (following the normal procedure), the FS size increased with with 10GB. 
Hi.. Could anyone suggest how to resolve this issue..

Categories

Resources