Including harddisk

Pierre Abbat phma at leaf.dragonflybsd.org
Tue Mar 17 19:04:21 PDT 2015


On Tuesday, March 17, 2015 22:03:30 nans_nans1 at yahoo.de wrote:
> Please apologize my question, but i install a second harddisk. Now in "/dev"
> apperas da1 and da1s0. How can i include the harddisk in DF?
> 1) newfs_hammer -L Second /dev/da1
> 2) newfs_hammer -L Second /dev/da1s0
> 
> And what is the right entry in fstab: /dev/da1 or /dev/da1s0?

/dev/da1 is the whole disk, including its master boot record. You don't want 
to make a filesystem on that.

First check with gpt or fdisk that /dev/da1s0 has the correct slice type. 
(What in other OSes is called a partition is in BSD called a slice and is 
further divided into partitions.) Whether you use gpt or fdisk depends on the 
kind of slice table you have. If you're going to use it only with DFly, just 
make one slice, which will be da1s1 in fdisk or da1s0 in gpt (IIRR). I'll 
assume it's da1s1.

Now use disklabel to create partitions within the slice. If you're using 
HAMMER and don't need more swap space or a second copy of the boot partition, 
just make one partition. Otherwise, make more. They will be called da1s1a, 
da1s1b, and da1s1d (partition c is skipped for reasons related to a BSD whole 
disk partition). When you have partitioned the slice, then you can run 
newfs_hammer on the partition.

You may want to use the /dev/serno device in /etc/fstab. That will ensure that 
moving disks around won't result in mounting the wrong disk. It looks like 
"/dev/serno/WD-05ACBE0B.s1d", which is the same as da1s1d.

Pierre
-- 
I believe in Yellow when I'm in Sweden and in Black when I'm in Wales.




More information about the Users mailing list