NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
IcyK
Dec 02, 2012Tutor
Q: change raid0 volume name?
Hi all,
I have an Ultra 2 with 2 x Raid0 drives, single volumes, volumes /dev/c and /dev/d.
Today, I tried to updrade one of the disks: pulled out the left disk (/dev/c), put in a new one, made a new raid0 volume, copied the contents from the right disk (/dev/d) to the left disk.
Then I pulled out the original right disk and put the new copied disk back. Unfortunately, now there seem to be 2 /dev/c disks (from which I can access only one).
I'd like to know if it is possible to change the volume of the new disk from /dev/c tot /dev/d?
Any help is highly appreciated... ;)
I have an Ultra 2 with 2 x Raid0 drives, single volumes, volumes /dev/c and /dev/d.
Today, I tried to updrade one of the disks: pulled out the left disk (/dev/c), put in a new one, made a new raid0 volume, copied the contents from the right disk (/dev/d) to the left disk.
Then I pulled out the original right disk and put the new copied disk back. Unfortunately, now there seem to be 2 /dev/c disks (from which I can access only one).
I'd like to know if it is possible to change the volume of the new disk from /dev/c tot /dev/d?
Any help is highly appreciated... ;)
4 Replies
Replies have been turned off for this discussion
- IcyKTutorReally no one knows...?
Bummer :cry: - siignaNETGEAR Employee RetiredYou'd have to get in via SSH to do it. Boot up with just the disk/volume you want to rename, unmount the filesystem, then use vgrename and lvrename to rename the volume group/logical volume. Make sure you've got your mount points in /etc/fstab and you should be good.
- IcyKTutorThanks! That worked, I have changed /dev/c/c to /dev/d/d.
But now, when I put the original /dev/c/c back in, the new /dev/d/d is not recognized... :(
Could that have anything to do with settings stored in the little raid1 partition that's automatically created?
Both /dev/c/c and /dev/d/d are in fstab, but /dev/d is not in /dev nor in /dev/mapper. So I can't mount /dev/d/d manually...
lvscan and vgscan only find /dev/c/c and volume group c.
Any ideas anyone?
/edit: when I swap the disks (left to right, right to left) /dev/d/d gets recognised but not /dev/c/c. It seams the settings on (only) the left disk are used...??? - IcyKTutorWell, I almost nailed it.
For future refetence, this is what I did:
with only original disk [d] to copy:root ~ # vgs
VG #PV #LV #SN Attr VSize VFree
d 1 1 0 wz--n- 1.81T 5.00G
root ~ # lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
d d -wi-a- 1.81T
-> only one volume appeared
vgchange -a n
vgrename /dev/d /dev/c
lvrename /dev/c/d /dev/c/c
reboot 2x
shutdown
Insert new disk [d]
create new volume [d] (in frontview)
start
reboot 2x
copy contents from original [d] (now [c]) to new [d]rsync -av --stats /c/recordings/* /d/recordings
reboot
shutdown
remove original disk [d] which is now disk [c]
start + reboot
shutdown
insert original disk [c]
start
-> new disk [d] not recognizedroot ~ # mdadm --examine --scan
ARRAY /dev/md/2 metadata=1.2 UUID=060d371f:28bca8e5:bed47ae0:4a196b61 name=E091F58AD37A:2
ARRAY /dev/md/0 metadata=1.2 UUID=2f7dfbb0:adfa39f9:bb6da5bf:c85762bf name=E091F58AD37A:0
ARRAY /dev/md/1 metadata=1.2 UUID=da6a5053:e8870122:3644d00c:1346d084 name=E091F58AD37A:1
ARRAY /dev/md/2 metadata=1.2 UUID=cbed02fd:fb7d7142:ffbc8472:21cde62c name=E091F58AD37A:2root ~ # mdadm --assemble --scan
mdadm: /dev/md/E091F58AD37A:2 has been started with 1 drive.
mdadm: /dev/md/E091F58AD37A:1_0 has been started with 1 drive (out of 2).
mdadm: /dev/md/E091F58AD37A:0_0 has been started with 1 drive (out of 2).root ~ # lvm pvscan
PV /dev/md127 VG d lvm2 [1.81 TB / 5.00 GB free]
PV /dev/md2 VG c lvm2 [461.25 GB / 10.00 GB free]
Total: 2 [2.27 TB] / in use: 2 [2.27 TB] / in no VG: 0 [0 ]
root ~ # lvm vgscan
Reading all physical volumes. This may take a while...
Found volume group "d" using metadata type lvm2
Found volume group "c" using metadata type lvm2root ~ # vgchange -a y
1 logical volume(s) in volume group "d" now active
1 logical volume(s) in volume group "c" now activeroot ~ # ls -al /dev/mapper
total 0
drwxr-xr-x 2 root root 100 2012-12-09 11:43 .
drwxr-xr-x 16 root root 3560 2012-12-09 11:43 ..
brw-rw---- 1 root disk 253, 0 2012-12-09 11:32 c-c
crw-rw---- 1 root root 10, 236 2012-12-09 11:32 control
brw-rw---- 1 root disk 253, 1 2012-12-09 11:43 d-droot / # mount /dev/d/d /d
Now new volume [d] gets mounted.
Only when I reboot, the mount is lost and I have to do it manually.
So the remaining question is: how to get drive / volume [d] to mount at boot?
Related Content
- Dec 25, 2018Retired_Member
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!