DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd October 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Default growfs

So I have googled a fair amount of times and read the man page and I am very confused.

I have a sparc Netra T1 AC 200, running FBSD 6-stable. It had dual 18GB disks in a gmirror raid 1, As can be imagined, ran out of space quickly. I purchased 2 73GB scsi drives. I removed 1 of the 18GBs, placed 73GB in, rebuild the mirror, removed the other 18GB, inserted 73GB, rebuilt mirror. Ok, so I have 2 73GB drives in there in a mirror (/dev/mirror/gm0) they are partitioned as such:

Code:
Otter# df -h
Filesystem          Size    Used   Avail Capacity  Mounted on
/dev/mirror/gm0a    501M     70M    392M    15%    /
devfs               1.0K    1.0K      0B   100%    /dev
/dev/mirror/gm0e    501M    356K    461M     0%    /tmp
/dev/mirror/gm0f     11G    9.8G    771M    93%    /usr
/dev/mirror/gm0d    1.9G    165M    1.6G     9%    /var
I want to grow only the, /usr partition to fill the rest of the disk. How do I go about doing. Every how to I see tells me to use fdisk, which isn't a program on sparc64. I have the original 18GB drives still so if all goes to hell, I can stick those back in and have all my data, not to mention it wouldn't be the end of the world if everything went away.

What do I need to do? I have console access to this box via Lights Out Management and another box with a serial port on the network (best part about this server hands down) so single user mode is easy to get to.

tl;dr: How do I use growfs to expand my /usr partition?

Thanks!!!!
-=Tom
Reply With Quote
  #2   (View Single Post)  
Old 3rd October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

The growfs(8) manual is pretty clear about this, from the looks of your setup.. /usr is on the last partition, if no other partition exists directly after gm0f physically.. then all you have to do is modify the label, expand f, and run growfs gm0f.

Please post the output of bsdlabel(8) for gm0.

Good luck..
Reply With Quote
  #3   (View Single Post)  
Old 3rd October 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Default

Code:
Otter# bsdlabel /dev/mirror/gm0
bsdlabel: a -m <architecture> option must be specified

Otter# bsdlabel -m sparc64 /dev/mirror/gm0
bsdlabel: Unsupported architecture
Code:
The -m machine argument forces bsdlabel to use a layout suitable for a
     different architecture.  Current valid values are i386, amd64, ia64,
     pc98, and alpha.  If this option is omitted, bsdlabel will use a layout
     suitable for the current machine.
it would appear no sparc64 support :-\

Google time go!
Answer: sunlabel

Ok, now to stumble through this.

Code:
# /dev//mirror/gm0:
text: FreeBSD17G cyl 2200 alt 2 hd 255 sec 63
bytes/sector: 512
sectors/cylinder: 16065
sectors/unit: 35343000

8 partitions:
#
# Size is in sectors.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  a:    1060290          0
  b:    4144770         66
  c:   35343000          0
  d:    4176900        324
  e:    1060290        584
  f:   24900750        650
ok so sunlabel -e mirror/gm0 puts me into an edit mode, cool. Now, how do I find the correct size of my new drive as this is my old drives size etc.?

Last edited by tad1214; 3rd October 2008 at 09:02 PM.
Reply With Quote
  #4   (View Single Post)  
Old 10th October 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Default

I'm sorry guys I hate to nag, I just have no idea what to do in this situation. I'd just reinstall but the CD drive is bad in this box and I have no other computers with SCSI ports.
Reply With Quote
  #5   (View Single Post)  
Old 11th October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Well, help us all along.. post a dmesg, do you have the new disks in now? we can only work with what little information you gave us.

The label seems to indicate you have the 18G drives in still.. so either you need to reconfigure the array in some way, or install the new disks.. that's my opinion.
Reply With Quote
  #6   (View Single Post)  
Old 11th October 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Default

New drives are in running. I mentioned my method of how I did this in a previous reply. (Remove one drive, insert new drive, rebuild mirror, remove second drive, inset new drive, rebuild mirror)

