Re-assembling a btrfs raid1 array
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
My system comprises 2 x 3TB hard drives, each partitioned into a 4GB swap, a 36GB /, and the rest for /home. / and /home are (were) then assembled into btrfs raid1 arrays, with both metadata and data being mirrored.
I then installed the wrong graphics drivers for my nVidia card, resulting in an unbootable system. The only way out was to reinstall the system (openSUSE 13.2), but it only used a single drive, resulting in the following setup:
:~ # btrfs fi sh
Label: none uuid: d5919e1a-b52f-421d-9785-cb081ae3b334
Total devices 1 FS bytes used 5.60GiB
devid 1 size 36.00GiB used 8.04GiB path /dev/sdf2
Label: 'home' uuid: 56884b1d-93ab-4db9-bc93-eff3833e91e1
Total devices 2 FS bytes used 1.06TiB
devid 1 size 2.69TiB used 1.07TiB path /dev/sdf3
devid 2 size 2.69TiB used 1.07TiB path /dev/sdg3
Label: none uuid: 06ea503f-58ff-48ca-9c50-b0679288fae6
Total devices 2 FS bytes used 15.87GiB
devid 2 size 36.00GiB used 17.03GiB path /dev/sdg2
*** Some devices missing
Btrfs v3.16.2+20141003
:~ # uname -r
3.16.7-7-desktop
I would like some advice on how to safely delete the contents of /dev/sdg2, and then add it to /dev/sdf2 to make a new raid1 array. I know how to do the second step,
mkfs.btrfs -m raid1 -d raid1 /dev/sdf2 /dev/sdg2
(or would that destroy the data on /dev/sdf2 ?)
and I could delete the contents of the partition, but in between these two steps I'm supposing I need to disassemble one raid1 array and then put it together again.
Or maybe I'm making this seem harder than it really is?
Bob
- --
Bob Williams
System: Linux 3.16.7-7-desktop Distro: openSUSE 13.2 (x86_64) with KDE Development Platform: 4.14.3 Uptime: 06:00am up 7:55, 3 users, load average: 0.16, 0.05, 0.06
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlTlrNwACgkQ0Sr7eZJrmU6thgCbBpokV7zCv2sEejk1Qj8BRcb0 ArMAn0gVQlRCZbc7oUJiw5Z4tV2i5VST
=tMn3
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 27 lines · Bob Williams
My system comprises 2 x 3TB hard drives, each partitioned into a 4GB swap, a 36GB /, and the rest for /home. / and /home are (were) then assembled into btrfs raid1 arrays, with both metadata and data being mirrored.
I then installed the wrong graphics drivers for my nVidia card, resulting in an unbootable system. The only way out was to reinstall the system (openSUSE 13.2), but it only used a single drive, resulting in the following setup:
:~ # btrfs fi sh Label: none uuid:
d5919e1a-b52f-421d-9785-cb081ae3b334 Total devices 1 FS bytes used
5.60GiB devid 1 size 36.00GiB used 8.04GiB path/dev/sdf2Label: 'home' uuid: 56884b1d-93ab-4db9-bc93-eff3833e91e1 Total
devices 2 FS bytes used 1.06TiB devid 1 size 2.69TiB used
1.07TiB path/dev/sdf3devid 2 size 2.69TiB used 1.07TiB path/dev/sdg3Label: none uuid: 06ea503f-58ff-48ca-9c50-b0679288fae6 Total
devices 2 FS bytes used 15.87GiB devid 2 size 36.00GiB used
17.03GiB path/dev/sdg2*** Some devices missingBtrfs v3.16.2+20141003
:~ # uname -r 3.16.7-7-desktop
Quoted 8 lines
I would like some advice on how to safely delete the contents of
/dev/sdg2, and then add it to/dev/sdf2to make a new raid1 array. I know how to do the second step,mkfs.btrfs -m raid1 -d raid1
/dev/sdf2/dev/sdg2(or would that destroy the data on
/dev/sdf2?)
Whoops. I really meant to say:
# btrfs device add -f /dev/sdg2 / # btrfs balance start -dconvert=raid1 -mconvert=raid1 /
Quoted 10 lines
and I could delete the contents of the partition, but in between these two steps I'm supposing I need to disassemble one raid1 array and then put it together again.
Or maybe I'm making this seem harder than it really is?
Bob -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
- --
Bob Williams
System: Linux 3.16.7-7-desktop Distro: openSUSE 13.2 (x86_64) with KDE Development Platform: 4.14.3 Uptime: 06:00am up 7:55, 3 users, load average: 0.16, 0.05, 0.06
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlTltYoACgkQ0Sr7eZJrmU7KbgCgogQVHMce+HzMWnBoUSQr56gP vusAn3J73p7QYfLhJDOqXlgilsAmX2ZF
=Y4Wx
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Bob Williams
Quoted 1 line · Bob Williams
My system comprises 2 x 3TB hard drives,
[...]
Quoted 6 lines
Whoops. I really meant to say:
# btrfs device add -f /dev/sdg2 / # btrfs balance start -dconvert=raid1 -mconvert=raid1 /
Sorted. Sorry for the noise. ;-)
- --
Bob Williams
System: Linux 3.16.7-7-desktop Distro: openSUSE 13.2 (x86_64) with KDE Development Platform: 4.14.3 Uptime: 06:00am up 7:55, 3 users, load average: 0.16, 0.05, 0.06
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlTmBI8ACgkQ0Sr7eZJrmU79SQCfadZjwKoxdD24JVcfwDeHZDqw nP4An0wF1wqlO/nD3YOkZuTCFzkX1166
=b3kc
-----END PGP SIGNATURE-----