View previous topic :: View next topic |
Author |
Message |
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Wed Jun 16, 2021 8:15 pm Post subject: |
|
|
iandoug wrote: | Appears correct now ...
Code: |
fractal /home/ian # mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: partition table exists on /dev/sdb1
mdadm: partition table exists on /dev/sdb1 but will be lost or
meaningless after creating array
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
fractal /home/ian # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 256M 0 part /boot
├─sda2 8:2 0 64G 0 part [SWAP]
└─sda3 8:3 0 1.8T 0 part /
sdb 8:16 0 3.6T 0 disk
└─sdb1 8:17 0 3.6T 0 part
└─md0 9:0 0 3.6T 0 raid1
sdc 8:32 0 3.6T 0 disk
└─sdc1 8:33 0 3.6T 0 part
└─md0 9:0 0 3.6T 0 raid1
|
Now to migrate /home there ... should have done this before creating a user...
Thanks, Ian |
Am I right that you current /home is not a separate partition, but just directory in / ?
You still need to make a filesystem on /dev/md0 if you have not done it yet. Once it is done
make a directory somewhere under root, say /mnt/temphome. Mount /dev/md0 as /mnt/temphome. Move files mv /home/* /mnt/temphome
unmount /mnt/temphome, Mount /dev/md0 now as /home. Change fstab to mount /dev/md0 as /home automatically next time |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 832 Location: Cape Town, South Africa
|
Posted: Wed Jun 16, 2021 9:57 pm Post subject: |
|
|
dmpogo wrote: |
Am I right that you current /home is not a separate partition, but just directory in / ?
You still need to make a filesystem on /dev/md0 if you have not done it yet. Once it is done
make a directory somewhere under root, say /mnt/temphome. Mount /dev/md0 as /mnt/temphome. Move files mv /home/* /mnt/temphome
unmount /mnt/temphome, Mount /dev/md0 now as /home. Change fstab to mount /dev/md0 as /home automatically next time |
Yes .. I followed process here
https://superuser.com/questions/742150/how-do-i-set-a-raid-array-as-a-home-mount-point-on-linux
(with some corrections)
The untar created /home/home so I just moved the stuff up a level and deleted the spurious home.
Thanks to all for the help /advice.
Cheers, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Thu Jun 17, 2021 9:17 pm Post subject: |
|
|
iandoug wrote: | dmpogo wrote: |
Am I right that you current /home is not a separate partition, but just directory in / ?
You still need to make a filesystem on /dev/md0 if you have not done it yet. Once it is done
make a directory somewhere under root, say /mnt/temphome. Mount /dev/md0 as /mnt/temphome. Move files mv /home/* /mnt/temphome
unmount /mnt/temphome, Mount /dev/md0 now as /home. Change fstab to mount /dev/md0 as /home automatically next time |
Yes .. I followed process here
https://superuser.com/questions/742150/how-do-i-set-a-raid-array-as-a-home-mount-point-on-linux
(with some corrections)
The untar created /home/home so I just moved the stuff up a level and deleted the spurious home.
Thanks to all for the help /advice.
Cheers, Ian |
Well, it is a bit unclear why would you use tar as an intermediate step, but you got it working at the end.
One issue is a bit of diagnostics from mdadm
"mdadm: partition table exists on /dev/sdb1"
Does it mean hat you have written some partition table WITHIN /dev/sdb1 (which is a partition itself) ? |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 832 Location: Cape Town, South Africa
|
Posted: Thu Jun 17, 2021 9:35 pm Post subject: |
|
|
dmpogo wrote: |
Well, it is a bit unclear why would you use tar as an intermediate step, but you got it working at the end.
One issue is a bit of diagnostics from mdadm
"mdadm: partition table exists on /dev/sdb1"
Does it mean hat you have written some partition table WITHIN /dev/sdb1 (which is a partition itself) ? |
1. Was copying that guide, it worked eventually.
2. yes... that's what happens when you do fdisk /dev/sdb1 instead of /dev/sdb
I learn from my mistakes...
Thanks, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Thu Jun 17, 2021 10:53 pm Post subject: |
|
|
iandoug wrote: | dmpogo wrote: |
Well, it is a bit unclear why would you use tar as an intermediate step, but you got it working at the end.
One issue is a bit of diagnostics from mdadm
"mdadm: partition table exists on /dev/sdb1"
Does it mean hat you have written some partition table WITHIN /dev/sdb1 (which is a partition itself) ? |
1. Was copying that guide, it worked eventually.
2. yes... that's what happens when you do fdisk /dev/sdb1 instead of /dev/sdb
I learn from my mistakes...
Thanks, Ian |
I would have deleted this spurious partition table. Copy your /home away to another partion, say /tmp/home, stop raid, delete partition table on /dev/sdb1 and collect it all back again. You home on raid may even survive that, in which case you just distcard your copy of /home |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 832 Location: Cape Town, South Africa
|
Posted: Fri Jul 30, 2021 10:27 am Post subject: |
|
|
FWIW, the box spent the last month numbercrunching keyboard layouts.
Turned out my /home was still under /root instead of on the mirrored drives.
FSTab referred to md0 instead of md1.
Then for some reason after attempted fixes the system decided it was actually md127
Tried recreating it as md1, which appeared to succeed, but lsblk still showed md127.
So I just made it md127 in fstab, and it's working. I assume whether it is md0, md1 or md127 is largely irrelevant. not likely to be adding any Raid setups in the box.
Now I can finish setting up the box ...
Thanks, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Jul 30, 2021 3:35 pm Post subject: |
|
|
iandoug,
Use filesystem UUIDs in /etc/fstab, then the physical device name doesn't matter.
Assemble raid sets by the raid set UUID and again, the kernel device names don't matter. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|