Resize disk space


 
Thread Tools Search this Thread
Operating Systems Solaris Resize disk space
# 1  
Old 03-25-2012
Resize disk space

I am trying to resize my disk space to be bigger on my solaris server (Sun Fire V240)

this server and other windows servers are attached to a SAN disks, the disk I want to resize is on the SAN.

I have free space on the SAN disks so I added some space to the windows disks and I made some changes on the windows servers to apply the news sizes and it works without any problems and without any losing of data. I did the same thing for the solaris attached disk (One disk to be resized and the other disks are fine) and then I tried to apply the changes on the solaris server like I did with windows servers.

here is the display :

Code:
as03cc01:/# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d0          35G   9.4G    25G    28%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    14G   1.6M    14G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                        35G   9.4G    25G    28%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                        35G   9.4G    25G    28%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/md/dsk/d8         7.9G    80M   7.7G     2%    /var
swap                    14G   976K    14G     1%    /tmp
swap                    14G    32K    14G     1%    /var/run
/dev/md/dsk/d12         16G    16M    16G     1%    /local
/dev/md/dsk/d16        486M   1.0M   437M     1%    /global
/dev/dsk/c5t600508B40010836E0002500000980000d0s2
                       9.8G    10M   9.7G     1%    /global/d100s2
/dev/dsk/c5t600508B40010836E0002500000950000d0s2
                        20G   1.1G    18G     6%    /global/d101s2
/dev/dsk/c5t600508B40010836E0002500000920000d0s2
                        49G   9.6G    39G    20%    /global/d102s2

The disk I made changes on its size is /global/d100s2 and now its size on SAN is 17G

and to check the size I verified with auto configure command

Code:
as03cc01:/# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c3t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c3t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@1,0
       2. c5t600508B40010836E0002500000950000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 2558 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000950000
       3. c5t600508B40010836E0002500000920000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 6398 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000920000
       4. c5t600508B40010836E0002500000980000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 1278 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000980000

Specify disk (enter its number): 4 this is the disk number
selecting c5t600508B40010836E0002500000980000d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c5t600508B40010836E0002500000980000d0s2 is currently mounted on /global/d100s2. Please see umount(1M).
.
.
format> par
.
.
partition> pr
Current partition table (original):
Total disk cylinders available: 1278 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0               0         (0/0/0)           0
  1       swap    wu       0               0         (0/0/0)           0
  2     backup    wu       0 - 1277        9.98GB    (1278/0/0) 20938752
  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        usr    wm       0 - 1277        9.98GB    (1278/0/0) 20938752
  7 unassigned    wm       0               0         (0/0/0)           0

partition> quit

format> type


AVAILABLE DRIVE TYPES:
        0. Auto configure
        1. Quantum ProDrive 80S
        .
        .
        .
        23. other
Specify disk type (enter its number)[20]: 0
c5t600508B40010836E0002500000980000d0: configured with capacity of 16.98GB
<COMPAQ-HSV111(C)COMPAQ-4004 cyl 2174 alt 2 hd 128 sec 128>
Cannot set disk type while it has mounted partitions.

the server recognized the new size 17G but when doing df -h it still shows the

the previous size can anyone help with helpful commands to apply the changes (add space to slice 2)

(in one condition no data to be lost) thanks a lot

Last edited by DukeNuke2; 03-25-2012 at 07:47 PM..
# 2  
Old 03-25-2012
You need the growfs command.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 03-26-2012
Before running growfs, you first need to backup your data, unmount the file system using that disk and relabel it.
This User Gave Thanks to jlliagre For This Post:
# 4  
Old 03-26-2012
Thanks for the replies I'll try to follow these steps.

---------- Post updated at 08:55 PM ---------- Previous update was at 04:42 PM ----------

I umounted the file system on the disk and I relabled it then I used the growfs command but I still get the old size 10G, I am a litle bit confused I am supposed to get 17G any help
here are the steps