dmesg
Code:
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.4-PRERELEASE #1: Thu Oct  2 11:40:35 CDT 2008
    root@Otter.hsd1.mn.comcast.net.:/usr/obj/usr/src/sys/GENERIC
Timecounter "tick" frequency 500000000 Hz quality 1000
real memory  = 1073741824 (1024 MB)
avail memory = 1031413760 (983 MB)
cpu0: Sun Microsystems UltraSparc-IIe Processor (500.00 MHz CPU)
kbd0 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413, REGOPS_FUNC)
nexus0: <Open Firmware Nexus device>
pcib0: <U2P UPA-PCI bridge> on nexus0
pcib0: Sabre, impl 0, version 0, IGN 0x7c0, bus A, 66MHz
pcib0: [FAST]
pcib0: [FAST]
pcib0: [GIANT-LOCKED]
pcib0: [GIANT-LOCKED]
pcib0: DVMA map: 0xc0000000 to 0xc3ffffff
pci0: <OFW PCI bus> on pcib0
pcib1: <APB PCI-PCI bridge> at device 1.1 on pci0
pci1: <OFW PCI bus> on pcib1
ebus0: <PCI-EBus3 bridge> mem 0xf0000000-0xf0ffffff,0xf1000000-0xf17fffff at device 12.0 on pci1
ebus0: <idprom>: incomplete
ebus0: <flashprom> addr 0x1000000000-0x10000fffff (no driver attached)
eeprom0: <EEPROM/clock> addr 0x1400000000-0x1400001fff on ebus0
eeprom0: model mk48t59
ebus0: <SUNW,lomh> addr 0x1400200000-0x1400200003 irq 42 (no driver attached)
pci1: <old, non-VGA display device> at device 3.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci1
isa0: <ISA bus> on isab0
gem0: <Sun ERI 10/100 Ethernet> mem 0xe0400000-0xe041ffff at device 12.1 on pci1
miibus0: <MII bus> on gem0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
gem0: 2kB RX FIFO, 2kB TX FIFO
gem0: Ethernet address: 08:00:20:fd:f7:9c
ohci0: <Sun PCIO-2 USB controller> mem 0xe2000000-0xe2007fff at device 12.3 on pci1
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: <Sun PCIO-2 USB controller> on ohci0
usb0: USB revision 1.0
uhub0: (0x108e) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
atapci0: <AcerLabs M5229 UDMA66 controller> port 0x400-0x407,0x418-0x41b,0x410-0x417,0x408-0x40b,0x420-0x42f at device 13.0 on pci1
atapci0: using PIO transfers above 137GB as workaround for 48bit DMA access bug, expect reduced performance
ata2: <ATA channel 0> on atapci0
ata3: <ATA channel 1> on atapci0
gem1: <Sun ERI 10/100 Ethernet> mem 0xe0440000-0xe045ffff at device 5.1 on pci1
miibus1: <MII bus> on gem1
ukphy1: <Generic IEEE 802.3u media interface> on miibus1
ukphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
gem1: 2kB RX FIFO, 2kB TX FIFO
gem1: Ethernet address: 08:00:20:fd:f7:9c
ohci1: <Sun PCIO-2 USB controller> mem 0xe5000000-0xe5007fff at device 5.3 on pci1
ohci1: [GIANT-LOCKED]
usb1: OHCI version 1.0, legacy support
usb1: <Sun PCIO-2 USB controller> on ohci1
usb1: USB revision 1.0
uhub1: (0x108e) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 4 ports with 4 removable, self powered
pcib2: <APB PCI-PCI bridge> at device 1.0 on pci0
pci2: <OFW PCI bus> on pcib2
sym0: <896> port 0xc00000-0xc000ff mem 0x2000-0x23ff,0x4000-0x5fff at device 8.0 on pci2
sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym0: [GIANT-LOCKED]
sym1: <896> port 0xc00100-0xc001ff mem 0x6000-0x63ff,0x8000-0x9fff at device 8.1 on pci2
sym1: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym1: [GIANT-LOCKED]
nexus0: <syscons>, type (unknown) (no driver attached)
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 43 on isa0
uart0: console (9600,n,8,1)
uart1: <16550 or compatible> at port 0x2e8-0x2ef irq 43 on isa0
Timecounters tick every 1.000 msec
Waiting 5 seconds for SCSI devices to settle
(probe0:sym0:0:0:4): AutoSense Failed
(probe0:sym0:0:0:5): AutoSense Failed
(probe0:sym0:0:0:6): AutoSense Failed
(probe0:sym0:0:0:7): AutoSense Failed
da0 at sym0 bus 0 target 0 lun 0
da0: <SEAGATE SX373405LC C206> Fixed Direct Access SCSI-3 device
da0: 80.000MB/s transfers (40.000MHz, offset 31, 16bit), Tagged Queueing Enabled
da0: 70007MB (143374738 512 byte sectors: 255H 63S/T 8924C)
da1 at sym0 bus 0 target 1 lun 0
da1: <SEAGATE SX373405LC C203> Fixed Direct Access SCSI-3 device
da1: 80.000MB/s transfers (40.000MHz, offset 31, 16bit), Tagged Queueing Enabled
da1: 70007MB (143374738 512 byte sectors: 255H 63S/T 8924C)
GEOM_MIRROR: Device gm0 created (id=915151075).
GEOM_MIRROR: Device gm0: provider da0 detected.
GEOM_MIRROR: Device gm0: provider da1 detected.
GEOM_MIRROR: Device gm0: provider da1 activated.
GEOM_MIRROR: Device gm0: provider da0 activated.
GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.
Trying to mount root from ufs:/dev/mirror/gm0a
Code:
Otter# df -h
Filesystem          Size    Used   Avail Capacity  Mounted on
/dev/mirror/gm0a    501M     70M    392M    15%    /
devfs               1.0K    1.0K      0B   100%    /dev
/dev/mirror/gm0e    501M    360K    461M     0%    /tmp
/dev/mirror/gm0f     11G     10G    298M    97%    /usr
/dev/mirror/gm0d    1.9G    432M    1.3G    24%    /var
sunlabel of mirror/gm0 da0 da1
Code:
Otter# sunlabel mirror/gm0
# /dev/mirror/gm0:
text: FreeBSD17G cyl 2200 alt 2 hd 255 sec 63
bytes/sector: 512
sectors/cylinder: 16065
sectors/unit: 35343000

