Bug #5283
closedCeph-deploy can't handle /dev/disk/by-* device paths
0%
Description
If you try to create a new osd with ceph-deploy using /dev/disk/by-* path instead of the /dev/* path the osd creation fails. During the creation process ceph-deploy simply adds "1" to the device name, which is absolutely fine if you are using /dev/* paths, like /dev/sda. However, if you use the /dev/disk/by-* paths you should be adding "-partN" where N is the partition number. Using /dev/disk/by-* paths is recommended if you are planning to add more disks to the storage which might change the existing block device paths/
Updated by Ian Colle almost 11 years ago
- Assignee set to Anonymous
- Priority changed from Normal to High
Updated by Anonymous almost 11 years ago
- Status changed from New to In Progress
The fix for this will actually be in ceph-disk, ceph-deploy pretty much passes the device unmodified.
Updated by Anonymous almost 11 years ago
glowell@gary-ubuntu-01:~/ceph-deploy$ ./ceph-deploy osd create gary-ubuntu-01:/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:0:0
usage: ceph-deploy osd [-h] [--zap-disk] [--dmcrypt]
[--dmcrypt-key-dir KEYDIR]
SUBCOMMAND HOST:DISK[:JOURNAL] [HOST:DISK[:JOURNAL]
...]
ceph-deploy osd: error: argument HOST:DISK[:JOURNAL]: must be in form HOST:DISK[:JOURNAL]
The actual error is due to the colons in the by-path name. The argument parser is using colon as a delimter. One possible solution is to add parameters --data-path and --journal-path for this case.
Updated by Anonymous almost 11 years ago
With the by-id path which does not have embedded colons:
glowell@gary-ubuntu-01:~/ceph-deploy$ ./ceph-deploy osd create gary-ubuntu-01:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0 ceph-disk-prepare -- /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0 returned 1 Creating new GPT entries. Information: Moved requested sector from 34 to 2048 in order to align on 2048-sector boundaries. The operation has completed successfully. Information: Moved requested sector from 2097153 to 2099200 in order to align on 2048-sector boundaries. The operation has completed successfully. INFO:ceph-disk:Will colocate journal with data on /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-01: No such file or directory Usage: mkfs.xfs /* blocksize */ [-b log=n|size=num] /* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num, (sunit=value,swidth=value|su=num,sw=num), sectlog=n|sectsize=num /* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2, projid32bit=0|1] /* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n sunit=value|su=num,sectlog=n|sectsize=num, lazy-count=0|1] /* label */ [-L label (maximum 12 characters)] /* naming */ [-n log=n|size=num,version=2|ci] /* prototype file */ [-p fname] /* quiet */ [-q] /* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx] /* sectorsize */ [-s log=n|size=num] /* version */ [-V] devicename <devicename> is required unless -d name=xxx is given. <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). <value> is xxx (512 byte blocks). ceph-disk: Error: Command '['mkfs', '-t', 'xfs', '-f', '-i', 'size=2048', '--', '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-01']' returned non-zero exit status 1 glowell@gary-ubuntu-01:~/ceph-deploy$ ls -l /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0* lrwxrwxrwx 1 root root 9 Jun 13 20:48 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0 -> ../../sda lrwxrwxrwx 1 root root 10 Jun 13 20:48 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Jun 13 20:48 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-part2 -> ../../sda2
Updated by Alfredo Deza over 10 years ago
- Status changed from In Progress to New
- Assignee changed from Anonymous to Alfredo Deza