Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cgd gives read-only error



   Date: Wed, 9 Jan 2013 20:51:58 +0000
   From: Patrick Welche <prlw1%cam.ac.uk@localhost>

   I just tried the "To scrub data from a disk before setting up a cgd"
   recipe from cgdconfig on a new amd64 box installed from 12th December
   current dist files. For some reason the dd fails with /dev/rcgd0d
   is a read-only file system.

   The cgd0 is created from raid1a which is a partition of raid1 which
   in turn is over dk2 and dk7 from two gpt partitioned disks wd2 and wd3.

   I can dd zeros all over rraid1d. I can newfs and mount cgd0a, and read
   and write from/to it. So why can't I write to rcgd0d?

Although you can dd zeros over all rraid1d, I expect you can't dd
zeros all over rraid1a.  The disk drivers refuse writes through
non-raw partitions to the sector where the disklabel lives, so if
raid1a covers raid1's disklabel, and you configure cgd0 on raid1a,
then raid1a will refuse such a write.

If raid1 has partitions other than raid1a, then you presumably don't
want to overwrite the disklabel, so you'll probably want to skip the
first two sectors on disk, or use the start of the disk for a non-cgd
partition.  If you want cgd over all of raid1, then you can configure
cgd0 on raid1d instead of raid1a and it should all work.

Someone^TM should clarify this business in the Guide...


Home | Main Index | Thread Index | Old Index