8 partitions:
#
# Size is in sectors.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  a:    1060290          0
  b:    4144770         66
  c:   35343000          0
  d:    4176900        324
  e:    1060290        584
  f:   24900750        650
Otter# sunlabel da0
# /dev/da0:
text: FreeBSD17G cyl 2200 alt 2 hd 255 sec 63
bytes/sector: 512
sectors/cylinder: 16065
sectors/unit: 35343000

8 partitions:
#
# Size is in sectors.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  a:    1060290          0
  b:    4144770         66
  c:   35343000          0
  d:    4176900        324
  e:    1060290        584
  f:   24900750        650
Otter# sunlabel da1
# /dev/da1:
text: FreeBSD17G cyl 2200 alt 2 hd 255 sec 63
bytes/sector: 512
sectors/cylinder: 16065
sectors/unit: 35343000

8 partitions:
#
# Size is in sectors.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  a:    1060290          0
  b:    4144770         66
  c:   35343000          0
  d:    4176900        324
  e:    1060290        584
  f:   24900750        650
Reply With Quote
  #7   (View Single Post)  
Old 14th October 2008
tingo tingo is offline
Real Name: Torfinn Ingolfsen
Port Guard
 
Join Date: Oct 2008
Location: Oslo, Norway
Posts: 13
Default

Well, what happens if you specify '*' as the size of the 'f' partition (which is /usr, yes?) in sunlabel?
Hint: read the man pages....
HTH
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick