Skip to main content

FreeBSD : Changing Disk Drives

I recently had to upgrade disk for a server running FreeBSD. The current disk was getting full and I wanted to remove the full disk and replace it with another disk with more capacity. The machine architecture is x86 and the server itself is a cheap workhorse serving as a log-server. At a time in the past, I had decided to have the log stored on a secondary (slave) hard-drive rather on the primary (It was actually a choice foisted on me by circumstances).

Anyhow, my current disk architecture was something like this (after running df -H)

machnie# df -H

/dev/ad0s1d                   /root  (note I omitted size - well you don't need to know that)
defsv                            
/dev/ad0s1d                   /tmp
/dev/ad0s1e                   /usr
/dev/ad0s1f                    /var
/dev/ad1s1d                   /logfiles

All I really planned to do was unmount /logfiles (note it is on a slave ATA - ad1) , remove (physical) the device and replace it with a new (higher capacity) ATA drive and remount to the same location - after formatting , of course. so here are the commands:

machine# umount   /logfiles

(I use ee to visit) /etc/fstab and commented out the line /dev/ad1s1d        /logfiles

I then shutdown the machine. Remove the slave hard drive and replaced it with the new one. I closed the machine and restarted it. (don't forget to remove power, etc).

Once machine started, I used sysinstall to access the formatting tools:

#machine sysinstall.

I formatted the drive (ad1)












I allocated all space to the mount point     /logfiles



Comments

Popular posts from this blog

installing mysql on freebsd circa 2013

mysql_install_db --user=mysql --basedir=/usr/local output: Installing MySQL system tables...2013-03-21 20:58:56 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2013-03-21 20:58:56 81008 [Note] InnoDB: The InnoDB memory heap is disabled 2013-03-21 20:58:56 81008 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2013-03-21 20:58:56 81008 [Note] InnoDB: Compressed tables use zlib 1.2.3 2013-03-21 20:58:56 81008 [Note] InnoDB: CPU does not support crc32 instructions 2013-03-21 20:58:56 81008 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2013-03-21 20:58:56 81008 [Note] InnoDB: Completed initialization of buffer pool 2013-03-21 20:58:56 81008 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 2013-03-21 20:58:56 81008 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2013-03-21 20:58:56 81008 [N...

Obama : The Country We Believe In

A speech by The President of the United States of America, Barack Obama, on April 13, 2011 at Goerge Washington University... Good afternoon.  It’s great to be back at GW.  I want you to know that one of the reasons I kept the government open was so I could be here today with all of you.  I wanted to make sure you had one more excuse to skip class.  You’re welcome.