11dbc Partitioning an external hard drive WD MyBook - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Peripheral Hardware

Peripheral Hardware Stuff that plugs in via USB, FireWire, eSATA, PS/2, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old February 26th, 2009, 20:35
Ico's Avatar
Ico Ico is offline
Junior Member
 
Join Date: Nov 2008
Location: New York
Posts: 43
Thanks: 3
Thanked 1 Time in 1 Post
Question Partitioning an external hard drive WD MyBook

Hey guys,

I just got a 1TB external hard drive (USB) by Western Digital.
Hooked it up to my FreeBSD server and mounted it - no problems. Even mapped it to a windows laptop using Samba.

My question is, what is the easiest way to partition the disk into say a 400GB and a 600GB slices. I am used to cfdisk from my Linux days, I really have no experience with fdisk, so exact commands would be helpful too. I was reading the handbook and it mentions a ton of stuff that needs done.. dd, bsdlabel, fdisk, etc. All I want to do is slice the disk into two MSDOSFS disks 1 for backups and 1 for storage so I can map them to the Winblows laptops.

Any help is greatly appreciated.
__________________
Tranced for life...
Reply With Quote
  #2  
Old February 26th, 2009, 21:52
plamaiziere plamaiziere is offline
Member
 
Join Date: Jan 2009
Location: Rennes, France
Posts: 174
Thanks: 1
Thanked 39 Times in 29 Posts
Default

Quote:
Originally Posted by Ico View Post
Hey guys,
My question is, what is the easiest way to partition the disk into say a 400GB and a 600GB slices. I am used to cfdisk from my Linux days, I really have no experience with fdisk, so exact commands would be helpful too. I was reading the handbook and it mentions a ton of stuff that needs done.. dd, bsdlabel, fdisk, etc. All I want to do is slice the disk into two MSDOSFS disks 1 for backups and 1 for storage so I can map them to the Winblows laptops.

Any help is greatly appreciated.
You can use sysinstall to partition your disk, it is more user friendly than fdisk.
Reply With Quote
  #3  
Old February 26th, 2009, 22:26
Ico's Avatar
Ico Ico is offline
Junior Member
 
Join Date: Nov 2008
Location: New York
Posts: 43
Thanks: 3
Thanked 1 Time in 1 Post
Default

The Disk Label editor?

Btw I think I have encountered a problem with samba and msdosfs and rw permissions. When I try to create a dir or a file on the share I get a nasty error about device being in use..

Looking at the smb logs, smbd is going nuts:

Code:
[2009/02/26 15:16:17,  0] lib/util.c:smb_panic(1663)
  PANIC (pid 25969): internal error
[2009/02/26 15:16:17,  0] lib/util.c:log_stack_trace(1767)
  BACKTRACE: 19 stack frames:
   #0 0x2799a5 <smb_panic+133> at /usr/local/sbin/smbd
   #1 0x262bfa <dump_core_setup+1242> at /usr/local/sbin/smbd
   #2 0xbfbfffb4
   #3 0x207eeb8a <abort+106> at /lib/libc.so.7
   #4 0x249c7c <telldir+124> at /usr/local/sbin/smbd
   #5 0x266b1d <sys_telldir+29> at /usr/local/sbin/smbd
   #6 0xe6ced <vfswrap_lstat+1805> at /usr/local/sbin/smbd
   #7 0x7653b <ReadDirName+219> at /usr/local/sbin/smbd
   #8 0x7789b <can_delete_directory+427> at /usr/local/sbin/smbd
   #9 0x778e8 <dptr_ReadDirName+56> at /usr/local/sbin/smbd
   #10 0xad602 <get_allocation_size+12034> at /usr/local/sbin/smbd
   #11 0xb09c3 <get_allocation_size+25283> at /usr/local/sbin/smbd
   #12 0xb0e9c <get_allocation_size+26524> at /usr/local/sbin/smbd
   #13 0xb6c07 <reply_trans2+1719> at /usr/local/sbin/smbd
   #14 0xd5af6 <remove_deferred_open_smb_message+2486> at /usr/local/sbin/smbd
   #15 0xd7505 <srv_send_smb+1109> at /usr/local/sbin/smbd
   #16 0xd827b <smbd_process+3259> at /usr/local/sbin/smbd
   #17 0x4bd51d <main+8269> at /usr/local/sbin/smbd
   #18 0x5ed99 <_start+137> at /usr/local/sbin/smbd
[2009/02/26 15:16:17,  0] lib/fault.c:dump_core(201)
  dumping core in /var/log/samba/cores/smbd