Code:
as03cc01:/# umount /global/d100s2
as03cc01:/# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c3t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c3t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@1,0
       2. c5t600508B40010836E0002500000950000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 2558 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000950000
       3. c5t600508B40010836E0002500000920000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 6398 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000920000
       4. c5t600508B40010836E0002500000980000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 1278 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000980000
Specify disk (enter its number): 4
selecting c5t600508B40010836E0002500000980000d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c5t600508B40010836E0002500000980000d0s2 is currently mounted on /global/d100s2. Please see umount(1M).


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> lab
Ready to label disk, continue?yes
format> quit
as03cc01:/#

as03cc01:/# growfs -M /global/d100s2 dev/dsk/c5t600508B40010836E000250000098000
0d0s2
devinfo: /dev/dsk/c5t600508B40010836E0002500000980000d0s2: Inappropriate ioctl for device
growfs: cannot get partition size
as03cc01:/# growfs -M /global/d100s2 /dev/rdsk/c5t600508B40010836E00025000009800
00d0s2
/dev/dsk/c5t600508B40010836E0002500000980000d0s2 is not mounted
as03cc01:/# mount /dev/dsk/c5t600508B40010836E0002500000980000d0s2 /global/d100s2
as03cc01:/# growfs -M /global/d100s2 /dev/rdsk/c5t600508B40010836E0002500000980000d0s2
/dev/rdsk/c5t600508B40010836E0002500000980000d0s2:      20938752 sectors in 3408 cylinders of 48 tracks,  128 sectors 10224.0MB in 213 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 19957152, 20055584, 20154016, 20252448, 20350880, 20449312, 20547744,
 20646176, 20744608, 20843040
a04cc01:/# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d0          35G   9.4G    25G    28%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    11G   1.6M    11G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                        35G   9.4G    25G    28%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                        35G   9.4G    25G    28%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/md/dsk/d8         7.9G    80M   7.7G     2%    /var
swap                    12G    72M    11G     1%    /tmp
swap                    11G    32K    11G     1%    /var/run
/dev/md/dsk/d12         16G    16M    16G     1%    /local
/dev/md/dsk/d16        486M   1.0M   437M     1%    /global
/dev/dsk/c5t600508B40010836E0002500000950000d0s2
                        20G   1.1G    18G     6%    /global/d101s2
/dev/dsk/c5t600508B40010836E0002500000920000d0s2
                        49G   9.7G    39G    20%    /global/d102s2
/dev/dsk/c5t600508B40010836E0002500000980000d0s2
                       9.8G    10M   9.7G     1%    /global/d100s2

as03cc01:/#

nothing changed the size is still 10G so what is wrong it should be 17G

Last edited by Corona688; 03-26-2012 at 04:39 PM..
# 5  
Old 03-26-2012
Sorry I wasn't clear enough. You just rewrote the label that was already there so this had no effect. By "relabel" I meant writing a new label automatically adjusted to the expanded device size.

After selecting the disk, type the "type" command, then "0" to auto-configure, then "label" to relabel.
This User Gave Thanks to jlliagre For This Post:
# 6  
Old 03-28-2012
Thank you for your help Jlliagre, and I'm sorry for being late responding to your steps, I just
tried to follow the steps that you gave me but unlikely I got another error message

Code:
as03cc01:/# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c3t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c3t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@1,0
       2. c5t600508B40010836E0002500000950000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 2558 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000950000
       3. c5t600508B40010836E0002500000920000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 6398 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000920000
       4. c5t600508B40010836E0002500000980000d0 <COMPAQ-HSV111(C)COMPAQ-4004 cyl 1278 alt 2 hd 128 sec 128>
          /scsi_vhci/ssd@g600508b40010836e0002500000980000
Specify disk (enter its number): 4
selecting c5t600508B40010836E0002500000980000d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> type


