[rlug] sort :: sdaa dupa sdz

Adrian Sevcenco Adrian.Sevcenco at cern.ch
Mon May 11 15:59:18 EEST 2020


On 5/11/20 3:12 PM, Cristian Paslaru wrote:
> (fdisk -l 2>/dev/null|grep '^Disk /dev/sd.:'|sort; fdisk -l
> 2>/dev/null|grep '^Disk /dev/sda.:'|sort)|nl -v0
aha! multumesc de idee! nu ca idee in sine ci ca pot sa fac sortul mai devreme de rezultatul final
adica:
find /dev/disk/by-path -name "*scsi*" | sort
si pe urma pot sa fac realpath pe fiecare entry, asa ca sun ordonate si blockdeviceurile date de placa
si filtrate (nu am sata-urile locale) (nu e hba, e un raid areca trecut in jbod)

Merci!!
Adrian



>       0 Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
>       1 Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
>       2 Disk /dev/sdc: 4000.8 GB, 4000787030016 bytes
>       3 Disk /dev/sdd: 4000.8 GB, 4000787030016 bytes
>       4 Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
>       5 Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes
>       6 Disk /dev/sdg: 4000.8 GB, 4000787030016 bytes
>       7 Disk /dev/sdh: 2000.4 GB, 2000398934016 bytes
>       8 Disk /dev/sdi: 2000.4 GB, 2000398934016 bytes
>       9 Disk /dev/sdj: 2000.4 GB, 2000398934016 bytes
>      10 Disk /dev/sdl: 2000.4 GB, 2000398934016 bytes
>      11 Disk /dev/sdm: 2000.4 GB, 2000398934016 bytes
>      12 Disk /dev/sdn: 2000.4 GB, 2000398934016 bytes
>      13 Disk /dev/sdo: 2000.4 GB, 2000398934016 bytes
>      14 Disk /dev/sdp: 2000.4 GB, 2000398934016 bytes
>      15 Disk /dev/sdq: 2000.4 GB, 2000398934016 bytes
>      16 Disk /dev/sdr: 2000.4 GB, 2000398934016 bytes
>      17 Disk /dev/sds: 2000.4 GB, 2000398934016 bytes
>      18 Disk /dev/sdt: 2000.4 GB, 2000398934016 bytes
>      19 Disk /dev/sdu: 2000.4 GB, 2000398934016 bytes
>      20 Disk /dev/sdv: 2000.4 GB, 2000398934016 bytes
>      21 Disk /dev/sdw: 2000.4 GB, 2000398934016 bytes
>      22 Disk /dev/sdx: 2000.4 GB, 2000398934016 bytes
>      23 Disk /dev/sdy: 2000.4 GB, 2000398934016 bytes
>      24 Disk /dev/sdz: 2000.4 GB, 2000398934016 bytes
>      25 Disk /dev/sdaa: 2000.4 GB, 2000398934016 bytes
>      26 Disk /dev/sdab: 2000.4 GB, 2000398934016 bytes
>      27 Disk /dev/sdac: 4000.8 GB, 4000787030016 bytes
>      28 Disk /dev/sdad: 2000.4 GB, 2000398934016 bytes
>      29 Disk /dev/sdae: 2000.4 GB, 2000398934016 bytes
>      30 Disk /dev/sdaf: 2000.4 GB, 2000398934016 bytes
>      31 Disk /dev/sdah: 2000.4 GB, 2000398934016 bytes
>      32 Disk /dev/sdai: 2000.4 GB, 2000398934016 bytes
>      33 Disk /dev/sdaj: 2000.4 GB, 2000398934016 bytes
>      34 Disk /dev/sdak: 4000.8 GB, 4000787030016 bytes
>      35 Disk /dev/sdal: 2000.4 GB, 2000398934016 bytes
> 
> On Sun, May 10, 2020 at 6:56 PM Adrian Sevcenco <Adrian.Sevcenco at cern.ch>
> wrote:
> 
>> Salutare! Are cineva idee cum pot sa fac sort-ul sa imi puna sdaa sdab
>> dupa sdz?
>> momentan imi tot da:
>> sda
>> sdab
>> un numare de deviceuri cu 4 litere
>> tot restul deviceurilor cu 3 litere
>> sdz
>>
>> Multumesc!
>> Adrian
>>
>> _______________________________________________
>> RLUG mailing list
>> RLUG at lists.lug.ro
>> http://lists.lug.ro/mailman/listinfo/rlug_lists.lug.ro
>>
> _______________________________________________
> RLUG mailing list
> RLUG at lists.lug.ro
> http://lists.lug.ro/mailman/listinfo/rlug_lists.lug.ro
> 




More information about the RLUG mailing list