jams wrote:
To make it easier add_storage.py has a --reconstruct option which will read the config files in /etc/storage.d and then recreate all the symlinks,mount points and fstab entries.
Tried the scripts again in R8.4, same issues around md UUID. However based on you comment I think I was able to get something semi automated this time:
Step 0: Get real UUIDs
Code:
mdadm --detail --scan
One out of two of my mdadm raids reported a UUID that was not mountable with this commandCode:
blkid
Both mdadm raids reported proper mountable UUIDs from this commandStep 1: Manual add each md raid to /etc/fstab using the md UUID
Code:
UUID=10484948-b1a9-4454-9719-8b9d8beb1dfb /data/storage/raid xfs defaults,noatime 0 1
Step 2: Mount the drive
Code:
mount -a
Step 3: Copy the /etc/storage.d/HardDriveMang_id.conf to the name used as the md raid mount point in the /etc/fstab
Code:
cp /etc/storage.d/HardDriveManf_id.conf /etc/storage.d/raid.conf
Step 4: Edit the new /etc/storage.d/raid.conf file, update the uuid, mountpoint, and disk_num
Code:
[storage]
uuid = 10484948-b1a9-4454-9719-8b9d8beb1dfb
mountpoint = /data/storage/raid
fstype = xfs
shareable = True
mmount = True
storage_groups = True
disk_num = 1
Step 5: Create symbolic links for diskN to point to the md mount point
Code:
ln -s /data/storage/raid /data/storage/disk1
Step 6: Run the add_storage.py script
Code:
add_storage.py --reconstruct_sg
I have two raids and its created
all the myth storage directories on raids that did not exist, and also preserved the ones that I manually created in the previous release to get around the previous Very cool.
I could not get the md drives to both mount and also bind to diskN in the /etc/fstab file like a non md drives do. I am not sure if step 5 can be skipped or not, but the mythtv storage groups does not require it. I added them links just in can something like the backup script references them over the mount points.