[2009/02/26 15:16:24,  1] smbd/service.c:make_connection_snum(1194)
  LAPTOPX (192.168.15.100) connect to service WD initially as user lee (uid=1001, gid=1001) (pid 26586)
[2009/02/26 15:16:24,  0] lib/fault.c:fault_report(40)
Is there anyone else who has an external hdd with msdosfs who is able to use it with Samba?
__________________
Tranced for life...
Reply With Quote
  #4  
Old March 22nd, 2009, 18:04
julz julz is offline
Junior Member
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not related to msdosfs, but I see lots of similar smb_panics with 'dumping core' on a couple of FreeBSD 6.2 machines.
I don't see this problem with 3.0 series of samba, but in 3.2 and 3.3 smbd keeps crashing which of course makes the connection unreliable.
Reply With Quote
  #5  
Old May 26th, 2009, 12:15
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,854
Thanks: 30
Thanked 1,892 Times in 1,335 Posts
Default

Narrow escape ... http://www.theregister.co.uk/2009/05/26/wd_outrage/
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Administrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
  #6  
Old May 26th, 2009, 14:01
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,725
Thanks: 47
Thanked 2,023 Times in 1,862 Posts
Default

Quote:
Originally Posted by Ico View Post
All I want to do is slice the disk into two MSDOSFS disks 1 for backups and 1 for storage so I can map them to the Winblows laptops.
You do not have to use msdosfs if you want to share it using samba. It can be 'regular' fbsd UFS.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #7  
Old June 8th, 2009, 21:36
Bunyan's Avatar
Bunyan Bunyan is offline
Member
 
Join Date: Jan 2009
Posts: 139
Thanks: 7
Thanked 16 Times in 15 Posts
Default

Quote:
Originally Posted by Ico View Post
Hey guys,
..... I am used to cfdisk from my Linux days, I really have no experience with fdisk, so exact commands would be helpful too
cfdisk stands for curses fdisk.
cfdisk is a pseudo-graphical fdisk. So, you want to partition your external HDD by using Linux fdisk.
I'll assume that your 1Tb HDD is either SCSI or SATA, i.e /dev/sdX.
On my system it would go like follows:
Code:
fdisk /dev/sdb
...........
n (to create a BIOS partition)
#Then the clever program asks you
p - primary
l - logical
# For a FreeBSD slice you need a primary partion, so you choose p
p
# On a HDD one can have only 4 pimary partitions, since it is the first partition, choose 1
1
# Then you are prompted to set the size of the partition. I think you'll manage how to do that. + 400000 M, for example.
# Now you need to set the type of the partition, so that FreeBSD could recognize as 165 and newfs it!
t
a5
# Is it going to house a full FreeBSD installation? If yes, you should set the bootable flag on.
a
# In case you need the slice to hold only data, skip this step.
# Now we need to write our changes to disk:
w
# After this command, fdisk quits.

Boot your FreeBSD, see dmesg, run SYSINSTALL and initialize your new UFS2 filesystem. Then you can mount your external HDD
as /dev/daNsX, for example /dev/da0s1 in my case.
Reply With Quote
  #8  
Old June 8th, 2009, 21:40
Bunyan's Avatar
Bunyan Bunyan is offline
Member
 
Join Date: Jan 2009
Posts: 139
Thanks: 7
Thanked 16 Times in 15 Posts
Default

In my post I used the Linux fdisk from a live CD, like Slackware !
Reply With Quote
  #9  
Old June 10th, 2009, 15:14
hedwards hedwards is offline
Member
 
Join Date: Nov 2008
Posts: 189
Thanks: 3
Thanked 18 Times in 16 Posts
Default

I'd pay attention to the disk, I know my previous WD external drive was only supported under Windows and possibly Mac. It had some sort of proprietary bit which caused it to go to go to sleep on it's own and not wake up again if I left it set for a while.

I won't personally be buying anymore WD external drives, hopefully that sort of bug isn't affecting the model you got.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
SCSI Hard drive recovering from bad sectors roddierod System Hardware 0 February 10th, 2009 19:08
DBUS arreo recevied whe external harddrive connected ChickenWing88 Peripheral Hardware 0 January 29th, 2009 01:34
Partitioning - general tool petike Installing & Upgrading 6 January 2nd, 2009 23:29
Seagate Baracuda 7200.8 300GB Hard Drive Fozzy System Hardware 3 December 31st, 2008 04:11
Blender & external scripts directory Ole Installation and Maintenance of FreeBSD Ports or Packages 1 December 25th, 2008 22:24


All times are GMT +1. The time now is 00:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0