AVAILABLE DRIVE TYPES:
        0. Auto configure
        1. Quantum ProDrive 80S
        2. Quantum ProDrive 105S
        3. CDC Wren IV 94171-344
        4. SUN0104
        5. SUN0207
        6. SUN0327
        7. SUN0340
        8. SUN0424
        9. SUN0535
        10. SUN0669
        11. SUN1.0G
        12. SUN1.05
        13. SUN1.3G
        14. SUN2.1G
        15. SUN2.9G
        16. Zip 100
        17. Zip 250
        18. Peerless 10GB
        19. SUN72G
        20. COMPAQ-HSV111(C)COMPAQ-4004
        21. COMPAQ-HSV111(C)COMPAQ-4004
        22. COMPAQ-HSV111(C)COMPAQ-4004
        23. other
Specify disk type (enter its number)[20]: 0
c5t600508B40010836E0002500000980000d0: configured with capacity of 16.98GB
<COMPAQ-HSV111(C)COMPAQ-4004 cyl 2174 alt 2 hd 128 sec 128>
selecting c5t600508B40010836E0002500000980000d0
[disk formatted]
format> label
Ready to label disk, continue? y

Warning: error writing VTOC.
Warning: no backup labels
Label failed.
format>


Last edited by Scott; 03-28-2012 at 10:18 AM.. Reason: Code tags, please...
# 7  
Old 03-28-2012
Use "format -e" instead of "format", write a temporary EFI label then an SMI one (You'll have these choice when entering the label command).
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Fdisk reports the old size after disk resize

Hi, I'm running a Red Hat Enterprise Linux Server release 5.3 (Tikanga) on VMWare. It is a production system for which I may not get downtime soon. I happened to resize a underlying disk and the changes are not reflecting in the fdisk ouput. Further details are as follows. The disk which i... (3 Replies)
Discussion started by: maverick_here
3 Replies

2. Shell Programming and Scripting

Disk Space

Hi This is my script for disk space monitoring clear if then echo "You must be root user to execute the script" fi ALERT_LEVEL=10 CONSUMPTION_LEVEL= `df -k | awk {'print $5'} | cut -d '%' -f1 | sed "1 d"` for i in $CONSUMPTION_LEVEL do FILE_SYSTEM=`df -k | awk {'print $1'} |... (3 Replies)
Discussion started by: chrs0302
3 Replies

3. Filesystems, Disks and Memory

disk space

Hello All- Am new member to this forum. Have some unix experience. But true believer in it compared to windows. Have a question regarding the disk space. I know a command to check the total disk space utilization using: df -k . but what is the command to check the same disk space by... (6 Replies)
Discussion started by: milkyway
6 Replies

4. Shell Programming and Scripting

Disk Space

HI ... I am New to the Unix...I am trying to write a script to check the disk space. But i am not able to write it. I know the command to check the disk space df -k,but unable to write the script..Can any body help me... Thanks in advance... (3 Replies)
Discussion started by: Kingkon
3 Replies

5. UNIX for Dummies Questions & Answers

Resize root disk slices

I have a Sun box running Solaris 9. My root disk was slices too small when it was installed and I am now at 99% capacity for my root partition. Is it possible, and if so how?, to increase the size of slice 0 and decrease the size of slice 7?? Thanks! Current partition table... (6 Replies)
Discussion started by: FredSmith
6 Replies

6. HP-UX

How to resize a logical volume to free up some space using sam?

Hey all, is it possible to free up space off some partitions? during an install of hp-ux i set some allocated diskspace to lets say, /home to 1024 mb, but now i want it to be 512mb.. I'm looking at sam right now at the "Disks and File Systems" menu , can i modify it at all in like, List-> file... (4 Replies)
Discussion started by: emplate
4 Replies

7. UNIX for Dummies Questions & Answers

available disk space on disk device???

Hello, Can someone please tell me which command to use to determine the available disk space on a given disk device? I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be? Thanks in advance! Al. (4 Replies)
Discussion started by: alan
4 Replies

8. UNIX for Dummies Questions & Answers

Out of disk space?

Hi I'm trying to install gcc and the installation program tells me that I'm out of disk space! I have just installed the os (using the default settings for partitions and sizes) and have only installed apache on the machine. Can it really be out of disk space already? How do I check how much... (4 Replies)
Discussion started by: alfabetman
4 Replies
Login or Register to Ask a Question