/var too small [was Gap of years = loss of memory!!]
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Thu Jun 2 13:16:03 GMT 2005
>
> Hi
>
> This is the sort of thing I used to do regularly but not having done this task
> for a few years I feel the need to check up on the best way to deal with the
> circumstances described below.
> I decided to change the subject - maybe you thought the original was spam :-)
> I have a freebsd system with the following
> hard drive configuration:
> $ df
> Filesystem 1K-blocks Used Avail Capacity Mounted on
> /dev/ad6s1a 253678 44804 188580 19% /
> devfs 1 1 0 100% /dev
> /dev/ad6s1e 253678 15732 217652 7% /tmp
> /dev/ad6s1f 148665266 18848290 117923756 14% /usr
> /dev/ad6s1d 253678 107022 126362 46% /var
>
> The full output from dmesg.boot is included as a postscript (all comments
> welcome). Its last two lines are:
> Opened disk da1 -> 6
> Mounting root from ufs:/dev/ad6s1a
>
> The motherboard is an Abit VA-20 with two SATA slots on the motherboard-
> SATA1 & SATA2
> /dev/ad6 is a 160G SATA hard drive currently connected to the SATA2 slot (dont
> know why!)
>
> (a) /dev/ad6s1d [ /var ] is far too small for my needs
> (b) With the development project I am embarking on /usr will also be small to
> hold the development files as well as other stuff.
> (c) I have therefore bought a new 200G SATA drive to add to the system.
> (d) I wish to allocate 40G to /var and
> (e) 160G to /dev
> (f) rename /var to /var.old
> (g) move /var.old to /var
> (h) have /var.old mounted as /logs
> (i) At the same time I also propose increasing memory from 1G to 2G which will
You do not allocate anything to /dev. That is a special directory
just for devices. Do you really mean something else?
As for moving the /var partition:
After you fdisk(8) and disklabel(8) the new drive and newfs(8) the newly
created file system[s], create a different temporaty mount point for it
to use while you are moving thing - say /newvar.
Then mount the file system on /newvar.
Then tar stuff in /var up and move it to /newvar
Unroll it in newvar and check it out.
(Since it is a whole filesystem, you could as easily use dump(8)/restore(8)
When you are convinced it looks good, unmount /var and /newvar and
remount the new partition as /var. Remount the old one as /oldlogs if you
like.
Then edit /etc/fstab to make the new mounts the default.
Then rmove the tar(dump) file.
Do:
mkdir /newvar
mkdir /oldlogs
mount /dev/adNs1e /newvar
cd /var
tar -cvpf /newvar/var.tar * ( or dump 0af /newvar/var.dump /var )
cd /newvar
tar -xvpf var.tar ( or restore -rf var.dump )
Check it all out
Then:
umount /newvar
umount /var
mount /dev/adNs1e /var
mount /dev/ad6s1d /oldlogs
Edit /etc/fstab to fix mounts
Then:
cd /var
rm /var.tar
As for below, I can't tell you about shuffling drives on a SATA.
Hopefully someone else knows that.
////jerry
> hopefully speed up my compiling a little.
>
> OK so far .. now
> If I put the new drive onto SATA 1 with the exiting drive remaining on SATA2
> the bios expects to boot from CD. Currently the bios is set to boot from HDD0
> but if I change the bios to HDD1 it makes no difference. The system does not
> boot at all.
>
> Unless I have missed something it seems the bios cannot be set to allow boot
> from SATA2 if a drive is present on SATA1.
>
> If I put the existing drive onto SATA 1 with the new drive onto SATA2 then the
> root mount fails. The existing drive appears to be recognized as ad4 so if my
> recollection is correct the first step would be to alter /etc/fstab to read:
>
> /dev/ad4s1b none swap sw 0 0
> /dev/ad4s1a / ufs rw 1 1
> /dev/ad4s1e /tmp ufs rw 2 2
> /dev/ad4s1f /usr ufs rw 2 2
> /dev/ad4s1d /var ufs rw 2 2
> /dev/acd0 /cdrom cd9660 ro,noauto 0 0
>
> and the system should mount OK???
> IS that correct?
> I want to get this right first time (if possible!!)
>
> Then presumably I can
> (a) use sysinstall to add the new drive which should presumably mount as ad6?
> (b) Create partition ad6s1a (+/-40g)
> (c) Create partition ad6s1b (+- 160G)
> (d) I am inclined to use sysinstall to mount the first partition ad6s1a
> as /logs and
> (e) the second partition ad6s1b as /dev
> (f) reboot - resumably sysinstall will automatically add the entries
> to /etc/fstab and then I can
> (g) copy the contents of /var to /logs
> (h) switch the fstab entries for /var and /logs
> And I should boot up OK
>
> Is this a sound plan
> In light of the added memory should I modify the plan to allow for additional
> swap space on the new drive?
>
> Thanks in advance for any input
>
> David
>
>
> ------------------------------------------------------------
>
>
> PS Here is dmesg.boot from the existing setup.
>
> Copyright (c) 1992-2004 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 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004
> root at harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: AMD Athlon(tm) (1593.54-MHz 686-class CPU)
> Origin = "AuthenticAMD" Id = 0x6a0 Stepping = 0
>
> Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
> AMD Features=0xc0480000<MP,AMIE,DSP,3DNow!>
> real memory = 1006567424 (959 MB)
> avail memory = 975376384 (930 MB)
> ACPI APIC Table: <KM400A AWRDACPI>
> ioapic0 <Version 0.3> irqs 0-23 on motherboard
> npx0: [FAST]
> npx0: <math processor> on motherboard
> npx0: INT 16 interface
> acpi0: <KM400A AWRDACPI> on motherboard
> acpi0: Power Button (fixed)
> Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
> cpu0: <ACPI CPU (3 Cx states)> on acpi0
> acpi_tz0: <Thermal Zone> on acpi0
> acpi_button0: <Power Button> on acpi0
> pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> pci0: <ACPI PCI bus> on pcib0
> agp0: <VIA Generic host to PCI bridge> mem 0xd0000000-0xd7ffffff at device 0.0
> on pci0
> pcib1: <PCI-PCI bridge> at device 1.0 on pci0
> pci1: <PCI bus> on pcib1
> pci1: <display, VGA> at device 0.0 (no driver attached)
> pci0: <network, ethernet> at device 9.0 (no driver attached)
> fwohci0: <Texas Instruments TSB43AB23> mem
> 0xde010000-0xde013fff,0xde014000-0xde0147ff irq 18 at device 10.0 on pci0
> fwohci0: OHCI version 1.10 (ROM=1)
> fwohci0: No. of Isochronous channels is 4.
> fwohci0: EUI64 00:d0:03:56:00:b2:b7:e6
> fwohci0: Phy 1394a available S400, 3 ports.
> fwohci0: Link S400, max_rec 2048 bytes.
> firewire0: <IEEE1394(FireWire) bus> on fwohci0
> fwe0: <Ethernet over FireWire> on firewire0
> if_fwe0: Fake Ethernet address: 02:d0:03:b2:b7:e6
> fwe0: Ethernet address: 02:d0:03:b2:b7:e6
> fwe0: if_start running deferred for Giant
> sbp0: <SBP-2/SCSI over FireWire> on firewire0
> fwohci0: Initiate bus reset
> fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
> firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
> firewire0: bus manager 0 (me)
> atapci0: <VIA 6420 SATA150 controller> port
> 0xa400-0xa4ff,0xa000-0xa00f,0x9c00-0x9c03,0x9800-0x9807,0x9400-0x9403,0x9000-0x9007
> irq 20 at device 15.0 on pci0
> ata2: channel #0 on atapci0
> ata3: channel #1 on atapci0
> atapci1: <VIA 8237 UDMA133 controller> port
> 0xa800-0xa80f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 15.1 on pci0
> ata0: channel #0 on atapci1
> ata1: channel #1 on atapci1
> uhci0: <VIA 83C572 USB controller> port 0xac00-0xac1f irq 21 at device 16.0 on
> pci0
> uhci0: [GIANT-LOCKED]
> usb0: <VIA 83C572 USB controller> on uhci0
> usb0: USB revision 1.0
> uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> uhci1: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 21 at device 16.1 on
> pci0
> uhci1: [GIANT-LOCKED]
> usb1: <VIA 83C572 USB controller> on uhci1
> usb1: USB revision 1.0
> uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub1: 2 ports with 2 removable, self powered
> uhci2: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 21 at device 16.2 on
> pci0
> uhci2: [GIANT-LOCKED]
> usb2: <VIA 83C572 USB controller> on uhci2
> usb2: USB revision 1.0
> uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub2: 2 ports with 2 removable, self powered
> umass0: USB2.0 CardReader, rev 2.00/91.38, addr 2
> uhci3: <VIA 83C572 USB controller> port 0xb800-0xb81f irq 21 at device 16.3 on
> pci0
> uhci3: [GIANT-LOCKED]
> usb3: <VIA 83C572 USB controller> on uhci3
> usb3: USB revision 1.0
> uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub3: 2 ports with 2 removable, self powered
> pci0: <serial bus, USB> at device 16.4 (no driver attached)
> isab0: <PCI-ISA bridge> at device 17.0 on pci0
> isa0: <ISA bus> on isab0
> pci0: <multimedia, audio> at device 17.5 (no driver attached)
> vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xc400-0xc4ff mem
> 0xde016000-0xde0160ff irq 23 at device 18.0 on pci0
> miibus0: <MII bus> on vr0
> ukphy0: <Generic IEEE 802.3u media interface> on miibus0
> ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> vr0: Ethernet address: 00:50:8d:6e:9d:31
> sio0: configured irq 4 not in bitmap of probed irqs 0
> sio0: port may not be enabled
> sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
> sio0: type 16550A
> sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
> sio1: type 16550A
> ppc0: <ECP parallel printer port> port 0x778-0x77b,0x378-0x37f irq 7 drq 3 on
> acpi0
> ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
> ppc0: FIFO with 16/16/16 bytes threshold
> ppbus0: <Parallel port bus> on ppc0
> plip0: <PLIP network interface> on ppbus0
> lpt0: <Printer> on ppbus0
> lpt0: Interrupt-driven port
> ppi0: <Parallel I/O> on ppbus0
> atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
> atkbd0: <AT Keyboard> irq 1 on atkbdc0
> kbd0 at atkbd0
> atkbd0: [GIANT-LOCKED]
> psm0: <PS/2 Mouse> irq 12 on atkbdc0
> psm0: [GIANT-LOCKED]
> psm0: model IntelliMouse, device ID 3
> pmtimer0 on isa0
> sc0: <System console> at flags 0x100 on isa0
> sc0: VGA <16 virtual consoles, flags=0x300>
> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
> Timecounter "TSC" frequency 1593539572 Hz quality 800
> Timecounters tick every 10.000 msec
> acd0: CDRW <LITE-ON CD-RW SOHR-5239S/2S03> at ata0-slave UDMA33
> ad6: 152627MB <ST3160827AS/3.42> [310101/16/63] at ata3-master SATA150
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <USB2.0 CF CardReader > Removable Direct Access SCSI-0 device
> da0: 1.000MB/s transfers
> da0: Attempt to query device size failed: NOT READY, Medium not present
> da1 at umass-sim0 bus 0 target 0 lun 1
> da1: <USB2.0 CBO CardReader > Removable Direct Access SCSI-0 device
> da1: 1.000MB/s transfers
> da1: Attempt to query device size failed: NOT READY, Medium not present
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
> (da0:umass-sim0:0:0:0): SCSI Status: Check Condition
> (da0:umass-sim0:0:0:0): NOT READY asc:3a,0
> (da0:umass-sim0:0:0:0): Medium not present
> (da0:umass-sim0:0:0:0): Unretryable error
> Opened disk da0 -> 6
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
> (da0:umass-sim0:0:0:0): SCSI Status: Check Condition
> (da0:umass-sim0:0:0:0): NOT READY asc:3a,0
> (da0:umass-sim0:0:0:0): Medium not present
> (da0:umass-sim0:0:0:0): Unretryable error
> Opened disk da0 -> 6
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
> (da0:umass-sim0:0:0:0): SCSI Status: Check Condition
> (da0:umass-sim0:0:0:0): NOT READY asc:3a,0
> (da0:umass-sim0:0:0:0): Medium not present
> (da0:umass-sim0:0:0:0): Unretryable error
> Opened disk da0 -> 6
> (da1:umass-sim0:0:0:1): READ CAPACITY. CDB: 25 20 0 0 0 0 0 0 0 0
> (da1:umass-sim0:0:0:1): CAM Status: SCSI Status Error
> (da1:umass-sim0:0:0:1): SCSI Status: Check Condition
> (da1:umass-sim0:0:0:1): NOT READY asc:3a,0
> (da1:umass-sim0:0:0:1): Medium not present
> (da1:umass-sim0:0:0:1): Unretryable error
> Opened disk da1 -> 6
> (da1:umass-sim0:0:0:1): READ CAPACITY. CDB: 25 20 0 0 0 0 0 0 0 0
> (da1:umass-sim0:0:0:1): CAM Status: SCSI Status Error
> (da1:umass-sim0:0:0:1): SCSI Status: Check Condition
> (da1:umass-sim0:0:0:1): NOT READY asc:3a,0
> (da1:umass-sim0:0:0:1): Medium not present
> (da1:umass-sim0:0:0:1): Unretryable error
> Opened disk da1 -> 6
> (da1:umass-sim0:0:0:1): READ CAPACITY. CDB: 25 20 0 0 0 0 0 0 0 0
> (da1:umass-sim0:0:0:1): CAM Status: SCSI Status Error
> (da1:umass-sim0:0:0:1): SCSI Status: Check Condition
> (da1:umass-sim0:0:0:1): NOT READY asc:3a,0
> (da1:umass-sim0:0:0:1): Medium not present
> (da1:umass-sim0:0:0:1): Unretryable error
> Opened disk da1 -> 6
> Mounting root from ufs:/dev/ad6s1a
> Opened disk da1 -> 6
> Mounting root from ufs:/dev/ad6s1a
>
>
>
> --
> 40 yrs navigating and computing in blue waters.
> English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
> Currently in San Diego, CA. Sailing May/June bound for Europe via Panama
> Canal.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list